Add the ability to have hidden pages from primary TOC
See original GitHub issueIs your feature request related to a problem? Please describe.
We are migrating one of our projects and would like to build a few pages but not have them show up in the Table of Contents (TOC). The use case is a troubleshooting
page that is linked by other pages but doesn’t need to be in the general table of contents listing.
Previously in sphinx
we used :hidden:
option in .. toctree::
directives but jupyter-book
uses this in the template when building toctree’s from yaml so they don’t show up in the content pane.
Describe the solution you’d like
Ability to add hidden: true
to _toc.yml
which would
- keep the document in the hidden
sphinx
toctree - remove it from the left hand overall TOC column (in reference to
sphinx-book-theme
)
Example:
- file: chapter1
- file: chapter2
- file: troubleshooting
hidden: true
Describe alternatives you’ve considered
Keep it listed in the TOC and visible
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Video: Add custom entries to a TOC - Microsoft Support
In this video, we'll use the TC field to add custom entries to the Table of Contents. Learn how to create descriptive text...
Read more >Create a table of content with entries for hidden section titles
I have hidden sections in MS Word document. I then want to update table of contents that shows all sections (including the hidden...
Read more >TOC Tips and Tricks - Suzanne S. Barnhill
Remove the leader from the tab stop at the right margin (the one where the page numbers are). You will have to add...
Read more >Create a table of contents (TOC) with Adobe Captivate
Follow this guide to create, organize, customize, or generate a table of contents (TOC) automatically with Adobe Captivate.
Read more >Three Small TOC Tricks | CreativePro Network
If you have any extraneous paragraph returns tagged with that style, usually before or after a section, the export creates the extra pages...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure what you mean by “just hiding it from the left toc and not anywhere else”. The left TOC is the only place that it would show up (unless you’re wanting it to show up if you use a
tableofcontents
directive or something?). I’m just suggesting:hidden:
because that’s how Sphinx handles this and our general approach is “do what Sphinx does so we don’t create extra complexity unless it’s really necessary”In this case you’d just be adding
:orphan:
to the top of the page that you wish to exclude from the toctree. See https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#metadata for reference