diff --git a/docs/superpowers/specs/2026-06-01-blog-search-design.md b/docs/superpowers/specs/2026-06-01-blog-search-design.md new file mode 100644 index 0000000..db45cec --- /dev/null +++ b/docs/superpowers/specs/2026-06-01-blog-search-design.md @@ -0,0 +1,124 @@ +# Blog search — design + +**Date:** 2026-06-01 +**Status:** Approved (pending user spec review) +**Scope:** Add a light, in-page search to `/blog` that filters the existing archive by keyword. + +## Goal + +Let a reader find a blog post on the `/blog` index by typing a keyword or short phrase. Match against the post's title, tag, standfirst/description, and body text. Filter the existing year-grouped archive in place. + +## Non-goals + +- Ranking, fuzzy match, excerpt highlighting (upgrade path: Pagefind). +- URL persistence of the query. +- Sitewide / top-bar search. +- Tag-click-to-filter (separate feature). + +## Approach + +A tiny client-side filter implemented as **data attributes on each row** (no JSON index, no fetch, no React island). + +Each rendered post element carries a `data-search` attribute containing a lowercased, whitespace-collapsed concatenation of its searchable fields. A small inline `