Hexo更新到7.0.0無法停用內建Highlight.js
上次更新到Hexo 7.0.0發現自己另外裝的程式碼語法沒有效果,也就是在_config.yml
停用內建highlight.js
沒有作用。
後來查到網友的說明:
The configuration that I used before to disable highlight.js no longer works:
highlight: enable: false
To disable highlight.js in 7.0.0, it needs extra configuration.
# The default value is 'highlight.js' and here we set it to empty syntax_highlighter:
I think this should be considered as a breaking change, and it would be reasonable to mention it in the migration guide.
所以我們在_config.yml
依照上述配置來停用highlight.js
:
# The default value is 'highlight.js' and here we set it to empty
syntax_highlighter:
highlight:
enable: false
prismjs:
enable: false
重新清除Hexo快取再重跑一次就可以了。