Skip to content

Build the Pagefind search index in the GitHub Pages workflow - #184

Merged
oruebel merged 2 commits into
mainfrom
build-search-index-on-pages
Oct 9, 2026
Merged

oruebel merged 2 commits into
mainfrom
build-search-index-on-pages

Conversation

@bendichter

Copy link
Copy Markdown
Contributor

Site search does not work on nwb.org. The header loads /pagefind/pagefind-ui.js, which returns 404 there, so the search box never renders. netlify.toml runs Pagefind after the Hugo build, which is why search works in deploy previews, but the workflow that deploys to GitHub Pages did not.

This adds the same step to the workflow. I checked it locally by building with hugo --minify and running npx pagefind --site public. The index is generated for 156 pages and a query returns results. The workflow only runs on push to main, so its first real run is the merge.

🤖 Generated with Claude Code

Site search has not worked on nwb.org because the workflow that deploys to GitHub Pages never built the Pagefind index, so /pagefind/pagefind-ui.js returned 404. The Netlify preview build already runs Pagefind, which is why search worked in deploy previews. The workflow now runs it after the Hugo build.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for nwborg ready!

Name Link
🔨 Latest commit dda461d
🔍 Latest deploy log https://app.netlify.com/projects/nwborg/deploys/6ac937bd9f99880007cff46c
😎 Deploy Preview https://deploy-preview-184--nwborg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@oruebel
oruebel merged commit 874a8d7 into main Oct 9, 2026
6 checks passed
@oruebel
oruebel deleted the build-search-index-on-pages branch October 9, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants