This doesn't appear to be natively supported in commonmark, nor in any Github Flavoured Markdown (GFM) extensions i've seen: - https://github.com/commonmark/cmark/issues/78 It seems there are a number of Jekyll plugins that would allow us to do this however, eg: - https://github.com/toshimaru/jekyll-toc - https://github.com/allejo/jekyll-toc