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

Toctree not shown in sidebar #128

Open
thmsklngr opened this issue Oct 12, 2022 · 1 comment
Open

Toctree not shown in sidebar #128

thmsklngr opened this issue Oct 12, 2022 · 1 comment

Comments

@thmsklngr
Copy link

Hi,

I wanted to use this theme for my current project and so I switched from the RTD theme - and I immediately I recognized, that I can't see links in the left sidebar. I also tried to configure it like the one in the repo, but no success. Any hints for me?

Relevant entries in conf.py:

import sphinx_material
extensions.append("sphinx_material")
html_theme_path = sphinx_material.html_theme_path()
html_context = sphinx_material.get_html_context()
html_theme = 'sphinx_material'

html_theme_options = {
    'nav_title': 'My project',
    'globaltoc_depth': 3,
    'globaltoc_collapse': False,
    'globaltoc_includehidden': False,
}

index.rst:

Welcome to My project's documentation!
=====================================

.. toctree::
	:hidden:

	Home<self>

.. toctree::
   :glob:
   :maxdepth: 1
   :caption: Library

   lib/index
   lib/*

.. toctree::
   :glob:
   :maxdepth: 1
   :caption: Modules

   modules/index
   modules/*

The only entry in the sidebar is the title set via 'nav_title'. :(

Regards, Thomas

@mason3k
Copy link

mason3k commented Apr 3, 2023

From the docs:

You must set html_sidebars in order for the side bar to appear. There are four in the complete set.

html_sidebars = {
    "**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
}

You might also want to set 'globaltoc_includehidden' to True if you want to see hidden toctree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants