Closed choicky closed 3 years ago
目录默认设置的显示层级是二级到三级,也就是 ##
到 ###
Hi TOC is not shown for me too.
test.md
---
title: "Test TOC"
date: 2020-10-18T14:35:48+03:00
draft: false
---
# Level 1
## Level 2
### Level 3
config.toml
[markup]
[markup.tableOfContents]
endLevel = 3
ordered = false
startLevel = 2
I've tried modifying the TOC display logic, and now it should show the TOC in all cases unless it is explicitly set false
within config.toml
or front matter.
Also, previously TOC would only be displayed on pages belonging to the mainSection
array set in config.toml
.
I've tested well with the exampleSite
, try updating the theme.
I'll keep the issue open until all problems are fixed.
As #61 mentioned, this may actually a bug where showToc=true
is not working as expected. I've fixed it in the latest commit, you can upgrade the theme and try again with showToc=false
in global and showToc=true
in front matters.
The right logic: | fixed setting status | site showToc is undefined or true |
site showToc is false |
---|---|---|---|
page showToc is undefined |
✅ | ❎ | |
page showToc is true |
✅ | ✅ | |
page showToc is false |
❎ | ❎ |
侧面未显示目录,不知道原因是什么。
即使配置文件或者页面本身设定了
showToc = true
也不显示