1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Add guidance on creating sectional TOCs (#35370)

This commit is contained in:
Ethan Palm
2023-03-10 13:38:08 -08:00
committed by GitHub
parent 9c5f1ade48
commit 3619ffff88
2 changed files with 53 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ featuredLinks:
### `showMiniToc`
- Purpose: Indicates whether an article should show a mini TOC above the rest of the content. See [Autogenerated mini TOCs](#autogenerated-mini-tocs) for more info.
- Purpose: Indicates whether an article should show a mini table of contents (TOC) above the rest of the content. See [Autogenerated mini TOCs](#autogenerated-mini-tocs) for more info.
- Type: `Boolean`. Default is `true` on articles, and `false` on map topics and `index.md` pages.
- Optional.
@@ -282,11 +282,11 @@ As an alternative, you can change the single quotes surrounding the frontmatter
## Autogenerated mini TOCs
Every article on the help site displays an autogenerated "In this article" section (aka mini TOC) at the top of the page that includes links to all `H2`s in the article by default. Only H2 headers will be included in the mini TOCs.
Every article displays a mini table of contents (TOC), which is an autogenerated "In this article" section that includes links to all `H2`s in the article. Only `H2` headers are included in the mini TOCs. If an article uses `H3` or `H4` headers to divide information in a way that only certain sections are relevant to a particular task, you can help people navigate to the content most relevant to them by using a [sectional TOC](../contributing/content-style-guide.md#sectional-tocs).
Mini TOCs do not appear on product landing pages, category landing pages, or map topic pages.
Make sure not to add hardcoded "In this article" sections in the Markdown source or else the page will display duplicate mini TOCs.
Do not add hardcoded "In this article" sections in the Markdown source or else the page will display duplicate mini TOCs.
## Versioning