Max depth for page content and anchor links #536
Unanswered
HealthyPear
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose I have a page made from a Jupyter Notebook with the following header structure
PAGE 1 TITLE
Table of contents
A
A1
B
Now, when I build the book, even if I have e.g.
[...]
defaults:
maxdepth: 5
[...]
I do not see the "A1" section on the right sidebar (the TOC of the page I am focusing at the moment).
It only appears when I click on "A".
Plus the links do not work.
For the links I noticed that if I use the (MyST?) contents directive I get a working TOC inline
```{contents}
:depth: 3
```
but when use the notebook alone it's basically useless...
UPDATE
I notice now that after building the book in HTML the link to e.g. the "B" header is
[....]/test_book/_build/html/page1.html#id6
so it's called id6 and not B as I would expect, but at the same time the link produced by the contents directive has #b
how does this work?
Anyway I prefer much more the simple manual markdown TOC as the one generated with the contents directive looks like a markdown codeblock when I open the notebook alone...
Beta Was this translation helpful? Give feedback.
All reactions