Skip to content
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

globaltoc_maxdepth #7902

Closed
petsuter opened this issue Jul 1, 2020 · 0 comments
Closed

globaltoc_maxdepth #7902

petsuter opened this issue Jul 1, 2020 · 0 comments
Labels
html theme type:enhancement enhance or introduce a new feature
Milestone

Comments

@petsuter
Copy link
Contributor

petsuter commented Jul 1, 2020

Is your feature request related to a problem? Please describe.

It is currently impossible to configure the sidebar TOC to collapse and expand to the current page, while also limiting the local TOC to depth 1.

Small example project from #7171

Describe the solution you'd like

The globaltoc_maxdepth theme option should allow configuring the sidebar independently from the local TOC.
Then:

html_theme_options = {
    'globaltoc_collapse': True,
    'globaltoc_maxdepth': -1,
}

should make the sidebar behave as desired, even when the local TOC's are limited like this:

.. toctree::
   :maxdepth: 1
   
   sub/index

Describe alternatives you've considered
I've tried many combinations of the existing theme options, toctree directive options, :tocdepth:, :titlesonly:, :hidden:, :includehidden:, globaltoc_collapse, collapsiblesidebar etc.

Additional context

@petsuter petsuter added the type:enhancement enhance or introduce a new feature label Jul 1, 2020
@tk0miya tk0miya added this to the 3.2.0 milestone Jul 7, 2020
tk0miya added a commit that referenced this issue Jul 12, 2020
Close #7902: html theme: Add a new option globaltoc_maxdepth
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html theme type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants