npm安装没反应及RollbackFailedOptional Verb Npm-Session错误
Npm安装报错 RollbackFailedOptional Verb Npm-Session
设置了cmd、git、npm代理,结果还是报错,最后换了一下源,更换为淘宝的源
| 1 | npm config set registry http://registry.npm.taobao.org | 
参考https://www.cnblogs.com/zwrsnrt/p/12492482.html
hexo使用theme无法渲染页面问题
新版本hexo在使用主题时,生成页面发现无法正常显示,出现以下未渲染成功的源代码
| 1 | '{% extends ‘_layout.swig‘ %} {% import ‘_macro/post.swig‘ as post_template %}' | 
查看显示的代码以及主题目录下的layout模板,发现hexo在新版本使用 Nunjucks 来渲染页面,但是很多主题还是旧版本hexo时编写的,使用的是Swig,所以页面没有正常使用swig渲染好,我们使用以下命令装上swig就好了
| 1 | npm i hexo-renderer-swig | 
参考:
https://blog.csdn.net/qq_39898645/article/details/109181736
https://segmentfault.com/p/1210000010636536/read
hexo Error Deployer not found: git

https://blog.csdn.net/weixin_36401046/article/details/52940313
npm install –save hexo-deployer-git
Template render error: (unknown path)
有两种可能,一种是config.yml中没使用正确的缩进空格,一种是文章中有
| 1 | {{}},{% %} | 
这种hexo无法转义的字符
config.yml
官方的示例如下
The error one:
| 1 | plugins: | 
The correct one:
| 1 | plugins: | 
文章有无法转义字符
将无法转义的句子用代码块括住