asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.88k stars 295 forks source link

Let HTML document exported include a generated TOC at the top/bottom #529

Closed manueljordan closed 2 years ago

manueljordan commented 2 years ago

First, as usual huge thanks for this tool - 👍 - a cold beer for the author!

When I have multiple .adoc files through a hierarchy, when the final or main document is exported to .pdf I can see that automatically adobe reader shows in the left of the opened document the TOC according the headings of the document itself.

Could be added the same feature automatically when the document is exported to the HTML format? And including a configuration setting to let the writer/author select where should be located the TOC - it either at the top or bottom of the document.

Thanks for your understanding

Ayowel commented 2 years ago

Hi,

This is due to a difference in the default configuration for both pdf and HTML renderers and it is an Asciidoc configuration, not specific to AsciidocFX. In your own document, you should add :toc: in the document attribute list (if you do not know what this is, add it as the first line of your document or under the document's title without an empty line). You may read more on TOC configuration and see examples here: https://docs.asciidoctor.org/asciidoc/latest/toc/position/

manueljordan commented 2 years ago

Thank you - thanks for the link - I am going to do a research about that