1. 升级 HEXO
- 打开
package.json
, 修改dependencies
项:
"hexo": "^5.0.0",
- 更新
npm update
2. 改变一:通过npm安装主题
- 安装next主题:
npm install hexo-theme-next
- 设置hexo主配置文件:
# _config.yml
theme: next
- 在根目录新建next主题的配置文件
_config.next.yml
:
# _config.next.yml
scheme: Gemini
footer:
since: 2015
icon:
animated: true
# balabala ...
- 然后可以删除原来的主题目录:
themes/next
3. 改变二:代码高亮:PrismJS
新增了 PrismJS 代码高亮支持:
# _config.yml
highlight:
enable: true
auto_detect: false
line_number: true
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ''
试了一下prismjs, 部分代码格式不对, 似乎有bug, 放弃。
网友评论