Open leohhhn opened 5 months ago
@leohhhn We can easily add new levels of title to be generated into the ToC. It may be a global config. But if you are concerned about the fact that may be too much, I mean, some pages might need a H1-H5 content and other would be too cramped and you might prefer a H1-H4 content to be generated. For those one, you can locally (in markdown front-matter) add a designated option to override default config:
---
# Display h2 to h5 headings
toc_min_heading_level: 2
toc_max_heading_level: 5
---
Finally, another radical choice would be to replace the ToC component by a new one (handmade) with specific option (we might think about a dropdown component inside the ToC) but it would require more time to develop.
Description
I've found myself multiple times in the situation where I can use H4, H5 and H6 headers, and have them show up in the sidebar correctly. This is mainly used for a good document summary and subpages. Currently the summary on the right side only shows up to H3 headers.
In the above example,
auth/accounts
is H4.@alexiscolin What do you think? The segmentation that you can get with more headers is definitely useful, but I am concerned if the summary on the right side of a page in docusaurus might get too cramped with this. Do you have any other suggestion which might be better?