How to add a table of contents (TOC) to a markdown post or page to nikola ssg

You want to add an automatically created table of content to your markdown post in Nikola SSG. Nikola uses by default python-markdown which supports the toc extension. First you need to enable the mar

You want to add an automatically created table of content to your markdown post in Nikola SSG.

Nikola uses by default python-markdown which supports the toc extension.

First you need to enable the markdown extension in config.py

MARKDOWN_EXTENSIONS = ['markdown.extensions.toc']

Then add the short code for TOC in your markdown file

References

--

--

Diego Carrasco G.
Diego Carrasco G.

Written by Diego Carrasco G.

Hi, I'm an entrepreneur-turned-developer living in Germany. I enjoy learning, write, coffee and solving problems. I write mainly about technology.

No responses yet