Static site (2): full-text search with Pagefind - #76
Merged
Conversation
Add a /search/ page powered by Pagefind. npm run build now runs eleventy then pagefind to index the built site. Only recipe pages are indexed (data-pagefind-body), with a Category filter, clean result titles/thumbnails (absolute image meta), and highlighted matches. Search assets are self-hosted in the generated bundle; no external requests. Verified: 487 recipes indexed; querying returns matching recipes with photos. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HpG2vky2XhDtfc6y16TRis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2 of the static-site phase (ADR 0003). Adds full-text search using Pagefind, per the recorded decision.
What changed
/search/page with the Pagefind UI, linked from the header nav.npm run buildnow runseleventy && pagefind --site _site, so the search index is generated from the built HTML.data-pagefind-bodyon the recipe article), with a Category filter (data-pagefind-filter), a clean result title (data-pagefind-meta="title"), and an absolute thumbnail image so result photos load correctly. Tag chips now render with spacing so search excerpts read as words./pagefind/bundle; no external requests (matches the no-hotlinking rule).Verified locally
Next
PR 3: SEO and Recipe JSON-LD. PR 4: the Pages deploy workflow with
github.blimacake.com.🤖 Generated with Claude Code
https://claude.ai/code/session_01HpG2vky2XhDtfc6y16TRis
Generated by Claude Code