-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Hello! pigweed.dev switched over to PyData Sphinx Theme (PST) last week. We're happy to join the family :)
I managed to cobble together an inline search AKA search-as-you-type UX built on top of Sphinx's built-in search tools:
search-as-you-type.webm
Would you all be interested in me upstreaming this into PST?
Here's the core logic: https://github.com/google/pigweed/blob/03466a70189630fc2d659f919c6f9eb141effe54/docs/_static/js/pigweed.js#L22-L128
It requires loading the built-in search tools on each page: https://github.com/google/pigweed/blob/03466a70189630fc2d659f919c6f9eb141effe54/docs/layout/layout.html#L29-L32
I can set it up as an opt-in feature (i.e. you have to flip some config flag in conf.py
to True
before it's enabled on any site).
It did require using the built-in search tools a bit beyond their intended scope. I can kick off a discussion in the upstream Sphinx repo to check that they're cool with supporting this type of usage.
And of course there's lots of room to improve / polish the UI