Replace custom search with Pagefind; upgrade Hugo and Hextra#133
Merged
northdpole merged 6 commits intoOWASP:mainfrom Feb 15, 2026
Merged
Replace custom search with Pagefind; upgrade Hugo and Hextra#133northdpole merged 6 commits intoOWASP:mainfrom
northdpole merged 6 commits intoOWASP:mainfrom
Conversation
Search - Swap the previous header search (plain JS + substring match on index.json) for Pagefind so search is full-text, typo-tolerant, and relevance-ranked. - Keep the same overlay UX: search icon opens overlay, close button and Escape still close it. Pagefind UI is embedded inside the existing overlay. Build and CI - Run Pagefind after the Hugo build in both GitHub workflows (deploy and PR preview) so the live site and previews get an up-to-date search index. Local testing - Add package.json scripts so you can build, index, and serve the site locally: npm run test:site (or build:site, pagefind, serve separately). - Use npx hugo-extended for the local build so it works even when system Hugo is Snap-installed and hits permission errors. - Update README with local test steps and a short note about the Snap workaround .
Search: use Pagefind in header overlay (full-text, typo-tolerant). Add Pagefind build step to deploy and PR workflows. Add package.json scripts and README section for local testing (npm run test:site). Upgrades: Hugo 0.119 → 0.147 extended, Hextra v0.7.3 → v0.11.1 in workflows, hugo.yaml, go.mod, go.sum, and package.json. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Switch to pull_request_target so the workflow runs in the base repo and has access to FIREBASE_SERVICE_ACCOUNT for all PRs. - Check out the PR ref explicitly (refs/pull/N/merge) so the correct branch is built and deployed. Repo owners: add an environment named "preview" in Settings → Environments and set Required reviewers for fork PR previews.\
- Set Cache-Control: no-cache, no-store, must-revalidate for /goto/** so updated redirect targets are used instead of cached responses. - Use 302 (temporary) instead of 301 for all goto redirects so browsers and CDNs cache them less when headings/destinations change.
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.
Search: use Pagefind in header overlay (full-text, typo-tolerant). Add
Pagefind build step to deploy and PR workflows. Add package.json scripts
and README section for local testing (npm run test:site).
Upgrades: Hugo 0.119 → 0.147 extended, Hextra v0.7.3 → v0.11.1 in
workflows, hugo.yaml, go.mod, go.sum, and package.json.
Co-authored-by: Cursor cursoragent@cursor.com