Skip to content

Add blog post type tags with filtering and build-time validation#488

Merged
stockholmux merged 8 commits into
mainfrom
blog-tags
Apr 7, 2026
Merged

Add blog post type tags with filtering and build-time validation#488
stockholmux merged 8 commits into
mainfrom
blog-tags

Conversation

@madolson
Copy link
Copy Markdown
Member

@madolson madolson commented Apr 2, 2026

Description

Adds category tags to all blog posts with a filterable dropdown on the blog listing page and badge display on individual post pages.

  • Every blog post now has a type field in its [extra] front matter
  • Blog listing page displays a type badge per post and a dropdown to filter by type
  • Individual post pages show the type badge in the metadata header
  • URL hash is preserved correctly when clearing the type filter (location.pathname + location.search instead of location.pathname alone), so existing query parameters are not dropped

The 5 current blog types:

  • Technical Deep Dive — In-depth technical content
  • Announcements — Releases, new features, project news
  • Community Highlight — Community stories, year-in-review, ecosystem
  • How-to — Tutorials and guides
  • Events — Event recaps and announcements

Issues Resolved

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

@madolson madolson requested a review from stockholmux as a code owner April 2, 2026 21:59
@madolson madolson requested a review from Copilot April 2, 2026 22:02
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.type to blog post front matter and defines valid types in config.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.

Comment thread templates/blog.html Outdated
Comment thread templates/blog.html
Comment thread sass/_valkey.scss
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@rlunar
Copy link
Copy Markdown
Member

rlunar commented Apr 2, 2026

Reviewing this functionality and apply changes to #468

@madolson madolson requested a review from rlunar April 3, 2026 00:20
Copy link
Copy Markdown
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread config.toml Outdated
madolson added 3 commits April 7, 2026 08:28
- 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
@madolson madolson requested a review from stockholmux April 7, 2026 19:46
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Comment thread config.toml Outdated
madolson added 2 commits April 7, 2026 12:54
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Copy link
Copy Markdown
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stockholmux stockholmux merged commit f491ea2 into main Apr 7, 2026
3 checks passed
@stockholmux stockholmux deleted the blog-tags branch April 7, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants