Hexo搭建個人部落格
需要有
- Node.js
- Git
安裝Hexo
1 | |
創建部落格
1 | |
創建貼文
1 | |
創建完後貼文會在source/_post/資料夾中,可以在那裡編輯
1 | |
建立靜態檔&本機伺服器
1 | |
本機伺服器預設在localhost:4000
部署
- 裝
hexo-deployer-git插件:
1 | |
到Github創建一個repo,名字叫做
<username>.github.io(名字很重要)然後到
_config.yml的最下面:
1 | |
- 部署吧老鐵
1 | |
客製化主題
以主題cactus來舉例:
安裝
在部落格主目錄:
1
git clone https://github.com/probberechts/hexo-theme-cactus.git themes/cactus在
_config.yml中,把theme改成:1
theme: cactus重新創建靜態檔:
1
2hexo clean
hexo generate
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.

