Migrate website search to Pagefind#27666
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (395 lines, 12 files), I've queued these reviewers:
How this works
|
|
Thanks for doing this! This is a huge step towards maintaining search while reducing overhead 🎉 A few thoughts: Can you document details in the PR description on any regressions that this migration might add? |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
I updated the PR description with the regressions that we can do in follow up work. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Description
Replace the website's hosted search integration with a static Pagefind index so search works without deployment credentials and can be validated from a local production build.
The website build now generates the Pagefind index after Docusaurus, and a local
SearchBartheme override renders Pagefind's accessible component UI. The Pagefind module loads after React hydration to ensure the live navbar trigger controls the active modal. This also removes obsolete search configuration and deployment variables, updates search styling and documentation, and adds end-to-end coverage for written docs, generated API docs, and search after client-side navigation.For before and after view of the search in the website, see linked item.
Reviewer Guidance
The review process is outlined on this wiki page.
The post-hydration script loading in
SearchBaris intentional; loading the custom elements before hydration can leave the visible trigger connected to a detached modal.Known regressions / follow-up items
SharedTreeprioritize generated API references instead of the current quick-start content, whileFluid Frameworkranks v1 pages first. Boost current conceptual documentation and demote generated or legacy content.Fluid Frameworkreturns 1,198 matches instead of 133 and exposes many heading-level links. Scope indexing to primary content and tune which versions and headings are indexed./search?q=...; the Pagefind modal has no URL-backed equivalent. Add a dedicated search route with query state.Validated with:
pnpm prettierSearchBarnpm run buildvalidateHashes.shnpm run test(5 passed)Fixes AB#77189