Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: default open toc when theme,config.toc is true, but can disab… #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fengkx
Copy link
Contributor

@fengkx fengkx commented Jun 28, 2019

更改之前 toc 要在 theme.config.toc 和 front-matter 中 toc 域同时设置为 true 才会开启。 这样我觉得有点不太对劲。

更改之后在 theme.config.toc 为 true 则默认开启 toc, 但是可以通过具体文章的 front-matter 设置成 false 关闭。

我觉得这样更符合逻辑一些。默认开启 toc 应该不会有什么消耗吧。毕竟是 Hexo 生成好的

@Changzw
Copy link

Changzw commented Dec 27, 2019

请问是怎么解决的呢?

@fengkx
Copy link
Contributor Author

fengkx commented Dec 28, 2019

请问是怎么解决的呢?

这是个pr不是issue

@Changzw
Copy link

Changzw commented Jan 4, 2020

ORZ 我在 issue 里面搜的怎么会跑到这里

@HaloXie
Copy link

HaloXie commented Mar 14, 2020

请问是怎么解决的呢?

这是个pr不是issue

你好, 我按照你的更改在本地试了一下, 还是不显示, 请问还有其他需要配置的吗?

@fengkx
Copy link
Contributor Author

fengkx commented Mar 14, 2020

不用。关键是if里的表达式。你可以在模板里log看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants