[{"data":1,"prerenderedAt":89},["ShallowReactive",2],{"hub:tools-pagefind":3},{"path":4,"key":5,"title":6,"h1":7,"description":8,"crumbs":9,"blocks":17},"\u002Ftools\u002Fpagefind\u002F","tools-pagefind","Pagefind and Static Site Search Guides","Pagefind","Guides for static site search with Pagefind: setup in Astro and Hugo, missing results, UI customisation, Lunr comparison and index size budgets.",[10,13,16],[11,12],"Home","\u002F",[14,15],"Tools","\u002Ftools\u002F",[7,4],[18,21,23,26,73,75,77],{"k":19,"text":20},"p","Pagefind indexes the built HTML of a static site and serves search from static files, split into small fragments so readers download only what their query needs. For most documentation and content sites it is the right default, and the guides below cover setting it up with Astro and Hugo, indexing several languages, fitting its UI to a design system, and keeping the index small as a site grows.",{"k":19,"text":22},"When search goes wrong, it usually goes wrong quietly: a layout without the body marker drops whole sections from the index, and readers simply find nothing. One guide works back from missing results to those causes. Two comparisons cover where Pagefind sits among the alternatives: Lunr for very small sites, where a single index is marginally faster, and Algolia DocSearch or a self-hosted Typesense server for very large ones.",{"k":24,"html":25},"fig","\u003Cfigure>\n\u003Csvg viewBox=\"0 0 760 152\" role=\"img\" aria-labelledby=\"hub-pagefind-hero-title hub-pagefind-hero-desc\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Ctitle id=\"hub-pagefind-hero-title\">Pagefind indexing and query flow\u003C\u002Ftitle>\n  \u003Cdesc id=\"hub-pagefind-hero-desc\">Four stages. The site builds to HTML. Pagefind indexes the built pages into fragment files. The browser loads a small entry file when search opens. Each query fetches only the fragments that match.\u003C\u002Fdesc>\n  \u003Crect x=\"0\" y=\"0\" width=\"760\" height=\"152\" fill=\"#ffffff\"\u002F>\n  \u003Cg style=\"font-family:system-ui, sans-serif;font-size:12px\">\n    \u003Crect x=\"20.0\" y=\"64.0\" width=\"154.5\" height=\"71.5\" rx=\"8\" fill=\"#1982c4\" opacity=\"0.14\" stroke=\"#1982c4\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Crect x=\"208.5\" y=\"64.0\" width=\"154.5\" height=\"71.5\" rx=\"8\" fill=\"#6a4c93\" opacity=\"0.14\" stroke=\"#6a4c93\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Cpath d=\"M176.5 99.8 L204.5 99.8\" fill=\"none\" stroke=\"#556071\" style=\"stroke-width:2px;marker-end:url(#hub-pagefind-hero-arrow)\"\u002F>\n    \u003Crect x=\"397.0\" y=\"64.0\" width=\"154.5\" height=\"71.5\" rx=\"8\" fill=\"#ffca3a\" opacity=\"0.24\" stroke=\"#a97b00\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Cpath d=\"M365.0 99.8 L393.0 99.8\" fill=\"none\" stroke=\"#556071\" style=\"stroke-width:2px;marker-end:url(#hub-pagefind-hero-arrow)\"\u002F>\n    \u003Crect x=\"585.5\" y=\"64.0\" width=\"154.5\" height=\"71.5\" rx=\"8\" fill=\"#8ac926\" opacity=\"0.2\" stroke=\"#5a8a16\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Cpath d=\"M553.5 99.8 L581.5 99.8\" fill=\"none\" stroke=\"#556071\" style=\"stroke-width:2px;marker-end:url(#hub-pagefind-hero-arrow)\"\u002F>\n    \u003Ctext x=\"380.0\" y=\"30.0\" fill=\"#1f2937\" style=\"font-size:16px;text-anchor:middle;font-weight:700\">How Pagefind serves search without a server\u003C\u002Ftext>\n    \u003Ctext x=\"97.2\" y=\"97.5\" fill=\"#1f2937\" style=\"font-size:13px;text-anchor:middle;font-weight:700\">Build HTML\u003C\u002Ftext>\n    \u003Ctext x=\"97.2\" y=\"114.4\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">any generator\u003C\u002Ftext>\n    \u003Ctext x=\"285.8\" y=\"90.4\" fill=\"#1f2937\" style=\"font-size:13px;text-anchor:middle;font-weight:700\">Index\u003C\u002Ftext>\n    \u003Ctext x=\"285.8\" y=\"107.3\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">fragments per word\u003C\u002Ftext>\n    \u003Ctext x=\"285.8\" y=\"121.6\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">range\u003C\u002Ftext>\n    \u003Ctext x=\"474.2\" y=\"97.5\" fill=\"#1f2937\" style=\"font-size:13px;text-anchor:middle;font-weight:700\">Open search\u003C\u002Ftext>\n    \u003Ctext x=\"474.2\" y=\"114.4\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">small entry file\u003C\u002Ftext>\n    \u003Ctext x=\"662.8\" y=\"90.4\" fill=\"#1f2937\" style=\"font-size:13px;text-anchor:middle;font-weight:700\">Query\u003C\u002Ftext>\n    \u003Ctext x=\"662.8\" y=\"107.3\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">fetch matching\u003C\u002Ftext>\n    \u003Ctext x=\"662.8\" y=\"121.6\" fill=\"#556071\" style=\"font-size:11px;text-anchor:middle\">fragments\u003C\u002Ftext>\n  \u003C\u002Fg>\n  \u003Cdefs>\n    \u003Cmarker id=\"hub-pagefind-hero-arrow\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\">\n      \u003Cpath d=\"M0 0 L10 5 L0 10 z\" fill=\"#556071\"\u002F>\n    \u003C\u002Fmarker>\n  \u003C\u002Fdefs>\n\u003C\u002Fsvg>\n\u003Cfigcaption>Index size and fragment count are what change as a site grows, which is what the budget guide measures.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>",{"k":27,"h":28,"items":29},"group","Choosing the Right Static Site Generator for Production",[30,35,39,44,48,52,56,60,64,68],{"t":31,"u":32,"d":33,"y":34},"Pagefind vs Algolia DocSearch","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fpagefind-vs-algolia-docsearch\u002F","Build-time Pagefind against hosted Algolia DocSearch on one 2,000-page docs site: relevance, latency, freshness, analytics, privacy and total cost.","Comparison",{"t":36,"u":37,"d":38,"y":34},"Pagefind vs Lunr for Small Documentation Sites","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fpagefind-vs-lunr-for-small-documentation-sites\u002F","Pagefind and Lunr compared on a 150-page docs site: index size, first-query time, relevance, setup effort and maintenance, with the crossover point measured.",{"t":40,"u":41,"d":42,"y":43},"Adding Pagefind to an Astro Site","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fadding-pagefind-to-an-astro-site\u002F","Add Pagefind search to a plain Astro site: post-build indexing, content boundaries, heading weights, a lazy-loaded UI and a CI relevance check.","How-to",{"t":45,"u":46,"d":47,"y":43},"Customizing the Pagefind UI","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fcustomizing-the-pagefind-ui\u002F","Make Pagefind's search UI match your design system: theme variables, filters, result metadata, a modal trigger, or a custom UI on the JavaScript API.",{"t":49,"u":50,"d":51,"y":43},"Indexing Hugo Sites with Pagefind","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Findexing-hugo-sites-with-pagefind\u002F","Add fast, serverless search to a Hugo site with Pagefind: template attributes, taxonomy filters, multilingual output, CI integration and measured build cost.",{"t":53,"u":54,"d":55,"y":43},"Multilingual Search on Static Sites","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fmultilingual-search-on-static-sites\u002F","Build per-language search for a static site: language detection, stemming, compound words, CJK segmentation and keeping each locale's index small.",{"t":57,"u":58,"d":59,"y":43},"Search Index Size Budgets for Large Docs","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fsearch-index-size-budgets-for-large-docs\u002F","Set a byte budget for static search on large documentation sites, measure first-query cost on real phones, and trim indexes that have quietly grown too big.",{"t":61,"u":62,"d":63,"y":43},"Self-Hosting Typesense for a Static Site","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Fself-hosting-typesense-for-a-static-site\u002F","Run Typesense as search for a large static site: index from the build, scoped search keys, typo tolerance, facets, cost and when Pagefind is enough.",{"t":65,"u":66,"d":67,"y":43},"Tracking Zero-Result Searches","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Ftracking-zero-result-searches\u002F","Log searches that return nothing on a static site with Pagefind or a search server, respect privacy, and turn the weekly report into synonyms and new content.",{"t":69,"u":70,"d":71,"y":72},"Fixing Missing Results in Pagefind Indexes","\u002Fchoosing-the-right-static-site-generator-for-production\u002Fsearch-for-static-sites\u002Ffixing-missing-results-in-pagefind-indexes\u002F","Find why pages or sections are missing from Pagefind search results, from data-pagefind-body scoping to build order and language, and verify the index in CI.","Fix",{"k":24,"html":74},"\u003Cfigure>\n\u003Csvg viewBox=\"0 0 760 295\" role=\"img\" aria-labelledby=\"hub-pagefind-kinds-title hub-pagefind-kinds-desc\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Ctitle id=\"hub-pagefind-kinds-title\">Number of Pagefind guides of each kind\u003C\u002Ftitle>\n  \u003Cdesc id=\"hub-pagefind-kinds-desc\">Vertical bars: How-tos 7, Fixes 1, Comparisons 2 and Concepts 0.\u003C\u002Fdesc>\n  \u003Crect x=\"0\" y=\"0\" width=\"760\" height=\"295\" fill=\"#ffffff\"\u002F>\n  \u003Cg style=\"font-family:system-ui, sans-serif;font-size:12px\">\n    \u003Crect x=\"80.0\" y=\"76.0\" width=\"90.0\" height=\"170.0\" rx=\"3\" fill=\"#1982c4\" opacity=\"0.3\" stroke=\"#1982c4\" style=\"stroke-width:1px\"\u002F>\n    \u003Crect x=\"250.0\" y=\"221.7\" width=\"90.0\" height=\"24.3\" rx=\"3\" fill=\"#ff595e\" opacity=\"0.3\" stroke=\"#d83b41\" style=\"stroke-width:1px\"\u002F>\n    \u003Crect x=\"420.0\" y=\"197.4\" width=\"90.0\" height=\"48.6\" rx=\"3\" fill=\"#ffca3a\" opacity=\"0.45\" stroke=\"#a97b00\" style=\"stroke-width:1px\"\u002F>\n    \u003Crect x=\"590.0\" y=\"243.0\" width=\"90.0\" height=\"3.0\" rx=\"3\" fill=\"#6a4c93\" opacity=\"0.3\" stroke=\"#6a4c93\" style=\"stroke-width:1px\"\u002F>\n    \u003Cpath d=\"M30.0 246.0 L730.0 246.0\" fill=\"none\" stroke=\"#556071\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Ctext x=\"380.0\" y=\"30.0\" fill=\"#1f2937\" style=\"font-size:16px;text-anchor:middle;font-weight:700\">Pagefind guides by kind\u003C\u002Ftext>\n    \u003Ctext x=\"125.0\" y=\"69.0\" fill=\"#1f2937\" style=\"font-size:12px;text-anchor:middle;font-weight:700\">7\u003C\u002Ftext>\n    \u003Ctext x=\"125.0\" y=\"264.0\" fill=\"#556071\" style=\"font-size:11.5px;text-anchor:middle\">How-tos\u003C\u002Ftext>\n    \u003Ctext x=\"295.0\" y=\"214.7\" fill=\"#b32b30\" style=\"font-size:12px;text-anchor:middle;font-weight:700\">1\u003C\u002Ftext>\n    \u003Ctext x=\"295.0\" y=\"264.0\" fill=\"#556071\" style=\"font-size:11.5px;text-anchor:middle\">Fixes\u003C\u002Ftext>\n    \u003Ctext x=\"465.0\" y=\"190.4\" fill=\"#1f2937\" style=\"font-size:12px;text-anchor:middle;font-weight:700\">2\u003C\u002Ftext>\n    \u003Ctext x=\"465.0\" y=\"264.0\" fill=\"#556071\" style=\"font-size:11.5px;text-anchor:middle\">Comparisons\u003C\u002Ftext>\n    \u003Ctext x=\"635.0\" y=\"236.0\" fill=\"#1f2937\" style=\"font-size:12px;text-anchor:middle;font-weight:700\">0\u003C\u002Ftext>\n    \u003Ctext x=\"635.0\" y=\"264.0\" fill=\"#556071\" style=\"font-size:11.5px;text-anchor:middle\">Concepts\u003C\u002Ftext>\n  \u003C\u002Fg>\n\u003C\u002Fsvg>\n\u003Cfigcaption>10 guides use Pagefind in depth; each is listed below under the section it belongs to.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>",{"k":24,"html":76},"\u003Cfigure>\n\u003Csvg viewBox=\"0 0 760 108\" role=\"img\" aria-labelledby=\"hub-pagefind-topics-title hub-pagefind-topics-desc\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Ctitle id=\"hub-pagefind-topics-title\">Topics with the most Pagefind guides\u003C\u002Ftitle>\n  \u003Cdesc id=\"hub-pagefind-topics-desc\">Horizontal bars, largest first: Search for Static Sites 10.\u003C\u002Fdesc>\n  \u003Crect x=\"0\" y=\"0\" width=\"760\" height=\"108\" fill=\"#ffffff\"\u002F>\n  \u003Cg style=\"font-family:system-ui, sans-serif;font-size:12px\">\n    \u003Crect x=\"350.0\" y=\"65.0\" width=\"357.2\" height=\"20.0\" rx=\"3\" fill=\"#6a4c93\" opacity=\"0.3\" stroke=\"#6a4c93\" style=\"stroke-width:1px\"\u002F>\n    \u003Cpath d=\"M350.0 60.0 L350.0 90.0\" fill=\"none\" stroke=\"#556071\" style=\"stroke-width:1.5px\"\u002F>\n    \u003Ctext x=\"380.0\" y=\"30.0\" fill=\"#1f2937\" style=\"font-size:16px;text-anchor:middle;font-weight:700\">Where Pagefind comes up\u003C\u002Ftext>\n    \u003Ctext x=\"20.0\" y=\"79.2\" fill=\"#1f2937\" style=\"font-size:12px;text-anchor:start\">Search\u003C\u002Ftext>\n    \u003Ctext x=\"715.2\" y=\"79.5\" fill=\"#1f2937\" style=\"font-size:12px;text-anchor:start;font-weight:700\">10\u003C\u002Ftext>\n  \u003C\u002Fg>\n\u003C\u002Fsvg>\n\u003Cfigcaption>Topic pages give the wider context for each group; the numbers count only guides that use this tool in depth.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>",{"k":27,"h":78,"items":79},"Often used with Pagefind",[80,85],{"t":81,"u":82,"d":83,"y":84},"Astro","\u002Ftools\u002Fastro\u002F","Islands, content collections, astro:assets and deployment.","1 shared guides",{"t":86,"u":87,"d":88,"y":84},"Hugo","\u002Ftools\u002Fhugo\u002F","Build time at scale, image caches, modules and multilingual sites.",1790943190468]