question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add the ability to have hidden pages from primary TOC

See original GitHub issue

Is 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

  1. keep the document in the hidden sphinx toctree
  2. 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:open
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
choldgrafcommented, Oct 2, 2020

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”

0reactions
choldgrafcommented, Oct 4, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found