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
The sidebar does not expand when the ToC depth is limited #7171
Comments
This is still a problem in Sphinx 3.1.1 |
So you are suggesting that the I don't think that's a good idea. If this were changed, people would come and complain that they specified Some people will complain either way, but I think the current behavior is more consistent. |
I can not speak for everyone. But to me it is very weird that these two things are coupled together. Why does the local maxdepth affect the global sidebar? Maybe I'm misunderstanding something or am not aware of other options. I expect the sidebar to expand to show the location of the current subpage in the toc, while the ToC in the middle shows just the next level of sub-pages. I would have guessed that there are maybe some I don't suggest changing existing behavior if others think it is working as intended. To me at the moment it seems broken, but I'm happy to change my files and use some other setting that gives the desired result. |
I agree.
This depends on the theme, some theme have options like this. I've recently added the options You might probably be interested in this? But note that this would be a global setting for the whole TOC. So this might still not be fine-grained enough for your needs? |
Thanks for the pointers. I now tried changing Do I understand correctly that the desired behavior I described above would be achieved (once the option is implemented) by this configuration:
As suggested I opened issue #7902 to request it to be implemented. |
Yes, that's how you would use it. But IIRC, And I guess the "unlimited" value for "maxdepth" would be See https://www.sphinx-doc.org/en/master/templating.html#toctree. |
Ah, |
I just post #7925 to add |
Describe the bug
The sidebar does not expand when the ToC depth is limited.
To Reproduce
Steps to reproduce the behavior:
sphinx-quickstart
and select all defaults (Alabaster theme)index.rst
:sub/index.rst
:sub/topic.rst
:_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.test-sphinx.zip
Expected behavior
The sidebar should expand, even if :maxdepth: is used.
Environment info
The text was updated successfully, but these errors were encountered: