Skip to content

data max toc

Sid Vishnoi edited this page Jul 8, 2020 · 2 revisions


Configuration options

W3C Configuration options

Linter 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


Limit depth of table to contents section to section, without adding a global depth limit using maxTocLevel.

<section data-max-toc="2">
  <h2>Section 1</h2>
    <h2>Section 1.1</h2>
      <h2>Section 1.1.1 (skipped)</h2>

data-max-toc=0 is equivalent to adding a notoc class to current section:

<section data-max-toc="0">
  <h2>I'm skipped from ToC</h2>