1. 自行安裝 nodejs和git
全局安裝cnpm淘寶鏡像
npm install -g cnpm --registry=https://registry.npm.taobao.org
2. 自行注冊(cè)github賬號(hào)
3.
- Hexo安裝
桌面右鍵鼠標(biāo),點(diǎn)擊Git Bash Here,輸入npm命令即可安裝
npm install hexo-cli -g
npm install hexo-deployer-git --save
第一句是安裝hexo,第二句是安裝hexo部署到git page的deployer足画,兩個(gè)都需要安裝撩炊。
如下圖即安裝完成黎泣。
image.png
4. 主題安裝直通車
5. 常用指令
- 常用插件安裝:
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
- 主題配置完成以后,回到 根目錄(即上一篇文章使用Hexo框架自由搭建博客中提到的 Blog 文件夾),按順序執(zhí)行命令就OK啦纫事。
$ npm install hexo-deployer-git --save
$ hexo clean && hexo g && hexo d
- 文章發(fā)布指令:
$ hexo d -g
-
設(shè)置自定義域名
解析域名
解析完后,再回到 GitHub Pages 設(shè)置域名
設(shè)置
寫域名保存
最后就可以打開瀏覽器訪問自己的域名就是博客的內(nèi)容啦K摹丽惶!