How do I insert table of content in the document using markdown syntax? Ideally it should be anywhere in the document and not just top.
It is not possible.
Tricky workaround
{{ (replaceRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" .TableOfContents .Content) | safeHTML }}
That replace <!-- toc -->
by corresponding table of contents (works similar as <!-- more -->
)
A post was split to a new topic: How do I add a TOC to my site?