hexo(https://hexo.io/)搭配github博客搭建,以及使用hexo主题(https://hexo.io/themes/);

1.安装nodejs(https://nodejs.org/en/)和git(https://git-scm.com/download/win)(针对windows系统)工具
2.在本地磁盘建一个文件夹,(放博客的文件夹)
3.进入该文件夹,右键点击git Bush here
4.在git里执行 hexo init →hexo p →
5.配置GitHub:

建立Repository
建立与你用户名对应的仓库,仓库名必须为【your_user_name.github.io】

6.编辑myblog下的_config.yml文件:

翻到最下面,改成我这样子的

  deploy:
    type: git
    repo: https://github.com/shellyDaTou/shellyDaTou.github.io.git
    branch: master
7. 再执行npm install hexo-deployer-git --save
8.hexo d ;即可访问
9.采用hexo主题:
点击合适的主题名进入,每个主题都有对应的文档说明,按说明操作即可;
10.执行hexo clean → hexo d -g → 根据弹框输入github的用户名和密码;即可访问到选中的主题的自己博客了。

posted on 2017-08-13 17:38  大头小明  阅读(164)  评论(0编辑  收藏  举报