Is there a simple way (i.e., without creating an entirely new theme) to customize Sphinx so that it generates HTML pages without the search box?
Sphinx AutoAPI provides "autodoc" style documentation for multiple programming languages without needing to load, run, or import the project being documented. In contrast to the traditional Sphinx autodoc, which is Python-only and uses code imports, AutoAPI finds and generates documentation by parsing source code.
To support Markdown-based documentation, Sphinx can use MyST-Parser. MyST-Parser is a Docutils bridge to markdown-it-py, a Python package for parsing the CommonMark Markdown flavor.
An alternative, which I discovered reading the alabaster theme documentation is to explicitly list which (if any sidebars) are desired in the conf.py
file. For example, including this fragment in conf.py
:
html_theme = 'alabaster'
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'searchbox.html',
]
}
produces the searchbox; removing searchbox.html
from that list and then building produces the same page but without the box. (More information can be found at the Sphinx documentation for the build-configuration file.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With