Re: -a toc2 implementation
Posted by
mojavelinux on
Apr 26, 2013; 6:32am
URL: https://discuss.asciidoctor.org/a-toc2-implementation-tp164p168.html
Btw, I also added some other goodies to the toc. You can use the following attributes to customize the toc:
toc-title:: The heading text above the toc
toc-class:: The CSS class that is added to the toc container div
toclevels:: The depth of the toc (between 1 and 5, default 2)
Those are primarily for configuring the built-in toc in the header. You can also put a toc anywhere in the document and customize it like any other block.
[[mytoc]]
[role="mytoc"]
.My TOC
toc::[levels=3]
That inserts a toc like:
<div id="mytoc" class="mytoc">
<div class="title">My TOC</div>
<ul>
...up to 3 levels
</ul>
</div>
(You guessed it, these features need to be documented :))
-Dan