◐ Shell
clean mode source ↗

Don't duplicate the sidebar button on Sphinx 5 and newer by AA-Turner · Pull Request #127 · python/python-docs-theme

The sidebar button is included in the generated HTML from Sphinx 5 onwards (specifically, from sphinx-doc/sphinx@3b01fbe and the changes to themes/classic/layout.html).

We use the sphinx_version_tuple templating variable addded in Sphinx 4.2 to determine if we should add the sidebar button dynamically via JavaScript, or load the pre-existing button element from HTML.

I have tested locally on Sphinx 6.1.3, Sphinx 3.2.0, and Sphinx 4.5.0--all three display correct behaviour with respect to the sidebar.

A