Login  Register

Re: Generate TOC using included files

Posted by abelsromero on Apr 09, 2020; 7:32am
URL: https://discuss.asciidoctor.org/Generate-TOC-using-included-files-tp7851p7855.html

That should workd provided the depth is consistent. That means that if the content included is below a level 2 title like in the example, the sections in the included file (e.g. 02_command.adoc) should be level 3 (###).
Iirc asciidoctor will show some warnings but stilll render something, but you'll see there are errors.

On a side notw, if you want included documents to work independently, have a look at the usage of `leveloffset` in https://asciidoctor.org/docs/user-manual/#include-partitioning.