Table of Contents

less than 1 minute read

Tables of contents (ToCs) are generated automatically by Kramdown with a simple markup:

- TOC
{:toc}

All the headings in pages/article/posts will be all automatically included in the ToC, except for those we don’t want to. For the latter, we apply the class no_toc, and Kramdown will skip those headings:

### This heading will be included in the ToC

### This heading will not be included in the ToC.
{: .no_toc}

Of course, we can make the ToC an ordered list instead of unordered:

1. TOC
{:toc}

Pro-tip: The theme generates ToC as unordered list. If you need ToCs with ordered lists you have to create a modified toc file (e.g. toc-ordered) in the _includes.


You can create your ToCs in three different styles: Simple; Hidden; Boxed.

Simple


Hidden


Boxed