Repository navigation
docs(search): Render site search with Pagefind's prebuilt components - #1203
Merged
yurishkuro merged 2 commits intoNov 21, 2026
Merged
Conversation
The navbar search box, its popup and the results list were hand-written on Pagefind's JavaScript API, which left the site to maintain a combobox, debouncing, request cancellation and pagination. Pagefind ships web components that do the same job, so the site now uses those and keeps only a glue script for what they have no setting for: the docs version that a search covers, and the links between the popup and the results page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Yuri Shkuro <github@ysh.us>
yurishkuro
approved these changes
Nov 21, 2026
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Description of the changes
Pagefind already writes a prebuilt set of web components into the site on every build. The navbar search box, its popup and the results page now use those components. The site keeps a glue script, about a quarter of the size of the script it replaces, for what the components have no setting for.
Decisions worth a look
Limitations
Tests
The browser tests are rewritten against the component markup. They assert the version scope through the result links instead of the status text alone, and they cover the popup summary and its links, the results page status, the version badges, the address bar, the version menu, and Enter in the mobile sidebar search box.
Six tests are removed with the code they covered: the three "pending navbar search stays closed" cases, "a late bundle error does not reopen a dismissed popup", "Escape keeps the popup closed when pending result data arrives", and "rapid Show more clicks do not duplicate or skip results". The first five have no replacement, per the dismissal limitation above. The last one has none because the button is gone.
How was this change tested?
1. ✅ Browser tests, including the Content-Security-Policy check
Steps and output
From the repository root:
The run includes the three CSP cases, which load
/, a docs page and the results page under the policy innetlify.tomland fail on any blocked resource. The test for Enter in the mobile sidebar search box fails when the fix it covers is removed.2. ✅ Repository checks
Steps and output
From the repository root:
Checklist
make lint testThe tests are browser tests, and the checks that ran are listed above.
AI Usage in this PR (choose one)
See AI Usage Policy.
🤖 Generated with Claude Code