bashtage/sphinx-material

Support for RTD Sphinx Search

Closed this issue · 5 comments

The readthedocs sphinx search is quite a useful addition to enable documentation users to get a dynamic experience when searching for resources in the documentation. Currently it seems that the theme doesn't support it when enabled as an extension, potentially just due to some missing class in the search bar.

More info on RTD sphinx search extension: https://readthedocs-sphinx-search.readthedocs.io/en/latest/?rtd_search=this%20is%20the

Demo in RTD sphinx search page: https://readthedocs-sphinx-search.readthedocs.io/en/latest/?rtd_search=testing

It doesn't seem to have role="search" on the input box.

This works as expected. Note that this search only works on RTD.

https://sphinx-material.readthedocs.io/en/latest/?rtd_search=rst

Oh awesome - yeah that looks great, thank you @bashtage. Just to clarify, the fix woudl be to manually add a template on our side that has the "search" role, or how would you recommend enabling this?

No code changes needed. Just install and then add the extension to conf.py, and publish on RTD. The frustrating thing here is that it won't work locally -- maybe RTD provides a backend server?

Interesting, ok let me give that a try and update on results. Thank you @bashtage