This page demonstrates how to filter which headings appear in the Table of Contents.
This H2 heading should appear in the TOC.
This H3 heading should appear in the TOC.
This H4 heading should appear in the TOC because we set toc_max_heading_level: 4.
This H5 heading should NOT appear in the TOC because the max level is 4.
This H6 heading should NOT appear in the TOC.
Set these frontmatter options to control TOC levels:
toc_min_heading_level: 2 # Minimum depth (default: 2)
toc_max_heading_level: 4 # Maximum depth (default: 3)
By default, only H2 and H3 headings appear in the TOC. This page extends that to include H4 headings as well.
This is another H2 section to demonstrate the TOC structure.
With a nested H3.
And even an H4 that appears in the TOC.