Skip to content

data max toc

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

Guides

Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

WebIDL

HTML attributes

CSS Classes

Special properties

Clone this wiki locally

data-max-toc

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>
  <section>
    <h2>Section 1.1</h2>
    <section>
      <h2>Section 1.1.1 (skipped)</h2>
    </section>
  </section>
</section>

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>
</section>