On-page navigation $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#on-page-navigation">
When you have many sections on a page, you can provide a table of contents for a better overview.
To show a table of contents for the current page,
use the contents
directive with the :local:
option.
You must provide a title to the directive, or it won’t show.
By default, headings included after this directive are links back to the contents section.
If you want to turn off this behavior, use :backlinks: none
.
.. contents:: On this page
:local:
:backlinks: none
Section 1 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#section-1" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#section-1'">
Some random text.
Subsection 1.1 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#subsection-1-1" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#subsection-1-1'">
More random text
Subsection 1.2 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#subsection-1-2" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#subsection-1-2'">
More random text
Section 2 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#section-2" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#section-2'">
Some random text.
Subsection 2.1 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#subsection-2-1" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#subsection-2-1'">
More random text
Subsection 2.2 $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="#subsection-2-2" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#subsection-2-2'">
More random text