美文网首页HexoHexo博客
Hexo博客搭建教程

Hexo博客搭建教程

作者: 88ea6130522d | 来源:发表于2017-10-13 08:41 被阅读15次

    参照Hexo官网搭建:

    安装git和node.js

    然后几行代码就搭建完成

    $ npm install hexo-cli -g
    $ hexo init blog
    $ cd blog
    $ npm install
    $ hexo server
    

    简单易用,Hexo造福人类哈
    更多用法和教程参照官方文档

    部署到coding.net和github.com

    创建代码库repository

    coding.net: 与用户名同名(如:michael)
    github.com: 用户名.github.io(如:michael.github.io)

    修改blog/_config.yml

    修改部署配置:

    deploy:
      type: git
      repo:
        github: git@github.com:michael/michael.github.io.git,master
        coding: git@git.coding.net:michael/michael.git,master
    

    启用pages服务

    进入coding和github相应的repository开启

    这样就拥有自己二级域名的博客了

    michael.coding.me
    michael.github.io

    同步blog博客源码到coding或github

    备份博客源码到git托管库

    一来是安全起见,要有备份意识,二来可以多终端维护

    建议使用私人的代码库

    coding可以创建免费的,github需要付费

    本文最先发布于molock.cn帆的博客

    相关文章

      网友评论

        本文标题:Hexo博客搭建教程

        本文链接:https://www.haomeiwen.com/subject/yviayxtx.html