長條貓窩

Back

(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

完成

hexo-installation
https://blog.simbafs.cc/blog/hexo-installation/
Author Simba Fs
Published at February 10, 2020