cofess / hexo-theme-pure

Hexo theme pure. It's a pure theme for Hexo.
http://blog.cofess.com
MIT License
1.09k stars 291 forks source link

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

Open fengkx opened 5 years ago

fengkx commented 5 years ago

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

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

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

Changzw commented 4 years ago

请问是怎么解决的呢?

fengkx commented 4 years ago

请问是怎么解决的呢?

这是个pr不是issue

Changzw commented 4 years ago

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

HaloXie commented 4 years ago

请问是怎么解决的呢?

这是个pr不是issue

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

fengkx commented 4 years ago

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