Re: [sphinx-users] How to set local toc level?

8 views
Skip to first unread message

Matt from Documatt

unread,
Jun 15, 2020, 4:23:28 AM6/15/20
to sphinx...@googlegroups.com
I think that toc variable, unlike toctree (https://www.sphinx-doc.org/en/master/templating.html#toctree), can't control its depth. They both generate <ul> list and one workaround I'm using is to hide deeper lists with CSS.

Have a look at this snippet  https://codepen.io/mattdocumatt/pen/NWxrQqB that demonstrates it. 

Matt


On Thu, May 14, 2020 at 9:03 AM Magic X <madj...@gmail.com> wrote:
Hi,

I'm going to using the 'toc' variable in a html template to produce local TOC for the current document in the sidebar, is it possible to control the TOC max depth?

--
You received this message because you are subscribed to the Google Groups "sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/828ac1c3-dc24-44f8-b851-a31d5c5d6654%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages