hexo静态页更换电脑后配置
复制原电脑上项目路径到新电脑
新电脑安装git与nodejs
新电脑环境安装
#全局修改默认git提交者信息 git config --global user.name "username" git config --global user.email [email protected] #查询现有安装node模块 npm ls --depth 0 #再依次安装现有的模块[本例实际安装模块] npm install hexo-server npm i --save hexo-wordcount npm install --save hexo-helper-live2d npm install hexo-server npm install brace-expansion npm install hexo-renderer-stylus npm install ee-first npm install hexo-generator-category npm install hexo-generator-index npm install hexo-generator-search npm install hexo-generator-tag npm install hexo-permalink-pinyin npm install hexo-renderer-ejs npm install hexo-renderer-marked npm install hexo-renderer-stylus npm install hexo-wordcount
如环境正常,即可在
\source\_posts
目录中更新文章,再执行生成页面hexo clean && hexo g && hexo d
如执行生成页面报错
error:spawn failed...
,可参考删除
.deploy_git
文件夹;执行以下命令git config --global core.autocrlf false
然后,再次执行:
hexo clean && hexo g && hexo d
问题解决。