Re: Generating TOC with asciidoctor
Posted by
mojavelinux on
Apr 10, 2013; 8:41am
URL: https://discuss.asciidoctor.org/Generating-TOC-with-asciidoctor-tp97p98.html
Actually, it does. It just doesn't know anything about the toc2 attribute :) I should add support for that now that I realize what it does (it just adds an extra style to the HTML output and pulls in an extra stylesheet).
So, to get what you want, you would just run:
asciidoctor -d book -b html5 -a toc book.asciidoc
Unfortunately, Asciidoctor doesn't yet honor the toclevels attribute. It shouldn't be hard to do, just haven't gotten around to it yet. Feel free to hack on it if you would like. Otherwise, I'll get to it in a short while.
-Dan