Compare Versions - pagefind
npm / pagefind / Compare Versions
Hey! This is a big one, so I thought we'd give a beta release a try. This release addresses a lot of long-standing issues and feature requests, alongside delivering an entirely new search UI.
Pagefind Component UI
This is the main reason for a beta release here. Writing a new ground-up UI system for Pagefind has been a big job, and I would love to get some more eyes on it before we send it out into the world on its stable release.
It's so large, in fact, that it has its own documentation site! If you're itching to see what it looks like, check out https://ui.pagefind.app/ for modals and searchboxes and custom web components and more!
The Component UI is available as vendored files in your /pagefind/ output directory, or it's available as an npm package to install and import.
One big request, for anybody reading this who has or wants to contribute translations, is to go look over the files changed in PR 1005. As part of this new UI, we have a new set of translation strings. Thankfully these could mostly be inferred from existing ones, but overall they need reviews from fluent speakers. โค๏ธ
Search Relevance, and Searching Metadata
Pagefind now searches metadata! Yes, all metadata. By default. Importantly, this means it now searches the title metadata. Matches in titles are now taken into account, and search results are very hard to shake from prime positions if all (or much) of the title matches the search query.
This is also something you can configure! See ๐ Configuring Metadata Weights for how to change this title boost, or apply it to any and all metadata fields of your choosing.
Alongside that, a bunch of weird and wonderful ranking bugs were resolved. I'll write more in the final release notes, but PR 1003 goes into great detail on the various improvements that make searches better across the board. Plus PR 996 covers some of the chunk loading bugs that could also cause corner cases with searches.
Diacritics Support
We finally properly support matching across diacritics. You can now find your cafรฉs without remembering how to type รฉ!
This is, yet again, something you can configure. By default, exact diacritic matches are preferred. So if you're searching "cafe", pages with "cafe" will rank higher than pages with "cafรฉ". Getting this relevance right by default was the final piece of the puzzle for shipping this, which is why it took a while to land. See ๐ Configuring Diacritic Similarity to adjust how this plays out on your site.
Multilingual Improvements
Thanks browsers! Pagefind now taps into Intl.Segmenter to chop search queries in CJK (Chinese, Japanese, Korean) non-whitespace-delimited languages. This was already done during indexing by Pagefind, but users searching still had to delimit their queries. Now searching "่ฟๆฏไธๆฎต็ฎๅ็ๆต่ฏๆๆฌ" searches for the words "่ฟ", "ๆฏ", "ไธๆฎต", "็ฎๅ", "็", "ๆต่ฏ", and "ๆๆฌ", which is also how that sentence was indexed.
Performance!
Pagefind's search now runs in a Web Worker automatically. This doesn't make the search faster, per se, but it dramatically improves perceived performance on large websites by keeping the main thread responsive.
If Web Workers are unavailable, it falls back to the main thread automatically.
More Performance!
Some low-hanging fruit was picked off, and Pagefind's index chunks are now ~45% smaller. The indexing binary (the one you install through npx or your wrapper of choice) is now both smaller (so, faster to download) and faster to run, at least on my macOS machine.
Phew
Most of these things are pretty solid, and the new Component UI is the most in flux. I don't expect it to change much, but be aware nonetheless that some things might change before it stabilises in 1.5.0.
I would love your feedback! Please jump into the GitHub discussion for this release and highlight any issues. This will simmer happily, depending on feedback, for a week or three, so there's room for changes.
If you haven't used a beta release before, simply:
# if you run via npx, sub out `pagefind` for `pagefind@beta`
npx pagefind@beta
# or, if you have it as a dependency:
npm i pagefind@beta
# or, if you use the python distribution:
pip install --pre pagefind
# or, via cargo:
cargo install pagefind --version 1.5.0-beta1
Or download the correct binary from this GitHub Release page.
Hope to hear from you!
Core Features & Improvements
- Added the "Include Characters" option to allow indexing of specific special characters.
- Reduced filesizes for the Pagefind WebAssembly modules.
- Added FreeBSD as a supported platform (PR #813 โ thanks @nguthiru !)
- Fixed an issue where matches in compound words could be ranked with zero weight. (PR #806 โ thanks @teamdandelion !)
Pagefind Playground
- Added the Pagefind Playground
- Optionally hosted as part of your site, the playground gives you a deeper look into how results are calculated.
- Check out the playground for the Pagefind docs at https://pagefind.app/pagefind/playground/
- See ๐ Pagefind Playground to configure and view the playground for your own site.
Modular UI Features & Improvements
- Added option to hide images on result templates in the Modular UI (PR #874 โ thanks @HannesOberreiter !)
- Added a data attribute for result count on the filter pills. (PR #827 โ thanks @cmahnke !)
Default UI Features & Improvements
- Added title attribute to the default UI search input for improved accessibility (PR #798 โ thanks @rdela !)
UI Translations
- Added Thai (th) translations (PR #801 โ thanks @Phon1209 !)
- Added Thai segmenter support when indexing (PR #807 โ thanks @anonymaew !)
- Added Basque (eu) translations (PR #826 โ thanks @erral !)
- Added Norwegian Bokmรฅl (nb) and Norwegian Nynorsk (nn) translations (PR #878 โ thanks @altinnadmin !)
- Added Burmese (my) translations (PR #768 โ thanks @harrymkt !)
Everything Else
- Added a development
justfile, and improved CONTRIBUTING.md (hint hint) - The Pagefind JavaScript should support running in Node.js a bit better (PR #828 โ thanks @justsml !)
Looking Forward
๐ from @bglw โ I thought I'd add a new section to these release notes talking about what's next.
The biggest item on my list is to improve the relevance of the Pagefind search results. With the current setup, you can tweak enough settings to get decent results for a given site, but it needs to better meet the goal of working more-than-good-enough out of the box.
The second-biggest item is to fill out the Modular UI and transition the default Pagefind experience to use that. This has been pending for a long time, and will be a much better base for those who wish to customize their search more than the Default UI currently allows.
Releases also now trigger a GitHub Discussion to be created, so please drop any general thoughts, comments, or feedback there ๐
Core Features & Improvements
- Added
--quietand--silentflags when running the Pagefind CLI, which reduce the logging output to only warnings or only errors respectively. - Stablized the Pagefind Rust library.
- Thanks to @cdxker for leading this in #751 โค๏ธ
- This library interface has feature parity with the Node and Python indexing APIs, and is a great solution for integrating Pagefind indexing into any Rust-based tooling.
Default UI Features & Improvements
- Added a
data-pagefind-ui-metaattribute to the metadata tags on search results in the Default UI, allowing them to be targeted with CSS.- For example, a tag on a result containing
Date: April 19, 2024will now havedata-pagefind-ui-meta="date".
- For example, a tag on a result containing
Fixes & Tweaks
- Fixed an issue where inline metadata would incorrectly render with html-escaped characters.
- Specifically, tagging metadata inline with
data-pagefind-meta="phrase:this < thatwould index the literal<rather than a<character. - This bug didn't occur when using
data-pagefind-metato capture the content of an element.
- Specifically, tagging metadata inline with
- Fixed an issue where matches in compound words could (sometimes) be ranked lower than intended.
- Specifically, for example, matching just the
CannoninCloudCannonmay have ranked the word incorrectly.
- Specifically, for example, matching just the
- Fixed an issue where fragment hashes would change between every Pagefind build.
- Now, if an HTML page has not changed between two Pagefind indexes, the fragment filename will not change.
- This saves you from having to re-upload all fragment files after every Pagefind build.
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.
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)
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
autofocussetting to the Default UI. The default remains off. See ๐ UI > Autofocus. Thanks to @vanbroup for #514 โค๏ธ - Added an
openFilterssetting to the Default UI. See ๐ UI > Open filters. Thanks to @vanbroup for #579 โค๏ธ - Added a
sortsetting to the Default UI. See ๐ UI > Sort. - Added a
triggerFiltersfunction to the Default UI.- The existing
triggerSearchfunction has also been documented. See ๐ UI > Programmatically controlling the Pagefind UI.
- The existing
Fixes & Tweaks
- Fixed a bug where the
forceLanguagesetting 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 !).
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
debouncedSearchreturnsnullif 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 !).
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
- Fixes a bug when indexing some non-breaking spaces on ja/zh language pages in extended mode
Hotfix for Pagefind v1.0.0, restoring default-on support for multilingual word segmentation, and helping resolve packaging issues with new dependencies.
- Fixed the
pagefindnpm wrapper to use thepagefind_extendedrelease, as documented. - Changed
microjsongit dependency to apagefind_microjsoncrate dependency (for now) โ #421 .
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
_pagefindin your site. - NEW: By default, Pagefind 1.x outputs files to a
pagefindin 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
sourceoption has been renamed tosite. - The
bundle-diroption has been renamed tooutput-subdir. - A new
output-pathoption 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
bandwidthwould return zero results, you might get results forbandorban.
- 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
pagefindnpm 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-bodytags 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 !).
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
totalFiltersobject to the search response, containing the total matches for the search term under each filter - JS API: Added an
unfilteredResultCountkey 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
Enterkey - Search / Default UI: Fixed HTML tags in Pagefind excerpts not being escaped. The
contentkey remains unprocessed
Features & Improvements
- CLI: Improved
npxwrapper compatibility on Windows, thanks @tylermercer! - JS API: Added a
debouncedSearchfunction 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
Esckeypress - Default UI: Added UI translations for Swedish, thanks @mntzrr!
- Default UI: Added a
processTermhook that can normalize the search query. See Pagefind UI > Process term - Default UI: Added a
Clearbutton to the search input - Default UI: Added functionality to clear the search input when
Escis 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.
- Avoid using bsdtar in the release flow, as that will sometimes create sparse tar files that some packages cannot decompress. (Fixes lumeland/lume#362)
- Adds UI translations for Galician, Catalร & Spanish, thanks @pvillaverde!
- Fixes Pagefind failing on Safari due to an unsupported regex
- Fixed an issue where merging an index from a fully-qualified domain name would mangle the mapped URLs
- Fixed a corner case where a
data-pagefind-bodytag wouldn't be honored on pages with DOM nodes outside the mainhtmlelement
- Fixed the Windows deployment target
- Updated only deployment targets:
- Pagefind now distributes an
aarch64-apple-darwinbuild for M1 macOS machines- This will provide a speed benefit on these machines by skipping the Rosetta 2 emulation
- Pagefind now distributes an
aarch64-unknown-linux-muslbuild for ARM Linux machines- Useful for ARM Docker images on M1 macOS
- Pagefind now distributes an
- Updated the npm/npx wrapper to reflect the newly available binaries
- Changed HTML parsing to a non-strict mode that will no longer error when encountering parsing ambiguities
- Updated the npm wrapper to respect an exit code returned from the main Pagefind binary
Features & Improvements
- Added the ability to exclude custom selectors via Pagefind config. See the exclude selectors documentation
Fixes & Tweaks
- Fixed an issue where running a multi-site search through Pagefind UI wouldn't wait for all search indexes to be ready
- When the search term
nullis passed, Pagefind returns all results with filters applied.- In the case of a
nullsearch and an empty filters object, Pagefind would previously return zero results. - Pagefind will now return all results in this case.
- In the case of a
- Pagefind can now automatically read gzipped HTML files as its source
- Pagefind's automatic metadata now falls back to the
titleof a page if there is noh1element - Fixed a couple of inconsistent url formatting issues on Windows
- Fix Windows release assets once more
Important Changes
- Removed
<header>from the list of elements that Pagefind automatically ignores- If this element contains content you do not want to be indexed, you will now need to add
data-pagefind-ignore
- If this element contains content you do not want to be indexed, you will now need to add
Features & Improvements
- Added sorting functionality to Pagefind, see the Sorting documentation and the JS API Sorting usage
- Added the functionality to filter an index without searching, by passing
nullas the search query - Added support for custom Pagefind UI strings, see Using custom Pagefind UI strings
- Added a default debounce to the user input for Pagefind UI, and a corresponding
debounceTimeoutMsoption, see Debounce user input- Many thanks to @dprothero for the contribution! ๐
- Added a hook to process results before showing them in Pagefind UI, see the processResult documentation
Fixes & Tweaks
- Fixed running Pagefind on Windows via the npx wrapper
- Pagefind now throws an error if a completely empty index is produced for whatever reason
- Fixed a bug where having exactly one known and one unknown language would drop the known language pages
- Fixed issue where
two<br/>wordswould be indexed astwowordsrather than the correcttwo words - Added
<style>to the list of elements that Pagefind automatically ignores - Fixed the Pagefind UI
showEmptyFiltersoption to work as expected - Fixed issue where adding a filter to a search with zero results would return all results for the filter
- Fixed uncommon bug around chunk boundaries
- For example: If your first search index chunk started with the word
helloand you searched forh, Pagefind would previously not load thehellochunk and would instead return zero results.
- For example: If your first search index chunk started with the word
- Pagefind now gracefully skips pages that fail HTML parsing, and provides more context when these errors are hit.
Important Changes
- For those using the JS API directly, the
pagefind.optionsfunction is now async. This will not break current usage, but using newer options may requireawait pagefind.options({ ... })for them to be applied
Features & Improvements
- Added Multisite search support, allowing you to search multiple indexes from one Pagefind instance. See the new Multisite documentation for more information
- Added a preload function to the JS search API, allowing you to warm Pagefind up before a search, or while the user is typing. See the Preload documentation for more information
- Added a
timingsobject to the JS search API response
Fixes & Tweaks
- Passing a non-existent filter to the search function would previously be silently ignored. This will now return zero results
- Setting your baseURL to an external domain such as
https://example.comwould previously be prepended with a/. This is now handled correctly and will link off-site - Pagefind would previously index search entities such as
"without unescaping them. This is now fixed and these characters will be skipped - Searching for only punctuation would previously return all pages currently loaded into the Pagefind index. This will now return zero results
- Fixed a regression causing searches for hyphenated-phrases to return zero results
- Fixed Pagefind UI failing to match complex language codes such as
zh-hans-twto less complex translation files such aszh-tw
- Added French translations for Pagefind UI โย thanks @nfriedli!
- Fixed standard & extended release archives attached to GitHub releases to be correctly assigned
Features & Improvements
- Multilingual support
- Pagefind now works out of the box for multilingual sites
- Pagefind UI is now translated into
af,de,en,ja,no,pt,ru, &zh - See the multilingual documentation for more information on this feature release
- This release adds a
pagefind_extendedbinary release, which is larger than thepagefindrelease but includes support for indexing Chinese and Japanese languages- (It looks like the release pipeline is misconfigured and published the extended release for both, but in future releases this will be true)
pagefind_extendedis now the default when runningnpx pagefind. The smallerpagefindrelease is still available via the GitHub Release attachments
Fixes & Tweaks
- Improved Pagefind logging and added a
--verboseflag with extra information - Added warnings when Pagefind encounters pages without outer
<html>elements - Added a console warning when Pagefind detects that a cached
pagefind.jsfile was loaded alongside a search index from a newer release
- Oops โ fixes the npx wrapper on Windows
Features & Improvements
- Added prebuilt Windows binaries
- This adds Windows support for running Pagefind via
npx pagefind - Windows binaries can also be downloaded via the GitHub Releases
- This adds Windows support for running Pagefind via
Tฤnฤ koutou katoa โ Fixed an issue where Pagefind could not search for words containing some special characters.
Support Apple Silicon Macs (via Rosetta 2)
- Fixed a form submission error in Pagefind UI causing trouble for some content security policies
- Fixed a visual quirk in the Pagefind UI filters on Safari
Features & Improvements
- The glob that Pagefind uses for finding files to index can now be configured. See Config > Glob
- Added a
data-pagefind-ignore="all"option that does not process filters or metadata within the target element. See Indexing > Removing individual elements from the index - Added a
data-pagefind-default-metaattribute that can provide fallback values for metadata that could not be found on the page. See Metadata > Defining default metadata - UI: Pagefind UI will now check for a
urlkey in a page's metadata that should be used over the generated URL. See UI > Overriding the URL of a result - UI: Added a configuration option for hiding images from the Pagefind UI. See UI > Show images
- UI: Added a configuration option to hide filter values that have no available results given the search query and existing filters. See UI > Show empty filters
- UI: The Pagefind UI filter panel will now default to expanded if there are sufficiently few filters
Fixes & Tweaks
- Server gzip support
- Pagefind implements its own gzip handling, but would fail in the rare case that a server detected the gzipped files and served them such that a browser would decompress them. Pagefind will now identify that these files have already been decompressed rather than error.
- UI: HTML entity improvements
- Fixed the remaining elements in the Pagefind UI that did not correctly render HTML entities.
- UI: Filter state improvements
- Previously, deleting a search term would reset the selected filter values and the open filter groups. This state is now preserved when the search input is empty.
- UI: The Pagefind UI JS and CSS files are now correctly minified
Fixes & Tweaks
- Hash fragment contents using the entire file, to prevent stale content
- Use the image_alt correctly in Pagefind UI
Features & Improvements
- An automatic
image_altmetadata value will be included when returning an automaticimagemetadata value. See Metadata > Default metadata - Multiple filter and metadata keys set can be set per element. See Metadata > Defining multiple keys
- A root selector can now be configured to further restrict Pagefind indexing. See Config > Root selector
- If re-running Pagefind over an output directory, existing hashed files will be reused if present, which will improve hot build speeds for large sites.
- Added latest version to the header of the documentation.
Fixes & Tweaks
- Added
<template>elements to the ignored text index list - Multiple exact matches on a page will no longer be returned as separate results
Changed images in Pagefind UI to contain rather than cover. Relevant CSS variables have changed slightly.
Added a --serve option to the Pagefind CLI that will host the site on a local development server after building the search index.
The first stable 0.x release of Pagefind.