在 Windows 10 安裝 Hexo 並部屬到 GitHub Pages
前言
還沒打完,有空再補
Hexo簡介
官方文件 : https://hexo.io/zh-tw/docs/
本機環境
Windows 10
Visuan Studio Code
安裝 Node.js 與 Git
Node.js 下載 : http://nodejs.org/
確認 Node.js 有沒有安裝成功
| 1 | $ node -v | 
確認 npm 有沒有安裝成功
| 1 | $ npm -v | 
Git 下載 : https://git-scm.com/
確認 Git 有沒有安裝成功
| 1 | $ git --version | 
設定 Git 的使用者名稱
| 1 | $ git config --global user.name "你的 GitHub 使用者名稱" | 
設定 Git 的 Email
| 1 | $ git config --global user.email "你的 GitHub 郵件地址" | 
產生SSH密鑰文件
| 1 | $ ssh-keygen -t rsa -C "你的 GitHub 郵件地址" | 
複製 id_rsa.pub 的內容到 GitHub
| 1 | C:\Users\使用者\.ssh\id_rsa.pub | 
在 GitHub 網站上導入密鑰,網址 : https://github.com/settings/keys
測試連線到GitHub
| 1 | ssh -T git@github.com | 
安裝 Hexo
使用 npm 安裝 Hexo
| 1 | npm install -g hexo-cli | 
建立 Hexo 專案
| 1 | $ hexo init | 
確認 Hexo 有沒有安裝成功
| 1 | hexo -v | 
部屬到 GitHub Pages
| 1 | $ npm install hexo-deployer-git --save | 
修改_config.yml配置檔案
| 1 | deploy: | 
清理快取檔案和已產生的靜態檔案
| 1 | $ hexo clean | 
產生檔案
| 1 | $ hexo generate | 
完成後部屬
| 1 | $ hexo deploy | 
寫文章
| 1 | $ hexo new "文章標題" | 
參考資料
https://oawan.me/2016/easy-hexo-easy-blog/
https://yogapan.github.io/2017/08/11/%E7%94%A8Hexo-Github-Pages%E6%90%AD%E5%BB%BA%E5%80%8B%E4%BA%BA%E9%83%A8%E8%90%BD%E6%A0%BC/
https://zhuanlan.zhihu.com/p/26625249
https://godweiyang.com/2018/04/13/hexo-blog/
https://skychang.github.io/2015/10/06/Hexo-Install_Hexo/