Search code examples
nikola

Table of contents in markdown for Nikola


I've been using Sphinx for my personal website for the past years and realized that I more have a blog with posts and few pages and did the conversion to Nikola in the past days. I also took the opportunity to switch to Markdown as I use it with R and Stack Overflow and everywhere else as well.

I have set in my Sphinx theme to have a local table of contents in the sidebar. There are a handful of very long (over 10k words) posts that would benefit from a local table of contents. I saw that the Nikola manual is written in reST and uses the contents directive. I would like to use that also in those posts.

I could convert these few posts back to reST and use the contents directive, but I'd like to avoid that. Can this be accomplished somehow?


Solution

  • Updated

    Using [TOC] which is a feature of an extension enabled by default. My firts answer was an misinterpretation of your question.

    Firts answer

    Using Nikola, may be you are interested in "archive" option. This is a default page that include all your posts (optional, this is grouped by date). Example in my blog: https://www.cosmoscalibur.com/archive.html .