2021年,我电脑更换了主板,数据全部消失。
于是我开始了重新部署Hexo的征程。
因为时间原因,后续会补上我之前关于电脑修复的文章,首先发表于少数派。
安装首先根据我之前的迁移目录下的文章,之后根据skycrown的知乎回答一步一步走。
踩坑
关于我的其他Hexo的问题与优化记录,可配合查看:LeanCloud国内版迁移至国际版
版本过低
本地预览出现错误
Version 9 of Highlight.js has reached EOL and is no longer supported.
Please upgrade or ask whatever dependency you are using to upgrade.
https://github.com/highlightjs/highlight.js/issues/2877
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Nunjucks Error: [Line 70, Column 6] expected name as lookup value, got .
===== Context Dump =====
=== (line number probably different from source) ===
65 | <pre class="highlight"><code class="">
66 | {{
67 | paginator({
68 | prev_text: '<i class="fa fa-angle-left" aria-label="'+__('accessibility.prev_page')+'"></i>',
69 | next_text: '<i class="fa fa-angle-right" aria-label="'+__('accessibility.next_page')+'"></i>',
70 | ...
71 | })
72 |
73 | 网站总访问量修正
74 |更新了不蒜子的域名,官方解释在这里。
75 |修改busuanzi-counter.swig
:
安装:
npm i hexo-renderer-swig
hexo c清理缓存,hexo g & s 即可
页脚问题
页脚出现“下一页按钮变成代码”的问题后,修改以下代码后仍直接出现代码:
prev_text: '<i class="fa fa-angle-left" aria-label="'+__('accessibility.prev_page')+'"></i>',
next_text: '<i class="fa fa-angle-right" aria-label="'+__('accessibility.next_page')+'"></i>',
mid_size: 1,
escape: false #增加此行