I am using the nice sphinx-bootstrap-theme 0.3.4 and trying to apply it on top of Sphinx Python Documentation Generator version 1.2.
When I build the documentation via make html
, I don't get any sidebar, although it's shown to be possible in this example. Neither, I was able to find any option to enable sidebar in the build configuration file (conf.py).
Doing the following:
html_sidebars = {'sidebar': ['localtoc.html', 'sourcelink.html', 'searchbox.html']}
doesn't help.
Thanks for any hint on how it's possible to enable sidebar from such a Sphinx theme.
Just figured it out. This should do the trick.
html_sidebars = {'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html']}
Using this as a reference
Sphinx theming guide html_sidebars
I am experimenting with creating a custom sidebar since I don't like the included options. Using the bootstrap demo index.html I created the following for a custom sidebar. Just name it something like my_custom_sidebar.html
and put it in /source/_templates
<ul class="globaltoc"
>{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=False,includehidden=theme_globaltoc_includehidden|tobool) }}</ul>
Then edit html_sidebars
html_sidebars = {'**': ['my_custom_sidebar.html', 'searchbox.html']}
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