change: default open toc when theme,config.toc is true, but can disab…#88
Open
fengkx wants to merge 1 commit intocofess:masterfrom
Open
change: default open toc when theme,config.toc is true, but can disab…#88fengkx wants to merge 1 commit intocofess:masterfrom
fengkx wants to merge 1 commit intocofess:masterfrom
Conversation
…le using front-matter
|
请问是怎么解决的呢? |
Contributor
Author
这是个pr不是issue |
|
ORZ 我在 issue 里面搜的怎么会跑到这里 |
你好, 我按照你的更改在本地试了一下, 还是不显示, 请问还有其他需要配置的吗? |
Contributor
Author
|
不用。关键是if里的表达式。你可以在模板里log看看 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更改之前 toc 要在 theme.config.toc 和 front-matter 中 toc 域同时设置为 true 才会开启。 这样我觉得有点不太对劲。
更改之后在 theme.config.toc 为 true 则默认开启 toc, 但是可以通过具体文章的 front-matter 设置成 false 关闭。
我觉得这样更符合逻辑一些。默认开启 toc 应该不会有什么消耗吧。毕竟是 Hexo 生成好的