# Phan Thi Thu Trang ## 企管一 410832067 --- # Hexo 部落格 --- # 1. 下載 Node.js --- ![](https://i.imgur.com/edriS2C.png) --- # 2. 申請 Github 帳號 --- ![](https://i.imgur.com/udO5VCf.png) --- # 3. 安裝 Hexo --- npm install -g hexo-cli --- # 4. 初始化 Hexo 部落格 --- hexo init name //初始化新的 Hexo,會在當前路徑建立一個叫 name 的資料夾,資料夾名稱可以隨意取 --- ![](https://i.imgur.com/sMV3Slf.png) --- cd name //進入您剛剛建立的 name 資料夾當中 --- ![](https://i.imgur.com/aGrfXcK.png) --- npm install //安裝 Hexo npm install hexo-deployer-git --save //安裝 git 部署套件 --- 進入剛設定好的 Hexo 資料夾之後(本範例資料夾名稱為 blog1 ),先找到 _config.yml 這個檔案,然後對它點右鍵 -> Edit with Notepad++ (或是用自己習慣的文字編輯器打開)。 --- ![](https://i.imgur.com/r3ftXj3.jpg) --- ![](https://i.imgur.com/JZ3xieR.png) --- # 5. 打開 _config.yml 後,修改第 6~12 行資訊 --- title: //輸入部落格標題 subtitle: //輸入副標題 description: //輸入網站描述 keywords: //輸入網站關鍵字(以逗號隔開) author: //輸入姓名或暱稱 language: //輸入您所使用的語言 timezone: //留空以使用系統時間 ![](https://i.imgur.com/mJw2TD8.png) --- # 6. 接著第 16 行的地方,url 請換成自己網站的連結 --- https://username.github.io/, username是自己的 GitHub 帳號 > url: https://username.github.io/ --- ![](https://i.imgur.com/weQYQly.jpg) --- # 7. 設定部署至 GitHub 的資訊 --- deploy: type: git repo: https://github.com/username/username.github.io.git branch: master --- ![](https://i.imgur.com/jk5IFmM.png) --- # 8. 部署至 GitHub --- ## hexo g //建立靜態檔案,也可以輸入 hexo generate --- ![](https://i.imgur.com/OqHekEH.png) --- ## hexo d //部署至 Github Pages,也可以輸入 hexo deploy --- ![](https://i.imgur.com/FAwEn53.png) --- # 9. 改主題 --- > https://hexo.io/themes/ --- ![](https://i.imgur.com/o9KcHlQ.png) ## 將主題的檔案 clone 下來: ## git clone {主題的 github 連結} {創建資料夾名} --- ![](https://i.imgur.com/K9km2Cc.png) --- ![](https://i.imgur.com/4T5uV5K.png) --- # 10. 新增文章 ## hexo new [layout] <title> --- ![](https://i.imgur.com/C6H6wdC.png) --- hexo g hexo d --- 參考 https://www.youtube.com/watch?v=tEFKJeAtGqk&t=121s
{"metaMigratedAt":"2023-06-15T07:57:09.202Z","metaMigratedFrom":"Content","title":"Phan Thi Thu Trang","breaks":true,"contributors":"[{\"id\":\"d27dff17-71a8-4eef-8b87-b1f2c3b4b2e0\",\"add\":2847,\"del\":914}]"}
    220 views