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.
-
Set parameter
toc
totrue
inconfig.toml
.[params] toc = true
-
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 ---
Open table of content
By default, ToC is closed. To open it by default, set parameter tocOpen
to true
in config.toml
.
[params]
tocOpen = true
Or simply add the tocOpen
parameter to the front matter of the post.
---
title: How to enable table of content
date: 2023-05-02
tocOpen: true
---