Releases: CloudCannon/pagefind
v1.2.0
Core Features & Improvements
- Added Python bindings for indexing sites with Pagefind. This has feature parity with the Node/npx binary wrapper for running Pagefind, as well as feature parity with the NodeJS Indexing API for Pagefind.
- Enormous thanks to @SKalt for implementing this in #672 ❤️
- For documentation, see 📘 Installation > Running via Python, and 📘 Using the Python API.
UI Translations
- Fixed Catalan translations (PR #718 — thanks @danurbanowicz !).
- *️⃣ Added Persian translations (PR #690 — thanks @YektaDev !).
- *️⃣ Added Hebrew translations (PR #453 — thanks @nirtamir2 !).
- *️⃣ Added Arabic translations (PR #533 — thanks @jermanuts !).
*️⃣ : These languages are the first right-to-left languages in the translation set.
Please open any issues if improvements can be made to the Pagefind UI libraries when rendered for these RTL languages.
v1.1.1
Fixes & Tweaks
- Fixes an issue where internal anchor and weight tokens would leak when captured in meta or filter attributes.
- Improves segmentation for extended languages (PR #600 — thanks @hamano !).
- Improves Pagefind's processing of "index.html" URLs (PR #604 — thanks @dscho !).
- Fixes some instances of incorrect types in the Pagefind NodeJS API (PRs #642 & #655 — thanks @vanyauhalin & SKalt !).
UI Translations
- Added Swahili translations
Secutiry
- Fix potential DOM clobbering when initializing Pagefind (Advisory GHSA-gprj-6m2f-j9hx)
v1.1.0
Core Features & Improvements
- Improved Pagefind's core result ranking algorithm to align with BM25. For existing sites, this will change the ordering of search results, and should provide better relevance for search results by default.
- Added the abitity to configure Pagefind's ranking algorithm.
- Certain categories of site (i.e. reference documentation) can benefit from tweaks to the way pages are ranked. To support this, a set of ranking parameters are now configurable. Enormous thanks to @dscho for kicking off this work in #534 ❤️
- See 📘 Customize ranking to read up on the new ranking parameters.
Default UI Features & Improvements
- Added an
autofocus
setting to the Default UI. The default remains off. See 📘 UI > Autofocus. Thanks to @vanbroup for #514 ❤️ - Added an
openFilters
setting to the Default UI. See 📘 UI > Open filters. Thanks to @vanbroup for #579 ❤️ - Added a
sort
setting to the Default UI. See 📘 UI > Sort. - Added a
triggerFilters
function to the Default UI.- The existing
triggerSearch
function has also been documented. See 📘 UI > Programmatically controlling the Pagefind UI.
- The existing
Fixes & Tweaks
- Fixed a bug where the
forceLanguage
setting would not take priority when using the NodeJS Indexing API. - Fixed a bug where zero-width spaces in the source content could cause errors in search excerpts.
UI Translations
- Added Ukranian translations (PR #523 — thanks @vladdnepr !).
- Added Romanian translations (PR #541 — thanks @mateesville93 !).
- Added Czech translations (PR #543 — thanks @dallyh !).
- Added Korean translations (PR #583 — thanks @seokho-son !).
- Improved Japanese translations (PR #560 — thanks @hamano !).
v1.0.4
Features & Improvements
- Added highlighting support to Pagefind. Massive thanks to @Jothsa for pushing this across the line in #425! 🎉
- See 📘 Highlighting search terms for documentation on how to enable this new feature.
- Added a page size option to the Default UI. See 📘 UI Configuration > Page size.
- Added a
destroy()
function to the Pagefind JS API, allowing for a total re-initialization. See 📘 Re-initializing the search API. - Added a
destroy()
function to the Pagefind Default UI, allowing for a total re-initialization. See 📘 Re-initializing the Pagefind UI.
Fixes & Tweaks
- Fixed a bug, resulting in a (very) large improvement to the NodeJS Indexing API performance (~100x).
- Fixed HTML entities being rendered escaped in metadata, filters, and custom page titles.
- Fixed a bug where
debouncedSearch
returnsnull
if any options object is passed to it. - Fixed a bug where a fully-qualified URL set via the NodeJS indexing API would be broken when returned as a search result.
- Fixed Pagefind's reporting of really fast indexing times (previously logged as slower than reality) — thanks to @danpls in #448.
- Fixed extracting sub-results when headings contain non-ascii text (especially RTL languages).
UI Translations
- Added Māori translations (PR #436 — thanks @Yoda-Soda !).
- Added Croatian translations (PR #440 — thanks @diomed !).
- Added Hungarian translations (PR #451 — thanks @adamlaki !).
- Added Bengali translations (PR #454 — thanks @marufmax !).
- Added Vietnamese translations (PR #467 — thanks @AREA44 !).
- Added Polish translations (PR #495 — thanks @KredensKuchenny !).
- Added Danish translations (PR #501 — thanks @jonassmedegaard !).
v1.0.3
Hopefully the last hotfix for now — bugfixes only important for sites indexing Japanese or Chinese pages.
- Fixes a bug indexing ja/zh language pages containing weighting or element IDs
- Removes eager warnings being logged to the browser console if bunding the UI JavaScript files
- Adds a
.close()
function to the Pagefind NodeJS API, to help clean up the process when it is no longer required
v1.0.2
- Fixes a bug when indexing some non-breaking spaces on ja/zh language pages in extended mode
v1.0.1 — A quick hotfix!
Hotfix for Pagefind v1.0.0, restoring default-on support for multilingual word segmentation, and helping resolve packaging issues with new dependencies.
- Fixed the
pagefind
npm wrapper to use thepagefind_extended
release, as documented. - Changed
microjson
git dependency to apagefind_microjson
crate dependency (for now) — #421 .
Pagefind v1.0.0 — Stable static search at scale ✨ 🚀
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.
‼️ Breaking Changes
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.
- BREAKING:
- PREVIOUS: By default, Pagefind 0.x outputs files to a
_pagefind
in your site. - NEW: By default, Pagefind 1.x outputs files to a
pagefind
in your site. - More details on this change can be found in the [📘 migration guide].
- PREVIOUS: By default, Pagefind 0.x outputs files to a
⚠️ Behavioral Changes
- Changes to CLI options [📘 migration guide]:
- The
source
option has been renamed tosite
. - The
bundle-dir
option has been renamed tooutput-subdir
. - A new
output-path
option has been added.
- The
- Search indexing and ranking changes will cause result lists to differ from 0.x [📘 migration guide].
- The JS API initializes Pagefind at a different stage of execution [📘 migration guide].
🎉 New Features!
✨ Content weighting ✨
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.
✨ Sub results ✨
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.
✨ NodeJS indexing API ✨
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.
✨ Greatly improved ranking and relevancy ✨
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.
✨ Indexing compound words and code ✨
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.
🎉 More Features & Improvements
- Pagefind now returns results for a prefix of the search word if there would otherwise be zero results:
- e.g. if searching for
bandwidth
would return zero results, you might get results forband
orban
.
- e.g. if searching for
- Pagefind can now search for emoji 🎉🚀✨.
- Do you filter more than you search? For those using the JS API directly, Pagefind now supports complex compound filtering:
- Pagefind is now smarter at generating excerpts, returning the most dense region of search hits on the page.
- Excerpt calculation also integrates with the new weighting feature, and will favor areas of the page with higher weighted words.
- The
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.- This improves the installation speed of Pagefind through npm/npx, and also removes the need for any postinstall script making the entire process more reliable.
- The Default UI now supports being passed an HTMLElement directly, as an alternative to a selector (PR #331 — thanks @stefanprobst).
- The length of excerpts that Pagefind generates can now be customized:
Fixes & Tweaks
- CLI: Fixed an issue where multiple
data-pagefind-body
tags on a page would conflict if one was nested deeper than the other. - CLI: Fixed builds for some Windows systems that were missing vcruntime.
- JS API: A new
pagefind.init()
function has been added, meaningpagefind.options()
can be called before loading assets, allowing you to change the path to load files from. - JS API: Performance searching very large sites for short terms should be improved.
- JS API: Passing an empty array for a filter value now behaves as if the filter was not supplied, instead of returning zero results.
- Default UI: Don't reset the browser-provided outlines when resetting UI styles.
- Default UI: Fixed an issue where titles containing HTML elements were not correctly escaped.
- Default UI: Improved the search input on mobile devices (PR #368 — thanks @valtlai !).
- Default UI: Fixed an issue where some UI strings would appear in English instead of the translated language.
UI Translations
- Added Indonesian translations (PR #273 — thanks @nixentric !).
- Added Serbian translations (PR #285 — thanks @DigitLib !).
- Added Italian translations (PR #323 — thanks @apjanco !).
- Added Hindi translations (PR #324 — thanks @Amitind !).
- Added Finnish translations (PR #366 — thanks @valtlai !).
- Added Turkish translations (PR #395 — thanks @taylanbildik !).
- Added Tamil translations (PR #402 — thanks @sanjaiyan-dev !).
v0.12.0
Note: v0.12.0 will likely be the last feature release before an upcoming v1.0.0 that will contain a small handful of breaking changes. See the v1.0.0 milestone on GitHub for details and updates.
Features & Improvements
- CLI: Added a "Keep Index URL" setting. (PR #233 — thanks @kenpetti-toasttab !). See Pagefind CLI > Keep Index URL
- JS API: Added a
totalFilters
object to the search response, containing the total matches for the search term under each filter - JS API: Added an
unfilteredResultCount
key to the search response, containing the total matches for the search term if no filters were applied
Fixes & Tweaks
- CLI: Stopped warning when encountering
data-pagefind-ignore="true"
instead ofdata-pagefind-ignore
- Search: Fixed merging filters from multiple indexes
- Default UI: Fixed filters sticking open once search input has been focused
- Default UI: Fixed the search input clearing when hitting the
Enter
key - Search / Default UI: Fixed HTML tags in Pagefind excerpts not being escaped. The
content
key remains unprocessed
v0.11.0
Features & Improvements
- CLI: Improved
npx
wrapper compatibility on Windows, thanks @tylermercer! - JS API: Added a
debouncedSearch
function to the JS API. See Pagefind JS API > Debounced search - Default UI: Added a "Clear" button to the search input
- Default UI: Clear the search input on an
Esc
keypress - Default UI: Added UI translations for Swedish, thanks @mntzrr!
- Default UI: Added a
processTerm
hook that can normalize the search query. See Pagefind UI > Process term - Default UI: Added a
Clear
button to the search input - Default UI: Added functionality to clear the search input when
Esc
is pressed while the input is focused - Default UI: Published UI to npm under @pagefind/default-ui, as an alternative to using the files output by the Pagefind CLI
Fixes & Tweaks
- Default UI: Fixed a syntax error in the CSS
Prelease: Modular UI
- Work is underway on a new "Modular UI" that will live alongside the current "Default UI". Full support and documentation will be provided in a future release — the prerelease version can be found on npm under @pagefind/modular-ui
- As this package is still under development, some of the configuration may change in a future release. Make sure to pin your Pagefind versions for any production site relying on the Modular UI.