Open bzgec opened 2 years ago
The TOC is preserved by default.
This .rst
document
.. contents::
Section 1
=========
Section 2
=========
is rendered as:
<div class="document">
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li>
<a class="reference internal" href="#section-1" id="id1">Section 1</a>
</li>
<li>
<a class="reference internal" href="#section-2" id="id2">Section 2</a>
</li>
</ul>
</div>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#id1">Section 1</a></h2>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#id2">Section 2</a></h2>
</div>
</div>
Yes, but I would like to set preserveTOC: false
and use built-in variable .TableOfContents.
Is there a
preserveTOC
option forrst
(as is forasciidoc
)?If not, would it be worth to implement it?