Add site-wide search - #271
Open
Zethson wants to merge 3 commits into
Open
Conversation
Pagefind indexes the built HTML after hugo runs, which matters here because the ecosystem grid and the tutorial cards are rendered by layouts from remote JSON rather than living in content files, so anything reading the markdown would miss the 120 packages and 23 tutorials that people most want to find. The dialog opens from the nav, from / and from ctrl+k, and is driven with the arrow keys and enter. Results are filtered before display: Pagefind matches when an indexed word is a prefix of the search term, so "xylophone" otherwise came back matching "x" on seventeen pages. Closes #269 Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
✅ Deploy Preview for jade-cajeta-1bcca0 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
#packages carried margin-top: 15% where every other section has 5%, which read as
deliberate while it sat directly under the hero demo. Adding a section above it
moved that gap into the middle of the page.
The wide gap now belongs to the demo, so it stays under the hero wherever the next
section happens to be. It has to be set in the nested block: the flat
#interactive-demo-section rule is outranked by section { margin: 0 auto }, which is
why its margin-bottom never did anything.
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
Searching for pertpy returned a blog post that mentions it; the package itself was not in the results at all, because scverse.org has no page per package or per person and Pagefind only knows about pages. layouts/index.entities.json collects the 12 core packages, the 120 registry entries and everyone on the people page into a name index. A name match is pinned above the page results and links to the thing itself: the package's documentation, or the person's GitHub profile. Also fixes the relevance filter, which stripped punctuation from the word Pagefind matched but not from the word that was typed, so "rapids-singlecell" found "rapids-singlecell" and then discarded it. Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
Member
Author
|
@muskanhashim could you please test the search functionality in any way you can think of? Thanks |
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.
Closes #269.
Adds Pagefind-backed search over the built HTML, opened from the nav,
/or ctrl+k, with arrow-key and enter navigation. Package and people names are pinned above the page results and link to the package docs or the person's profile.