Skip to content
Marcos Caceres edited this page Mar 27, 2026 · 7 revisions

maxTocLevel

Type: number Default: 0 (all levels)

Limits the depth of the table of contents. 0 means unlimited. Set to 2 to show only top-level sections and their direct children, 3 for one more level, etc.

Basic usage

var respecConfig = {
  maxTocLevel: 2,
};

Notes

  • maxTocLevel: 0 (default) includes all heading levels in the ToC
  • Use data-max-toc="N" on individual sections to override for that subtree
  • For very large specs, limiting ToC depth improves readability

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally