Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements client-side search functionality using Pagefind, following patterns from Starlight and astro-pagefind projects. The implementation enables framework-aware and style-aware search across documentation and blog content.
Key changes:
- Integrated Pagefind search with custom UI component and Astro integration for indexing
- Introduced nanostore-based preference management system with bidirectional cookie synchronization
- Added
getSectionsForGuideutility to retrieve hierarchical section labels for documentation structure
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| site/integrations/pagefind.ts | Custom Astro integration for running Pagefind indexer post-build and serving index in dev mode |
| site/src/components/Search/Search.tsx | React component wrapping Pagefind UI with dialog, keyboard shortcuts, and framework/style filtering |
| site/src/components/Search/Search.astro | Astro wrapper providing CSS customization and platform-specific keyboard shortcut detection |
| site/src/stores/preferences.ts | Nanostore atoms for managing current framework and style preferences |
| site/src/components/docs/PreferenceSync.tsx | Component synchronizing preference stores with cookies bidirectionally |
| site/src/components/docs/PreferenceUpdater.tsx | Updated to set nanostore values instead of directly managing cookies |
| site/src/utils/docs/preferences.ts | Added getPreferenceClient for reading preferences from client-side cookies |
| site/src/utils/docs/sidebar.ts | Added getSectionsForGuide to extract hierarchical section labels for a guide |
| site/src/pages/docs/framework/[framework]/style/[style]/[...slug].astro | Added Pagefind data attributes and section metadata to article elements |
| site/src/pages/blog/[...slug].astro | Added Pagefind indexing attributes to blog posts with author metadata |
| site/src/components/docs/StyleCase.astro | Added conditional Pagefind ignore attribute for hidden content |
| site/src/components/docs/FrameworkCase.astro | Added conditional Pagefind ignore attribute for hidden content |
| site/src/utils/jsonLd/schemas.ts | Added optional articleSection parameter to TechArticle schema |
| site/src/components/NavBar/NavBar.astro | Integrated Search component in navigation bar |
| site/src/layouts/Base.astro | Added PreferenceSync component to base layout |
| site/src/components/FormattedDate.astro | Extended component to accept additional HTML attributes |
| site/src/styles/globals.css | Added styles for mark, strong, and bold elements |
| site/package.json | Added @pagefind/default-ui and sirv dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
what's new?
getSectionsForGuideso we can index a guide's sectionmarkstyles (andbandstrongwhile we're in the neighborhood)future work