From 9e8dfaedb7685bfa2a223141deb4b902729cd366 Mon Sep 17 00:00:00 2001 From: Josh Bairstow Date: Mon, 1 Jun 2026 23:45:06 +1000 Subject: [PATCH] docs: spec for light blog search Tiny client-side filter on /blog using data-search attributes on each row. No new deps, no JSON index, no React island. Filters in place within the year-grouped archive. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../specs/2026-06-01-blog-search-design.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 docs/superpowers/specs/2026-06-01-blog-search-design.md 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 `