--- tags: GDSC --- # 沒有個人網誌 為甚麼不試試看Hexo Part 2 > 國立雲林科技大學 Lead Tim --- ### 上次簡報 [有個人網誌 為甚麼不試試看Hexo Part 1](https://hackmd.io/@fan9704/B1cvN_Ybs) --- ### 預設主題好普通? 我就是要不同 ---- ##### Step 1. [找到喜歡的template](https://hexo.io/themes/) 通常都會提供GitHub Link 找到他 [Shoka Theme Link](https://github.com/amehime/hexo-theme-shoka) ---- ##### Step 2. Terminal進到你之前有的hexo專案內的themes資料夾 沒有專案的請參考 Part 1 ```bash= cd <Project-Name/themes> git clone <Theme GitHub link> ``` ![](https://i.imgur.com/eEbbAhN.png) PS: 將clone 下來的主題專案改名叫shoka ---- ##### Step 3. 將Hexo 專案配置剛剛clone的theme 要修改的地方是 _config.yml 主題名稱會跟clone下來的資料夾名稱相同 **注意:是專案底下的_config.yml不是主題下的** ![](https://i.imgur.com/GYF9he9.png) ---- ##### Step 4. 記得看你所選的主題有沒有需要安裝其他Plugins ![](https://i.imgur.com/zevSe4V.png) 看起來要裝的很多呢~~ ```shell= yarn add hexo-renderer-multi-markdown-it yarn add hexo-autoprefixer yarn add hexo-algoliasearch yarn add hexo-symbols-count-time yarn add hexo-feed yarn install ``` ---- ##### Step 5. 我以為都好了 阿怎麼不是我哩 ```shell= hexo s ``` ![](https://i.imgur.com/qZ1FbiT.jpg) ---- ##### Step 6. 當然要改成我的阿 才叫做MyBlog 這時候需要透過更改主體專案底下的_config.yml來換成自己的名字了。 ![](https://i.imgur.com/WtSn9Q3.png) ---- ###### 耶比是我的名字了 ![](https://i.imgur.com/49z8eCe.jpg) 但這... 其實是網站名稱,真正的作者名稱要在Hexo 專案下的_config.yml進行更改。 ---- ##### Step 7. 真正的作者名稱 > 順帶一提這個設置,設置一次後不論換任何的主題都可以沿用下去,畢竟是Project設定。 ![](https://i.imgur.com/CMnB1lR.png) ---- ###### Hexo專案設定 title > 網站大標 subtitle > 網站副標 description > 網站說明 keywords > 網站搜尋關鍵字 可以打多一點 author > 作者名稱 language > 使用語言 timezone > 時區 ---- ##### Step 8. 差不多了阿這是localhostㄋㄟ 我想要有個地方來架設我的Blog!!!!! 那非常優質的GitHub 有提供Github Page 可以來架設你的靜態網頁,那Hexo是個靜態網頁產生器,那必須用的阿。 順帶一提Hexo 是可以自動部署目前的Hexo Project到GitHub Page那還不趕快使用 ---- ##### Step 9. 設置deploy 現在自己的GitHub 建立一個Repository 名稱叫做 [github username].github.io 且在Repository設定的地方開啟GitHub Page的功能 ![](https://i.imgur.com/RNNUd5P.png) ---- ###### Okay GitHub搞定專案給他綁定Repository ![](https://i.imgur.com/2H5txRK.png) ---- ##### 看我部署之力 ```shell= hexo d #OR hexo deploy ``` ---- ### 參考文章 [手把手 hexo 從零開始教學](https://mushding.space/2021/06/30/%E6%89%8B%E6%8A%8A%E6%89%8B-hexo-%E5%BE%9E%E9%9B%B6%E9%96%8B%E5%A7%8B%E6%95%99%E5%AD%B8/) [建立自己的Blog系列](https://ithelp.ithome.com.tw/articles/10257569) [打造自己的Blog Hexo+GitHub](https://kemushi54.github.io/2019/04/01/%E7%AD%86%E8%A8%98-%E6%89%93%E9%80%A0%E8%87%AA%E5%B7%B1%E7%9A%84-blog%EF%BC%8CHexo-Github-%E4%B9%8B%E4%BA%8C/)