Skip to content

Replace custom search with Pagefind; upgrade Hugo and Hextra#133

Merged
northdpole merged 6 commits intoOWASP:mainfrom
northdpole:main
Feb 15, 2026
Merged

Replace custom search with Pagefind; upgrade Hugo and Hextra#133
northdpole merged 6 commits intoOWASP:mainfrom
northdpole:main

Conversation

@northdpole
Copy link
Collaborator

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

northdpole and others added 4 commits February 15, 2026 19:22
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.
@northdpole northdpole merged commit c10c99e into OWASP:main Feb 15, 2026
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.

1 participant