DEV Community


Pandoc TOC without standalone mode

bachmeil profile image Lance Bachmeier ・1 min read

This is a specialized post that very few people will find useful. But since it's not something you can easily find by searching, I'll make it available to anyone else in my position.

I wanted to add a table of contents to a document in Pandoc, but without standalone mode - something that is not possible. However, you can just use a very minimalist template called something like blank.html:


That's it. Then this

pandoc -s -o file.html --template=blank.html

is just as good as not using standalone mode.

Discussion (0)

Forem Open with the Forem app