sphinx-doc / alabaster

Lightweight, configurable Sphinx theme
http://alabaster.readthedocs.io/
Other
734 stars 186 forks source link

The sidebar does not expand when the ToC depth is limited #167

Open petsuter opened 4 years ago

petsuter commented 4 years ago

Describe the bug The sidebar does not expand when the ToC depth is limited.

To Reproduce Steps to reproduce the behavior:

.. toctree:: :maxdepth: 1

topic

* `sub/topic.rst`:

Subtopic

test

$ make html



* Open `_build/html/index` and see everything looks fine. The sidebar on the left shows "Sub". Also the ToC in the middle shows "Sub". All looks OK.
* Click "Sub" and see ToC in the middle shows "Subtopic" as expected. But the problem is the sidebar still only shows "Sub". It did not expand and does not show "Subtopic"!

[test-sphinx.zip](https://github.com/sphinx-doc/sphinx/files/4213173/test-sphinx.zip)
https://github.com/sphinx-doc/sphinx/issues/7171

**Expected behavior**
The sidebar should expand, even if :maxdepth: is used.

**Environment info**
- OS: Windows 10
- Python version: 3.7.1
- Sphinx version: 2.4.1
- Sphinx extensions:  None
petsuter commented 4 years ago

This is still a problem in Sphinx 3.1.1 / Alabaster 0.7.12