hexo搭建博客

  1. 安装(需要node,git)
npm install -g hexo-cli
  1. 阅读hexo官方文档

    https://hexo.io/zh-cn/docs/setup

  2. 完成建站,配置,熟悉hexo常用命令用法(init,new,generate,server,deploy)

  3. 使用主题

    https://github.com/yscoder/hexo-theme-indigo

  4. 按照文档说明,换成hexo-theme-indigo主题

  5. 修改完配置,主要修改一些个人信息

  6. 创建文章

hexo new post 文章标题
  1. 利用hexo发布到xxxx.github.io(hexo deploy)
  2. 使用gitment支持评论
{HEXO_ROOT}/themes/indigo/_config.yml修改配置
gitment:
  owner: xxx # github用户名
  repo: xxx.github.io # 不加https
  client_id: xxx
  client_secret: xxx

使用gitment插件中间遇到的问题

  • 404 not found
    repo填错,或者owner不对
  • 422 错误
    向github提交的url参数超过了限制,解决办法
    http://hheszy.com/2018/03/19/hexo-next-validation-failed-%E6%8A%A5%E9%94%99gitment%E9%85%8D%E7%BD%AEgitment-swig/

你可能感兴趣的:(hexo搭建博客)