You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .plans/SPONSOR_PAGE_CHANGES.md
+43-26Lines changed: 43 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,16 +23,17 @@ Use `mkdocs-macros-plugin` to load a YAML data file and render the sponsors page
23
23
### 2. Create the YAML data file ✅
24
24
- Created `data/sponsors.yml` using option (a) — data file outside `docs/`.
25
25
- Header comment documents required/optional fields and the consent policy, with an example entry kept commented out for editor reference.
26
+
-**Deduplicated structure:** sponsor details live once in a top-level `sponsors` map keyed by ID. Year entries under `years:` reference sponsors by ID only, so a sponsor returning across multiple years appears exactly once in the source.
26
27
- 2026 and 2025 corporate entries populated from the existing sponsors page. `individual: []` empty lists in both years — no placeholder donors committed.
27
28
28
29
### 3. Rewrite the sponsors page template
29
30
- Replace `docs/sponsors/index.md` with a Jinja2-templated version.
30
31
- Top section: help/sponsorship info text (kept from current page). Decide whether to keep `SaturdayMP, the main Weekly Dev Chat sponsor` hardcoded or make it data-driven via a `primary_sponsor` field in the YAML. Hardcoded is fine for now — just call out the decision.
31
32
- Iterate years newest-first with explicit sorting, not map iteration order:
32
33
```jinja
33
-
{% for year in sponsors.sponsors.keys() | sort(reverse=true) %}
34
+
{% for year in sponsors.years.keys() | sort(reverse=true) %}
34
35
```
35
-
- For each year: corporate sponsors section, then individual donors section, both rendered from data.
36
+
- For each year: corporate sponsors section, then individual donors section. For each ID in the year's list, look up the full record from the top-level `sponsors` map (e.g. `sponsors.sponsors[id]`). Skip + log a warning on unknown IDs so a typo fails loudly rather than silently dropping a sponsor.
36
37
- Each sponsor/donor shows: image (if present), name, and link (if present). Use Jinja conditionals so missing fields don't render broken `<img>` tags or empty links.
37
38
- Add alt text (`alt="{{ s.name }}"`) to every image — the existing page uses `![]()` with no alt, which is an accessibility gap worth fixing here.
38
39
- Style consistent with existing hosts/past-hosts pages (150px float-left images).
@@ -53,45 +54,61 @@ Use `mkdocs-macros-plugin` to load a YAML data file and render the sponsors page
53
54
## Data File Structure (Draft)
54
55
55
56
```yaml
56
-
# docs/_data/sponsors.yml (or data/sponsors.yml — see step 2)
57
-
# Corporate sponsors and individual donors organized by year.
58
-
# Fields: name (required), image (optional), link (optional),
59
-
# link_label (optional), description (optional).
57
+
# data/sponsors.yml
58
+
# Sponsor details are defined once under `sponsors:` and referenced by ID
59
+
# in each year under `years:`. This avoids duplicating a sponsor's record
60
+
# when they return across multiple years — update their info in one place.
61
+
#
62
+
# Sponsor fields: name (required), image (optional), link (optional),
63
+
# link_label (optional), description (optional).
60
64
# Policy: list individuals only with their explicit consent.
65
+
61
66
sponsors:
67
+
saturday-mp:
68
+
name: Saturday Morning Productions
69
+
image: smp.jpeg
70
+
link: https://saturdaymp.com/
71
+
description: Thanks to Saturday MP for providing hosting, Zoom, and more.
72
+
73
+
dev-edmonton:
74
+
name: Dev Edmonton Society
75
+
image: devEd.png
76
+
link: https://devedmonton.com/
77
+
description: Thanks to DES for providing a Slack channel.
78
+
79
+
edmonton-unlimited:
80
+
name: Edmonton Unlimited
81
+
image: EdmontonUnlimited.jpeg
82
+
link: https://edmontonunlimited.com/
83
+
description: Thanks to Edmonton Unlimited for providing a Meetup Link.
84
+
85
+
years:
62
86
2026:
63
87
corporate:
64
-
- name: Saturday Morning Productions
65
-
image: smp.jpeg
66
-
link: https://saturdaymp.com/
67
-
description: Thanks to Saturday MP for providing hosting, Zoom, and more.
68
-
69
-
- name: Dev Edmonton Society
70
-
image: devEd.png
71
-
link: https://devedmonton.com/
72
-
description: Thanks to DES for providing a Slack channel.
73
-
74
-
- name: Edmonton Unlimited
75
-
image: EdmontonUnlimited.jpeg
76
-
link: https://edmontonunlimited.com/
77
-
description: Thanks to Edmonton Unlimited for providing a Meetup Link.
78
-
88
+
- saturday-mp
89
+
- dev-edmonton
90
+
- edmonton-unlimited
79
91
individual: []
80
92
81
93
2025:
82
94
corporate:
83
-
- name: Saturday Morning Productions
84
-
image: smp.jpeg
85
-
link: https://saturdaymp.com/
86
-
description: Thanks to Saturday MP for providing hosting, Zoom, and more.
87
-
95
+
- saturday-mp
88
96
individual: []
89
97
```
90
98
99
+
Example template lookup:
100
+
```jinja
101
+
{% for id in sponsors.years[year].corporate %}
102
+
{% set s = sponsors.sponsors[id] %}
103
+
...
104
+
{% endfor %}
105
+
```
106
+
91
107
## Key Decisions
92
108
-**mkdocs-macros-plugin** chosen for Jinja2 templating in markdown (clean data/presentation separation).
93
109
-**Corporate sponsors** and **individual donors** stored in same YAML file, organized by year.
94
110
-**Corporate sponsors** for each year listed separately from **individual donors** on the page.
111
+
-**Sponsor records deduplicated**: defined once under `sponsors:` by ID, referenced by ID from each year under `years:`. A returning sponsor is updated in one place.
95
112
-**No placeholder donors** in committed data — start with empty lists.
96
113
-**Images** stay in `docs/sponsors/`, referenced by filename in YAML.
97
114
-**Existing help/volunteering text** at top of sponsors page is preserved.
0 commit comments