下載hugo
在C:\Program Files建立hugo資料夾
將壓縮中的hugo.exe放入C:\Program Files\hugo中
設定環境變數 -> 系統變數 -> Path 編輯 -> 新增 “C:\Program Files\hugo”
使用命令字元確認安裝 hugo version
一般 Windows 使用者(大多數情況):
hugo_extended_0.140.2_Windows-amd64.zip
如果你確定不需要 SCSS(例如使用簡單主題或純 HTML/CSS):
hugo_0.140.2_Windows-amd64.zip
新增資料夾並且開啟命令字元:
mkdir D:\my_new_website
cd my_new_website
在終端機建立一個新網站,如果是直接下載現有的 Hugo 主題,直接跳到第3步。
hugo new site my-website
初始化一個全新的網站,這會在當前目錄下建立一個名為 my-website 的資料夾。
下載主題:git clone [github網頁] themes/diary
git clone https://github.com/AmazingRise/hugo-theme-diary.git themes/diary
將D:\website\themes\diary\exampleSite\中內容剪下,貼到website資料夾中。
啟動 Hugo 伺服器,檢查是否正常運作。
hugo server