因俗事缠身,很久未写博客了,最近有了点空闲,想把博客倒腾一下重新拉起来。
开干!
经过一番折腾,终于搞定,期间遇到一些问题记录下来,以便查询:
当前环境
系统: macOS Monterey
node: v18.6.0
npm:8.13.2
hexo-cli: 4.3.0
os: darwin 21.5.0 12.
遇到的问题
1、node-sass 无法正常使用
1 | at module.exports (/Users/tangshd/WorkSpace/private/engining.net/node_modules/hexo-renderer-sass/node_modules/node-sass/lib/binding.js:13:13) |
- 解决方案:
nodejs + npm 降级到14.7.0
安装nvm 0.39.1 后, nvm use 14.7.0
2、主题不兼容,hexo g出现错误
hexo主题参考手册:https://hexo.io/zh-cn/docs/themes
- 解决方案:
推荐使用人数较多、更新比较及时的主题,比如pure、fluid等
3、 hexo d 后,githupage 丢失重定向的域名
- 解决方案:
在source 根目录下新建CNMAE文件,然后在文件内填入域名,重新hexo d