Add blog post type tags with filtering and build-time validation#488
Conversation
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-class “post type” taxonomy for the Zola-powered blog, including build-time validation of front matter, UI badges, and a client-side filter on the blog index.
Changes:
- Adds
extra.typeto blog post front matter and defines valid types inconfig.toml. - Updates blog listing and individual post templates to render type badges; adds a dropdown filter on the listing page.
- Adds SCSS for the filter UI, screen-reader-only label, and type badge styling.
Reviewed changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/blog.html | Adds type validation, type badges in the list, and a JS-driven type filter UI. |
| templates/blog-page.html | Displays the type badge in the single-post metadata header. |
| sass/_valkey.scss | Styles the filter dropdown, .sr-only label helper, and type badges (per type color). |
| config.toml | Defines the allowed blog types under [extra.blog_types]. |
| content/blog/README | Documents required front matter (including extra.type) and how to add new types. |
| content/blog/whats-new-june-2024.md | Adds extra.type to front matter. |
| content/blog/2026-03-27-valkey-tooling-primitives.md | Adds extra.type to front matter. |
| content/blog/2026-03-17-spring-data-valkey/index.md | Adds extra.type to front matter. |
| content/blog/2026-03-10-valkey-search-1_2/index.md | Adds extra.type to front matter. |
| content/blog/2026-02-25-introducing-valkey-admin/index.md | Adds extra.type to front matter. |
| content/blog/2026-02-19-operational-lessons/index.md | Adds extra.type to front matter. |
| content/blog/2026-02-04-valkey-newsletter-new/index.md | Adds extra.type to front matter. |
| content/blog/2026-01-22-2025-year-end/index.md | Adds extra.type to front matter. |
| content/blog/2026-01-06-valkey-helm-chart/index.md | Adds extra.type to front matter. |
| content/blog/2025-10-27-atomic-slot-migration/index.md | Adds extra.type to front matter. |
| content/blog/2025-10-21-introducing-valkey-9/index.md | Adds extra.type to front matter. |
| content/blog/2025-10-20-1-billion-rps/index.md | Adds extra.type to front matter. |
| content/blog/2025-10-15-properly-secure-your-valkey-deployment.md | Adds extra.type to front matter. |
| content/blog/2025-10-02-50-million-zsets/index.md | Adds extra.type to front matter. |
| content/blog/2025-09-30-hash-fields-expiration/index.md | Adds extra.type to front matter. |
| content/blog/2025-09-25-numbered-databases/index.md | Adds extra.type to front matter. |
| content/blog/2025-09-11-valkey-investment-in-open-source.md | Adds extra.type to front matter. |
| content/blog/2025-08-12-keyspace-schedule.md | Adds extra.type to front matter. |
| content/blog/2025-08-04-valkey-swift/index.md | Adds extra.type to front matter. |
| content/blog/2025-07-21-valkey-on-k0rdent.md | Adds extra.type to front matter. |
| content/blog/2025-07-10-keyspace-save-the-date.md | Adds extra.type to front matter. |
| content/blog/2025-06-30-introducing-enhanced-json-capabilities-in-valkey.md | Adds extra.type to front matter. |
| content/blog/2025-06-23-valkey-bundle-one-stop-shop-for-low-latency-modern-applications/index.md | Adds extra.type to front matter. |
| content/blog/2025-06-13-introducing-valkey-search/index.md | Adds extra.type to front matter. |
| content/blog/2025-05-21-performance-optimization-methodology-for-valkey/index.md | Adds extra.type to front matter. |
| content/blog/2025-05-14-upgrade-stories-vol1.md | Adds extra.type to front matter. |
| content/blog/2025-04-27-valkey-modules-rust-sdk-updates.md | Adds extra.type to front matter. |
| content/blog/2025-04-09-introducing-bloom-filters.md | Adds extra.type to front matter. |
| content/blog/2025-04-02-valkey-8-1-0-ga.md | Adds extra.type to front matter. |
| content/blog/2025-03-4-go-client-in-public-preview.md | Adds extra.type to front matter. |
| content/blog/2025-03-28-new-hash-table/index.md | Adds extra.type to front matter. |
| content/blog/2024-12-22-az-affinity-strategy.md | Adds extra.type to front matter. |
| content/blog/2024-12-20-2024-year-of-valkey/index.md | Adds extra.type to front matter. |
| content/blog/2024-11-21-testing-the-limits/index.md | Adds extra.type to front matter. |
| content/blog/2024-09-16-valkey-8-ga.md | Adds extra.type to front matter. |
| content/blog/2024-09-13-unlock-one-million-rps-part2.md | Adds extra.type to front matter. |
| content/blog/2024-08-29-valkey-memory-efficiency-8-0.md | Adds extra.type to front matter. |
| content/blog/2024-07-31-valkey-8-0-0-rc1.md | Adds extra.type to front matter. |
| content/blog/2024-07-07-unlock-one-million-rps.md | Adds extra.type to front matter. |
| content/blog/2024-06-27-using-bitnami-valkey-chart/index.md | Adds extra.type to front matter. |
| content/blog/2024-05-24-may-roundup.md | Adds extra.type to front matter. |
| content/blog/2024-04-26-modules-101.md | Adds extra.type to front matter. |
| content/blog/2024-04-16-valkey-7-2-5-out.md | Adds extra.type to front matter. |
| content/blog/2024-04-12-hello-world.md | Adds extra.type to front matter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
|
Reviewing this functionality and apply changes to #468 |
stockholmux
left a comment
There was a problem hiding this comment.
This is a really strange way to try to achieve what I think you're going after.
Use the built-in Taxonomies. It's way more flexible and doesn't require custom logic every time we do a section loop. Taxonomies also gives feeds and doesn't break localizations (not used currently, but requested).
- Replace custom [extra] type with [taxonomies] blog_type - Add blog_type taxonomy to config.toml (render = false) - Update blog.html to use get_taxonomy() for filter dropdown - Update blog-page.html to read from page.taxonomies.blog_type - Remove [extra.blog_types] config and custom build-time validation - Wrap decodeURIComponent in try/catch - Preserve query params when clearing filter Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> # Conflicts: # content/blog/2026-03-10-valkey-search-1_2/index.md
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
stockholmux
left a comment
There was a problem hiding this comment.
I'm broadly okay with this as a start.
We should create a taxonomy_list.html template to drive real HTML rendered pages instead of the drop down selector, as well as turn on taxonomy feeds but I don't think either need to block.
Description
Adds category tags to all blog posts with a filterable dropdown on the blog listing page and badge display on individual post pages.
typefield in its[extra]front matterlocation.pathname + location.searchinstead oflocation.pathnamealone), so existing query parameters are not droppedThe 5 current blog types:
Technical Deep Dive— In-depth technical contentAnnouncements— Releases, new features, project newsCommunity Highlight— Community stories, year-in-review, ecosystemHow-to— Tutorials and guidesEvents— Event recaps and announcementsIssues Resolved
Check List
--signoffBy submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.