Customize which header levels show up in TOC #5734
Labels
feature
Requests for new features.
product/docs
Fern Docs which builds and hosts a developer documentation site
Feature Description
Add front-matter parameters that allow a user to define the minimum or maximum header level to include in the auto-generated TOC for Docs pages.
Use Case
We have some pages that are very long or detailed, such as our Release notes. We still need to have headers, but we only want to show H1.
This feature can also create a work-around for any TOC problems resulting from header use in tabs.
Proposed Experience (Optional)
Add user-defined parameters to page front matter options:
toc_max_heading_level
:toc_min_heading_level
:Typically, there's a limit to how many header levels appear in TOC, which isn't necessarily a bad thing, however for certain types of long reference pages, it can create a bad navigation experience.
Alternatives Considered (Optional)
In a pinch, we remove the header formatting and instead Bold the text, then drop a manual anchor link in it. It's not really an alternative so much as an ugly workaround, but it does the job.
The text was updated successfully, but these errors were encountered: