Repository navigation
Search with Pagefind - #68
Merged
Merged
Conversation
pd build indexes each page's own content (its rendered body, never the layout's markup) with the project's own Pagefind and writes the index to _pd/search/ under the site's path, with section, tag and category filters. storefront.search: left out, on when the project has Pagefind; true stops a build without it; false turns it off. The 404 page, tag and category pages and pages with index: false are left out. pd build --browser serves the index from memory and uses the site's search field once per viewport. pd dev builds no index and says so at start.
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.
0.5.0 step 5: site search, built by
pd buildwith the project's own Pagefind._pd/search/under the site's path. Filters:section(the page's collection),tag,category, by label.index: false. Drafts and scheduled pages are never built.storefront.search: left out, on when the project has Pagefind (npm install --save-dev pagefind);truestops a build without it;falseturns it off.pd build --browser: serves the index from memory and uses the first search field per viewport: no result within 5 s stops the build; axe runs again on the results.pd dev: no index (saves stay as fast), and a start-up line says so.components/search(a<search>landmark, labelled field, announced status, results with title, section and passage; section filter; works as a plain form without script) on a search page.Pagefind 1.6.0, MIT, one platform binary of 12 to 14 MB per machine; root devDependency only.
Tests: unit (record, exclusions, document, index, config, start-up note), bench E2E (a word finds its page, the filter narrows, a listing teaser word finds the page not the listing, a draft word finds nothing, under a path, without Pagefind),
--browserwith a dead search field, the static bench serves its index. Golden G0 unchanged.