Skip to content

Don't include searchbox in singlehtml builds #5359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stsewd opened this issue Feb 27, 2019 · 4 comments · Fixed by #7141
Closed

Don't include searchbox in singlehtml builds #5359

stsewd opened this issue Feb 27, 2019 · 4 comments · Fixed by #7141
Labels
Bug A bug Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented Feb 27, 2019

Search isn't supported in this kind of builders (search.html isn't included).

Building locally doesn't show the search box, but on rtd it's shown, because our builder is named readthedocssinglehtml

Themes check only for https://github.com/rtfd/sphinx_rtd_theme/blob/8c31a26a79702a0ffbb2ee153d4bb054d58087ac/sphinx_rtd_theme/searchbox.html#L1-L1

Should we patch the theme? (problem will still present in other themes) or should we change the way we call our builder or override the builders

@humitos
Copy link
Member

humitos commented Apr 28, 2019

I suppose there should be an option in the theme to disable the searchbox completely. Then, our builder should be called with that option.

This also option will be useful in other cases too.

@ericholscher
Copy link
Member

I don't think this is an RTD issue. Presumably the theme should handle this, no?

@stsewd
Copy link
Member Author

stsewd commented Apr 29, 2020

@ericholscher yeah, the theme should handle this, but it could probably be present in other themes that don't take the readthedocssinglehtml builder into consideration. I can patch our theme if that sounds good

@humitos
Copy link
Member

humitos commented Apr 29, 2020

that don't take the readthedocssinglehtml builder into consideration

As a general comment, we should move away of these specific builder names probably and use a similar approach as the one used in hoverxref extension: we inject our own mixin that changes behavior only where we need it but does not override user's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants