Pagefind
Fully static search library that adds fast, low-bandwidth full-text search to static websites without requiring a backend or external service.
Pagefind is an open-source static search library designed to provide efficient full-text search for static websites without needing any server infrastructure or hosted search service. It is built to work with any static site generator by indexing the final built HTML output and generating a lightweight search bundle that runs entirely in the browser.
The system works by scanning a site after it has been generated and creating a compressed, chunked search index. This index is then shipped alongside the static site files. When a user performs a search, only the relevant portions of the index are loaded, minimizing bandwidth usage and ensuring fast performance even on large sites. This design allows Pagefind to scale to sites with thousands or even tens of thousands of pages while keeping client-side payloads small.
Pagefind exposes a JavaScript search API and also provides prebuilt UI components that can be dropped into a site with minimal configuration. It supports features such as filtering, metadata-based search, multilingual indexing, and fine-grained control over what content is included in the index. It can also index non-standard content types through extensions and programmatic APIs.
The tool is typically run as part of a build step using a CLI command (e.g., via npx), which generates the search index inside the output directory of static site generators such as Hugo, Eleventy, or Astro.
Pagefind is designed for performance and simplicity, targeting documentation sites, blogs, and content-heavy static sites that need search without the complexity, cost, or latency of external search services.
Key features include:
- Fully static, client-side search with no backend required
- Chunked search index for low bandwidth usage
- Prebuilt UI components for quick integration
- Supports large-scale sites (thousands of pages)
- Metadata filtering and customizable indexing rules
- Works with any static site generator
Common use cases include:
- Adding search to documentation sites
- Static blogs
- Knowledge bases
- Developer portals
- JAMstack applications where backend services are not desired
Pagefind is an open-source project originally created by CloudCannon, focused on making fast, scalable static site search accessible without external infrastructure.
Comments
0Markdown is supported.