美文网首页
使用Github Page和Hexo搭建个人博客

使用Github Page和Hexo搭建个人博客

作者: 落魂灬 | 来源:发表于2017-09-14 17:27 被阅读28次

我的博客

1. 自行安装 nodejs和git

全局安装cnpm淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org

2. 自行注册github账号

3.

  1. Hexo安装
    桌面右键鼠标,点击Git Bash Here,输入npm命令即可安装
npm install hexo-cli -g
npm install hexo-deployer-git --save

第一句是安装hexo,第二句是安装hexo部署到git page的deployer,两个都需要安装。

如下图即安装完成。


image.png

详细教程直通车->

4. 主题安装直通车

5. 常用指令

  1. 常用插件安装:
npm install hexo-generator-index --save
npm install hexo-generator-archive --save
npm install hexo-generator-category --save
npm install hexo-generator-tag --save
npm install hexo-server --save
npm install hexo-deployer-git --save
npm install hexo-deployer-heroku --save
npm install hexo-deployer-rsync --save
npm install hexo-deployer-openshift --save
npm install hexo-renderer-marked@0.2 --save
npm install hexo-renderer-stylus@0.2 --save
npm install hexo-generator-feed@1 --save
npm install hexo-generator-sitemap@1 --save

  1. 主题配置完成以后,回到 根目录(即上一篇文章使用Hexo框架自由搭建博客中提到的 Blog 文件夹),按顺序执行命令就OK啦。
$ npm install hexo-deployer-git --save  
$ hexo clean && hexo g && hexo d

  1. 文章发布指令:
$ hexo d -g 
  1. 设置自定义域名


    解析域名

解析完后,再回到 GitHub Pages 设置域名

如下图: 设置 写域名保存

最后就可以打开浏览器访问自己的域名就是博客的内容啦!!

6. Hexo官网文档直通车

相关文章

网友评论

      本文标题:使用Github Page和Hexo搭建个人博客

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