Windows下部署hexo

  1. node官网下载安装包并安装,
    a. URL:https://nodejs.org/dist/v6.9.2/node-v6.9.2-x64.msi
  2. 下载git客户端并安装(安装github desktop更好),
    a. URL:https://git-scm.com/download/win
  3. 打开git命令行,
    a. 安装hexo:
    npm install hexo-cli -g
    
    b. 初始化站点:
    hexo init hexo.blog
    cd hexo.blog
    npm install
    
  4. 执行”hexo server”就可以测试是否安装成功
  5. 访问http://localhost:4000/测试成功
  6. 部署hexo到github
  7. 在github上创建一个repository
    a. 名称为fearchen/fearchen.github.io
  8. 在hexo.blog下的_config.yml下配置部署路径,注:冒号后面有空格

  9. 安装git插件:npm install hexo-deployer-git –save

  10. 然后在hexo.blog目录下执行”hexo deploy”
  11. 部署成功,https://fearchen.github.io/就能访问了
  12. hexo new “MyBlog” 新建一篇文章
  13. hexo generate生成静态页面
  14. hexo deploy重新部署
  15. 把写好的MarkDown文章放到source目录下的_post文件夹
  16. 然后部署
    a. hexo clean
    b. hexo deploy -g
  17. 就能在hexo上看到了
  18. 相关配置需修改themes\maupassant下“_config.yml”配置文件
  19. 修改hexo主题,https://www.haomwei.com/technology/maupassant-hexo.html
    a. git clone https://github.com/tufu9441/maupassant-hexo.git themes/maupassant
    b. npm install hexo-renderer-jade –save
    c. npm install hexo-renderer-sass –save
    d. 编辑Hexo目录下的 _config.yml,将theme的值改为maupassant
    e. hexo deploy -g