Repository navigation
Add site search with Pagefind 1.6 (ranked results, show chips, dev auto-index) - #576
Draft
CGBassPlayer wants to merge 18 commits into
Draft
CGBassPlayer wants to merge 18 commits into
CGBassPlayer wants to merge 18 commits into
Conversation
CGBassPlayer
marked this pull request as ready for review
February 18, 2025 01:00
CGBassPlayer
force-pushed
the
pagefind-search
branch
from
November 2, 2026 02:58
019b3b7 to
fb4b34a
Compare
CGBassPlayer
force-pushed
the
pagefind-search
branch
from
November 2, 2026 03:00
fb4b34a to
2fe0e41
Compare
CGBassPlayer
marked this pull request as draft
November 2, 2026 03:37
This was referenced Nov 2, 2026
# Conflicts: # Dockerfile
This branch has not been deployed
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.
Fixes #26
Depends on #1158 (Hugo 0.169.0 / Bulma 1.0.4). Merge that first.
Adds site-wide search at
/search/, built on Pagefind 1.6.0, with a custom results UI that matches the site theme.What it searches
Episodes (titles, descriptions, tags, show notes), shows, hosts and guests, picks and sponsors.
Ranking
Pagefind's own score is adjusted in
search.js:linux unplugged→ the show page,wes payne→ the person page,1password→ the sponsor).active = false) get their score multiplied by 0.8. Searching an archived show by name still puts it first.Results
How it works
data-pagefind-bodylimits what is indexed (see Unused Generated Pages #539). Episode pages add ISO date, show, type and archived meta, and index their tags, sponsor names and pick titles.data/picks/*.yaml) and sponsors have no pages of their own to index:/sponsors/<name>/pages. Their show comes from the episodes that list them.content/search-index/picks/<name>.md, which renders an index-only page from the data file. The build fails if a stub has no matching data, so a new pick needs a new stub.Builds
Dockerfile: an Alpine stage downloads the pinned Pagefind 1.6.0 binary and indexespublic, then deletespublic/search-indexso the pick stub pages don't ship.make dev: the dev container runshugo server --renderToDiskand indexes the site on first start (a few minutes). After that it re-indexes whenevercontent,dataorthemeschange.dev-metricsuses--entrypoint hugo.Testing
test/e2e/test_search.py(Playwright) covers:Full e2e suite against the production build: 46 passed.
Not covered: Render PR previews don't build an index, so they show the "not available" message.