Open fengkx opened 5 years ago
更改之前 toc 要在 theme.config.toc 和 front-matter 中 toc 域同时设置为 true 才会开启。 这样我觉得有点不太对劲。
更改之后在 theme.config.toc 为 true 则默认开启 toc, 但是可以通过具体文章的 front-matter 设置成 false 关闭。
我觉得这样更符合逻辑一些。默认开启 toc 应该不会有什么消耗吧。毕竟是 Hexo 生成好的
请问是怎么解决的呢?
这是个pr不是issue
ORZ 我在 issue 里面搜的怎么会跑到这里
请问是怎么解决的呢? 这是个pr不是issue
你好, 我按照你的更改在本地试了一下, 还是不显示, 请问还有其他需要配置的吗?
不用。关键是if里的表达式。你可以在模板里log看看
更改之前 toc 要在 theme.config.toc 和 front-matter 中 toc 域同时设置为 true 才会开启。 这样我觉得有点不太对劲。
更改之后在 theme.config.toc 为 true 则默认开启 toc, 但是可以通过具体文章的 front-matter 设置成 false 关闭。
我觉得这样更符合逻辑一些。默认开启 toc 应该不会有什么消耗吧。毕竟是 Hexo 生成好的