# [實作] Hexo Blog 架設 ### 1. 安裝 終端機輸入 : 1. `$ npm install hexo-cli -g` 2. `$ hexo init blog` 3. `$ cd blog` 4. `$ npm install` 5. `$ hexo server` or `$ hexo s` ### 2. 放置文章 1. `$ cd blog\source\_posts` 2. 在此新增文章 ( 為 Markdown 語法 ) ### 3. 更換主題 1. `$ cd blog\themes` 2. 在此放置主題 3. [主題庫](https://hexo.io/themes/) 每個裡面都有介紹如何使用 ### 4. 佈署上 Git hub 1. 編輯 `_config.yml` ``` deploy: type: git ``` 2. 安裝 hexo-deployer-git ``` $ npm install hexo-deployer-git --save ``` 3. 修改 `_config.yml` ``` deploy: type: git repo: <repository url> //儲存庫(Repository)網址 branch: [branch] //分支名稱,建議新增一個 branch : gh-pages,master 放程式碼 ``` ``` url: https://<your name>.github.io/<your repository name>/ root: /<your repository name>/ ``` 4. 終端機輸入 `hexo d -g` ###### tags: `實作` `Hexo Blog`