Table of content

Table of Contents

Table of content

This theme supports displaying table of content (ToC) in blog posts.

Enable table of content on all posts

To enable ToC on all posts (globally) set parameter toc to true in config.toml.

[params]
  toc = true

To disable ToC globally, simply ignore the toc parameter or set it to false.

Disable table of content on certain posts

To disable ToC on certain posts, you have to follow two steps.

  1. Set parameter toc to true in config.toml.

    [params]
      toc = true
    
  2. Add toc = false to the front matter of the post for which you wish to disable ToC.

    ---
    title: How to enable table of content
    date: 2023-05-02
    toc: false
    ---