Login  Register

Re: Generate TOC using included files

Posted by abelsromero on Apr 15, 2020; 1:04pm
URL: https://discuss.asciidoctor.org/Generate-TOC-using-included-files-tp7851p7893.html

You totally got the idea behind asciidoctor, it's oriented to generate a "single long document", but that's by desing, managment of multiple source files to generate multiple outputs is left for other tools.

For what you describe, and perfect result you need a tool like Antora (https://antora.org/, https://docs.antora.org) which is by the same team. The docs site is build with it, so you can grasp and idea of the result. But it has a learning curve if you're starting. Have a look at the demo https://gitlab.com/antora/demo/docs-site.

For a mid level option, you can try lookign into a site/blog generator that supports Asciidoc like jbake or Hugo. Those are more limited but maybe are good enough for what you need.

Below that, you can just use some build tool like the maven, gradle, gulp plugins, or simply so some custom shell scripting on your own. But those treat documents totally independently, so no toc or crossreference options.