feat(search): add full text search support via pagefind#1
Open
brodienguyen wants to merge 1 commit intohunvreus:mainfrom
Open
feat(search): add full text search support via pagefind#1brodienguyen wants to merge 1 commit intohunvreus:mainfrom
brodienguyen wants to merge 1 commit intohunvreus:mainfrom
Conversation
Integrates Pagefind for full-text documentation search via the command dialog. Adds search result rendering, highlights, and error/empty states in styles and templates. Updates build/dev scripts to index with Pagefind and marks searchable content in layouts.
brodienguyen
commented
Dec 27, 2025
| "build": "npm run clean && npm run basecoat && npx tailwindcss -i ./src/css/styles.css -o ./assets/styles.css --minify && npx @11ty/eleventy", | ||
| "dev": "npm run basecoat && concurrently \"npx @11ty/eleventy --serve\" \"npx tailwindcss -i ./src/css/styles.css -o ./assets/styles.css --watch\"" | ||
| "build": "npm run clean && npm run basecoat && npx tailwindcss -i ./src/css/styles.css -o ./assets/styles.css --minify && npx @11ty/eleventy && npx pagefind --site _site", | ||
| "dev": "npm run basecoat && npx @11ty/eleventy && npx pagefind --site _site && concurrently \"npx @11ty/eleventy --serve\" \"npx tailwindcss -i ./src/css/styles.css -o ./assets/styles.css --watch\"" |
Author
There was a problem hiding this comment.
This ensures Pagefind has content to index on first run. Slight delay at startup but search works immediately. It would be great that pagefind can be run in the watch mode but I am not yet figure out how to solve it neatly. Any suggestions are more than welcome
Owner
|
I'll have a look, but I need the Command and Combobox components in Basecoat to properly support async items. |
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.
This pull request introduces Pagefind-powered full-text search to the documentation site, integrating it into the command dialog for a seamless search experience. The implementation includes lazy-loading the Pagefind library, updating the build process, and enhancing accessibility and search metadata. Additional CSS and markup changes ensure the search dialog is visually integrated and results are clearly presented.
Pagefind Search Integration
assets/pagefind-search.jsscript to lazy-load Pagefind and render search results in the command dialog, including debounced input handling and error states._includes/partials/docs/header.njkto support Pagefind search by passing adata-pagefind-searchattribute._includes/layouts/base.njk).package.jsonto run Pagefind indexing, and addedpagefindas a dev dependency. [1] [2]Search Metadata and Accessibility
data-pagefind-body,data-pagefind-meta, anddata-pagefind-ignoreto optimize search indexing and results. [1] [2] [3]Styling for Search Dialog and Results
assets/styles.cssandsrc/css/custom.cssto style the search dialog, results, highlights, and various states (empty, loading, error), including new color variables and container sizes. [1] [2] [3] [4] [5] [6]Full text search dialog

How it works
