卸载 hexo-prism-plugin 代码高亮插件
文章目录
最近用 Github 比较频繁,无意间点开 GitHub Pages 的代码库时发现一个大大的 Dependabot alerts 顶在上面
点开后发现最大的一个警告就是这个:
顺着这个 dependencies 一路追查发现是 hexo-prism-plugin 这个插件使用的 由于该插件太久没更新,而且发现 hexo.io 最新版本已经集成了 prism 的代码高亮功能 所以更新 Hexo 版本并启用自带的代码高亮功能应该就可以解决了
解决方法
- 卸载 hexo-prism-plugin 插件
- 更新所有相关 dependencies 到最新版本
- 配置 _config.yml
prismjs:
enable: true
preprocess: true
line_number: true
tab_replace: ' '
- 重新生成