(Legacy)
把 hexo 部屬到 gh-page#
執行
$ npm i hexo -g
$ hexo init blog
$ cd blog
plaintext修改 _config.yml
刪除最後兩行,改成
deploy:
type: git
repo: [email protected]:<username>/<repo>
branch: master
plaintext執行
$ npm i hexo-deployer-git
$ hexo depoly
plaintext在 repo 設定中 GitHub Pages
隨便選一個 Jekyll theme,這樣才不會 404
地雷:在之後都部屬要加上
-g
$ hexo d -g
plaintext不然不會生效
完成!
將原始碼保存#
執行
$ git checkout -b hexo
$ git add .
$ git commit -m init
$ git push -u origin hexo
plaintext完成