1.2 KiB
1.2 KiB
| title | date | description |
|---|---|---|
| Table of content | 2023-05-02 | Setup table of content in Hugo blog awesome theme |
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
toctotrueinconfig.toml.[params] toc = true -
Add
toc = falseto 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
---