hexo静态页更换电脑后环境配置


hexo静态页更换电脑后配置

  1. 复制原电脑上项目路径到新电脑

  2. 新电脑安装git与nodejs

  3. 新电脑环境安装

    #全局修改默认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
  1. 如环境正常,即可在\source\_posts 目录中更新文章,再执行生成页面

    hexo clean && hexo g && hexo d
  2. 如执行生成页面报错error:spawn failed...,可参考

    删除.deploy_git文件夹;执行以下命令

    git config --global core.autocrlf false

然后,再次执行:

hexo clean && hexo g && hexo d

问题解决。


文章作者: Webpoplayer
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Webpoplayer !
评论
  目录