How to include a toc when going from AsciiDoctor to Markdown via Pandoc?Ask Question


I've got some files that are in AsciiDoc and I need them in Markdown for consumption in Jekyll.

I'm using AsciiDoctor to go from AsciiDoc to DocBook then Pandoc to go from DocBook to Markdown.

Originally, AsciiDoctor was being used to go straight to HTML and this was then including the TOC on the left-hand side of the page. I've tried using "-a toc" when converting to DocBook but nothing appears in the generated XML. I've tried getting Pandoc to generate the TOC itself but nothing appears in the Markdown.

What do I need to do for the TOC to be generated?



Have though about using Jekyll Asciidoctor plugin? Might be easier than your described workflow

标签: pandoc github-flavored-markdown asciidoc asciidoctor
© 2014 TuiCode, Inc.