szeiger / ornate

A Markdown-based site generator
http://szeiger.github.io/ornate-doc/
Other
80 stars 12 forks source link

Nested entries in the TOC #7

Open julienrf opened 7 years ago

julienrf commented 7 years ago

Is it possible to define sub-entries in the TOC? I would like them to be collapsed by default, e.g.:

But, when one entry is selected, then its sub-entries would be expanded:

szeiger commented 7 years ago

I'm not sure what you mean. There's currently no way to define a hierarchical page structure. If you want the TOC of the current page (usually shown on the right) to be merged into the main page navigation on the left you can use a TOC element like ![](toctree:maxLevel=0,focusMaxLevel=6) which shows everything down to level 6 for the current page but only level 0 (i.e. the actual page) for all other pages.

julienrf commented 7 years ago

I was referring to the TOC on the left. I would like to have pages bar and baz to be hidden when quux is displayed.

szeiger commented 7 years ago

Since Ornate does not yet support nested pages, this TOC tree is not possible in the first place. If bar and baz are headings instead of pages you can do it with focusMaxLevel.