Changelog
v1.0.0 (September 13, 2023)
Pagefind 1.0 is here! This release has been many months in the making, and we're thrilled to be bringing some great new features and improvements.
This release also marks a point in time for Pagefind's stability and maturity. Thanks to everyone who has helped out with contributions and feedback in the last year, we're now more confident than ever that Pagefind is a perfect fit with nearly any static website, staying performant and lean even as your site scales.
This 1.0 release includes one breaking change, and some notable non-breaking behavioral changes. A full writeup of these changes and their effects exists in the 📘 Migrating to Pagefind 1.0 guide on Pagefind's website.
_pagefind
in your site.pagefind
in your site.source
option has been renamed to site
.bundle-dir
option has been renamed to output-subdir
.output-path
option has been added.Pagefind now supports configurable weighting for regions of content, which will be used when ranking results and generating excerpts.
Headings are automatically weighted higher, and custom weights can be inserted anywhere in your page.
See 📘 Weighting sections of the page higher or lower for documentation.
Pagefind now tracks headings and IDs when indexing your site. This can be used to show multiple results per page when searching your site, with direct links to the closest parent anchor.
See 📘 Showing multiple results per page for documentation.
The pagefind
package on npm can now be imported as a library into a NodeJS script, giving you programmatic control over indexing content from both disk and memory.
This feature is very open ended — be it integrating Pagefind into a static site generator, or indexing non-static and non-HTML content, we're excited to see what people come up with! Open a discussion on GitHub if you build anything unique that you would like to share!
See 📘 Indexing content using the NodeJS API for documentation.
Pagefind now takes inverse document frequency into account, meaning words that are unique across your site will rank higher than common words.
The ranking algorithm has also been improved across the board, which should result in better search relevance by default.
We're always looking to improve search relevance further, so open an issue on GitHub if you have any examples of searches that don't hit the mark.
Pagefind now better supports indexing various forms of compound words and code, meaning <MyComponent data-pagefind-body>
will now match searches for my, component, data, pagefind, and body.
bandwidth
would return zero results, you might get results for band
or ban
.pagefind
npm package no longer downloads binaries from a GitHub release, and instead has platform-specific dependencies that download only the relevant binary from npm.
data-pagefind-body
tags on a page would conflict if one was nested deeper than the other.pagefind.init()
function has been added, meaning pagefind.options()
can be called before loading assets, allowing you to change the path to load files from.