Unify search across sub-sites - #69
Open
ctrueden wants to merge 1 commit into
Open
Conversation
mystmd's own search bar ships disabled here (myst-search-bar-disabled), and even working it would only cover this site's own pages, not the main docs at napari.org. Build a Pagefind index alongside the existing jupyter-book build and inject a widget that merges in the docs site's Pagefind index at query time, since both are served under the same napari.org origin. mystmd has no documented hook for injecting arbitrary <head>/<body> content, so this is done via HTML post-processing after the build rather than through theme config. Note that Pagefind's stock UI leaves .pagefind-ui__results-area transparent, which reads as a broken translucent panel for our floating overlay here (no ambient opaque ancestor like docs' navbar provides). So we give it its own solid background, border, shadow, and scroll, anchored as a dropdown under the search input, to match the main docs.
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 is a companion PR to napari/docs#1093, which aims to unify the search functionality between multiple documentation sub-sites, including
workshopsanddocs. See napari/docs#1093 for full details.For this PR to fully work, it must be merged in conjunction with the one on the
docsside.Here is a screenshot of the workshops search seeing content from docs:
The trailing hash signs are a rough edge that still needs to be sorted out.