Making left sidebar have dropdowns for sub TOCs #318
-
Hi, I am trying to replicate the sidebar on the main furo website: Where the sidebar is collapsed by default and you can open it up to browse the sub-pages. Very nice. However, I cannot figure out how to do this on my site...
In my main TOC in my top level, I link ONLY to However, when the site renders, the subpages are not in a drop down! They are just shown at the same level as the How do I get them to appear as children of the top page? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Getting the sidebar to behave like this (with dropdowns, and dealing with complexity of having a collapse button) is... non-trivial with Sphinx. You can get indentation by having a https://github.com/pradyunsg/furo/blob/0c4018fa730d12dc2144745b75c33b922b7cf7d4/src/furo/navigation.py has most of the HTML adaptation necessary, to get things to work correctly. https://github.com/pradyunsg/furo/blob/0c4018fa730d12dc2144745b75c33b922b7cf7d4/src/furo/assets/styles/components/_sidebar.sass has the relevant stylesheet, for getting the sidebar to look right. |
Beta Was this translation helpful? Give feedback.
-
Are you trying to get sidebar dropdowns in a Furo-based documentation site? Here's a small example of how to do that: index.rst
page.rst
dropdown/index.rst
dropdown/inner.rst
conf.py
This will generate: |
Beta Was this translation helpful? Give feedback.
Are you trying to get sidebar dropdowns in a Furo-based documentation site?
Here's a small example of how to do that:
index.rst
page.rst
dropdown/index.rst
dropdown/inner.rst
conf.py
This will generate: