feat(site): migrate search from Pagefind to Algolia DocSearch v4#941
feat(site): migrate search from Pagefind to Algolia DocSearch v4#941
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (5)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (4)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (6)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
- Replace Pagefind integration with Algolia DocSearch v4 - Add two search indices (docs + blog) with framework faceting - Add Ask AI assistant backed by markdown index - Theme DocSearch modal and trigger to match site design system - Add pre-hydration placeholder button for client:idle loading - Add data-search-ignore to Tab layout-stability span - Add getMissingResultsUrl for missing results feedback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove stale references to Ask AI, algolia-crawler-config.md, and old Search/ directory structure. Fix component paths and remove dead .DocSearch-Hit--AskAI CSS selector. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move @docsearch/css import from JS (Search.tsx) into docsearch.css with layer(base) to ensure deterministic load order and correct cascade priority with Tailwind utilities. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Migrates the site’s search implementation from Pagefind (build-time static indexing) to Algolia DocSearch v4 (hosted indexes queried at runtime), including updated crawler-targeting attributes and theming.
Changes:
- Replaced Pagefind UI/integration with a DocSearch React component wired for multi-index search (docs + blog) and framework facet filtering.
- Removed Pagefind-specific build/dev integration and dependencies; updated pages/components to use
data-search-content/data-search-ignore. - Added DocSearch theming CSS and documented the new search setup in project docs.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/styles/globals.css | Imports new DocSearch theme overrides globally. |
| site/src/styles/docsearch.css | Adds DocSearch v4 base CSS import + site-specific light/dark theming and component styling. |
| site/src/search.config.ts | Centralizes Algolia app/key and index names used by the DocSearch component. |
| site/src/pages/docs/framework/[framework]/[...slug].astro | Swaps Pagefind indexing/filter attributes for Algolia crawler attributes on docs content. |
| site/src/pages/blog/[...slug].astro | Swaps Pagefind indexing/sort/meta attributes for Algolia crawler attributes on blog content. |
| site/src/components/docs/FrameworkCase.astro | Updates ignore attribute from Pagefind to the new crawler ignore marker. |
| site/src/components/Tabs.tsx | Ensures hidden layout-stabilizing text isn’t indexed by the crawler/LLM export. |
| site/src/components/Search.tsx | New DocSearch v4 React search component (multi-index + framework facet filter). |
| site/src/components/NavBar/NavBar.astro | Loads the new React search component via client:load in the main navbar. |
| site/src/components/NavBar/NavBarDocs.astro | Loads the new React search component via client:load in the docs navbar. |
| site/package.json | Removes Pagefind deps; adds @docsearch/react and @docsearch/css. |
| site/astro.config.mjs | Removes the Pagefind Astro integration from the build pipeline. |
| site/integrations/pagefind.ts | Deletes the Pagefind integration implementation. |
| site/README.md | Updates repo documentation to reflect the new Algolia-based search approach. |
| site/CLAUDE.md | Updates internal documentation to reflect DocSearch v4 and crawler attributes. |
| pnpm-lock.yaml | Locks dependency graph updates for the DocSearch packages and removals. |
| site/src/components/Search/* (deleted) | Removes the old Pagefind-based Search implementation/assets. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use fixed widths instead of min-width so the button size matches the displayed shortcut key — wider for "Ctrl K" (non-Apple) than "⌘K". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
videojs_docs(relevance-ranked, framework-filtered) andvideojs_blog(recency-ranked)What's included
integrations/pagefind.ts), dependencies (@pagefind/default-ui,sirv), and alldata-pagefind-*attributes@docsearch/css@4and@docsearch/react@4withindicesprop for multi-index searchdata-search-content/data-search-ignoreattributes for crawler content targetingsrc/components/Search.tsx— React component loaded viaclient:loadin both NavBarssrc/search.config.ts— Algolia app ID, public API key, and index namessrc/styles/docsearch.css— DocSearch modal themed to match site design (light + dark)CLAUDE.mdandREADME.mdBefore merging
Test plan
pnpm -F site buildpassespagefindreferences remain in site/ sourcedata-llms-*attributes unaffectedCloses #938
🤖 Generated with Claude Code