> vectormatrix.wiki

Pagefind

Tool, static site, by CloudCannon

Assessment

The search for a static site: run it over the output, ship the folder it writes, and nothing is sent anywhere when someone searches. Its lazy-loaded index makes it practical even for thousands of pages.

2026-10-09

Strengths

  • Full-text search for a static site with no server and no third party
  • Indexes the built HTML after any generator; loads only the index chunks a query needs
  • Filters and a drop-in search UI

Limitations

  • Index built at deploy time: new content is not searchable until the next build
  • The UI's defaults need a little CSS to match a site

Pagefind is a search tool that runs after a static site build: it reads the HTML in the output folder, writes a compressed index split into small chunks, and provides a JavaScript client that fetches only the chunks a query touches.[1] The result is full-text search with no search server and no outside service.

What it is for

Any static site that needs search without a backend. It is generator-agnostic: Eleventy, Hugo, Astro and hand-written HTML all work, because it only sees the output.

Things to know

  • Mark the searchable region with data-pagefind-body, or every navigation bar is indexed too.
  • Filters come from data-pagefind-filter attributes in the HTML; a kind or category becomes a facet for free.
  • The bundled UI can be driven from an input elsewhere on the page with triggerSearch, which is how a header search box can open a results panel without a search page.[2]
  • The index folder must be served as static files, including its binary chunks; a server that compresses or rewrites unknown types will break it.

History

  • 2026-10-09: article written and published.
  • 2026-10-09: entry created.

References

  1. Pagefind ^
  2. Pagefind documentation ^

Comments

Public comments on each entry are coming. Nothing is collected here yet.