# 蔡承翰 材料三 # 410622022 部落格: https://donbamaster.github.io/ --- ## 今天為大家帶來 # github部落格の製作教學 --- # 註冊 Github 帳號 - GitHub官網:https://github.com/ --- # 建立 Github Pages - 在Github畫面,點Start a Project ![](https://i.imgur.com/1kcbM92.jpg) --- - 為專案名稱取名 ![](https://i.imgur.com/xRi0OK3.jpg) --- - 接著進入專案,到 Settings頁面,選一個暫時的主題 ![](https://i.imgur.com/AtqnvuC.jpg) --- # 建立Hexo環境 ## 安裝相關軟體 - Node.js - Git - Notepad++ (文字編輯器) - Xcode (Mac用戶使用) --- Node.js 注意要點左邊的喔,我之前點右邊就一直Re了 ![](https://i.imgur.com/xOVrUvQ.jpg) --- Git ![](https://i.imgur.com/5gkG3UI.jpg) --- - 安裝好以上軟體後,開啟命令提示字元 ![](https://i.imgur.com/ke3cVG9.png) --- - 並輸入以下指令安裝 Hexo: npm install -g hexo-cli ![](https://i.imgur.com/h7Gtdml.png) --- - 安裝Hexo後,輸入指令初始化 Hexo 部落格 1.hexo init 'name' //'name'的地方輸入想要的資料夾名稱 2 cd name //進入到剛剛建立的資料夾中 3.npm install //安裝 Hexo 4.npm install hexo-deployer-git --save //安裝 git 部署套件 ![](https://i.imgur.com/IGJrZSY.png) --- # 設定部落格相關資訊 --- - 在建立好的Hexo資料夾→對 _config.yml 這個檔案點右鍵→啟動文字編輯軟體 ![](https://i.imgur.com/l4D8ybx.png) --- - 打開 _config.yml 後,修改第 6~12 行,輸入完按下 Ctrl+S 存檔: - 1.title //輸入部落格標題 - 2.subtitle //輸入副標題 - 3.description //輸入網站描述 - 4.keywords //輸入網站關鍵字 - 5.author //輸入姓名或暱稱 - 6.language //輸入要使用的語言 - 7.timezone //留空以使用系統時間 --- ![](https://i.imgur.com/0LqH9Pd.png) --- - 接著在第16行的地方把url換成自己網站的連結, https://username.github.io/ username是自己的Github帳號 ![](https://i.imgur.com/NI3va1x.png) - 這樣就初步完成部落格的個人化設定了 --- # 部署至GitHub --- - 在 _config.yml底部deploy的地方輸入以下設定: - 1.type: git - 2.repo: https://github.com/username/username.github.io.git(按:username為自己的Github帳號) - 3.branch: master ![](https://i.imgur.com/JLssFUn.png) --- - 首先確認路徑是在自己命名的資料夾根目錄下(ex.cd fox ) - 接著輸入下面三條指令: 1.hexo cl(=hexo clean) #清除之前建立的靜態檔案 2.hexo g(=hexo generate) #建立靜態檔案 3.hexo d(=hexo deplay) #部署至 Github Pages,需登入Github --- - 在輸入這三條指令時,我出現過錯誤訊息,我之前就一直卡在這邊,不過出現登入畫面大概就沒問題了(? - ![](https://i.imgur.com/bbp9ur8.png) --- - 完成後就可以在瀏覽器看到自己的網站啦!! ![](https://i.imgur.com/tuPP9dO.png) --- 再命令提示字元中輸入hexo new post ![](https://i.imgur.com/JwBDEVM.png) 資料夾source會出現posts編輯post.md --- 想要圖片的話可用Hackmd轉換圖片再貼上 ![](https://i.imgur.com/cqhJ6ZF.png) --- 成品~~~~~~~~~~~~~~ ![](https://i.imgur.com/etA3g0Z.jpg) # 參考網站 - 1. https://ed521.github.io/2019/07/hexo-install/-- [教學] 使用 GitHub Pages + Hexo 來架設個人部落格 - 2. https://www.larrynote.com/website-service/31/-- Hexo + Github Pages:手把手教你打造免費個人部落格 --- # 謝謝老師和同學們的指導和聆聽!
{"metaMigratedAt":"2023-06-15T08:13:06.055Z","metaMigratedFrom":"Content","title":"蔡承翰 材料三","breaks":true,"contributors":"[{\"id\":\"b9e2b29a-6705-4165-82bc-81e652a4716c\",\"add\":3693,\"del\":1281}]"}
    164 views