Commit 6cd9eb1
authored
feat(blog): taxonomies and client-side filter UI (#499)
## Summary
Adds two blog-specific taxonomies (`article_types`, `topics`) and a
client-side filter UI on the blog index so readers can narrow `/blog/`
by article type and/or subject area.
## What
**Data model — `hugo.yaml`**
- Registers two new taxonomies: `article_type` / `article_types` and
`topic` / `topics`.
- Preserves Hugo's built-in `tag` and `category` taxonomies so nothing
breaks if they are used later.
**Tagging — every existing post**
- 68 posts tagged across `content/en/blog/` with a combination of:
- `article_types`: `release | how-to | case | tech-article | news`
(usually one).
- `topics`: `platform, postgresql, kubernetes, cilium, talos,
opensearch, kubevirt, networking, storage, security, events, community,
gpu` (zero to three, only when the subject is a main theme of the post —
not incidental mentions).
- Release posts get `platform` by default, plus any headline features
that were clearly the reason for the release (e.g. OpenSearch, GPU
passthrough).
**Filter UI — `layouts/blog/list.html`**
- Overrides the Docsy blog list template. Two rows of chips above the
post list: **Type** (fixed order: release → how-to → case → tech-article
→ news) and **Topic** (auto-sorted).
- Click a chip to toggle. Multiple chips within one dimension combine
with OR; the two dimensions combine with AND.
- State is mirrored into the URL:
`/blog/?types=how-to&topics=postgresql,kubernetes`. Shareable,
back/forward works.
- Live counter: "Showing X of Y posts". Year groups collapse when empty
under the current filter.
- Pagination is dropped — for ~70 posts, showing the full archive once
keeps filtering honest (otherwise filters only affect the visible page).
## Why
Until now, the blog has been strictly chronological with no way to
narrow down. Readers coming in from a community share ("how-to posts
only", "anything about OpenSearch", "Cozystack release history") had to
scroll the full archive.
This change takes advantage of existing structure — most posts already
fall cleanly into one of the five editorial types and a small set of
topics — without introducing new maintenance burden: adding tags to new
posts is a two-line frontmatter change.
## Preview
Netlify deploy preview will render the full filter UI on `/blog/`.
Things worth checking:
- Chip layout on mobile (should wrap gracefully).
- Empty-state when a filter combination matches zero posts.
- URL deep-linking: open `/blog/?types=release&topics=platform` directly
and the chips should arrive pre-selected.
- Dark-mode contrast on chips (uses Bootstrap CSS variables).
## Follow-ups (not in this PR)
- Make post tags on each card clickable so they act as filter shortcuts
(currently they go to the Hugo-generated taxonomy list pages at
`/article-types/<slug>/` and `/topics/<slug>/`, which still work but are
separate URLs).
- Optional: server-rendered filter state for SEO on common filter
combinations.70 files changed
Lines changed: 555 additions & 36 deletions
File tree
- content/en/blog
- 2024-04-05-diy-create-your-own-cloud-with-kubernetes-part-1
- 2024-04-05-diy-create-your-own-cloud-with-kubernetes-part-2
- 2024-04-05-diy-create-your-own-cloud-with-kubernetes-part-3
- 2025-12-12-flux-aio-kubernetes-mtls-and-the-chicken-and-egg-problem
- 2026-04-06-cozysummit-virtual-2026-the-program-is-set
- 2026-04-08-cozystack-oss-health-section
- 2026-04-17-managed-postgresql-synchronous-replication
- cozystack-1-0-release
- game-servers-on-cozystack-no-april-fools-joke
- layouts/blog
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
0 commit comments