You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a page contains lots of headings and subheadings, if we generate localtoc in sidebar, the sidebar would be too long to display and it doesn't support scroll well, sometimes even overflows the footer. So, could localtoc support a depth option and then we can control the length of sidebar?
The text was updated successfully, but these errors were encountered:
Hi @40huo, it shouldn't be too painful to support this. PR would be welcome, in the PR it would be nice if you included a simple demo website.
You mention a specified page. Adding localtoc_depth = X would be a global setting. One thing you might try before jumping in on this is to see if you can use the miscellaneous markup for :tocdepth: on the page in question. You put these meta-tags at the top of the reStructuredText document:
:tocdepth: 2
My First Heading
================
The rest of the document...
However, I believe that will affect both the global and local toc. But worth a shot since it's easy to test!
If you want to do give it a go, you'll need to edit
Currently, it looks like localtoc.html is not actually used, but instead it's getting done in navbartoc.html. I'm not really sure. But basically, you'd need to play around, the resultant localtoc.html should probably get included instead. You should use globaltoc.html as a reference.
For a page contains lots of headings and subheadings, if we generate localtoc in sidebar, the sidebar would be too long to display and it doesn't support scroll well, sometimes even overflows the footer. So, could localtoc support a
depth
option and then we can control the length of sidebar?The text was updated successfully, but these errors were encountered: