Below you will find pages that utilize the taxonomy term “Hugo”
October 7, 2023
Hugo + GitHub + GA4 建置個人部落格
QuickStart 安裝 hugo brew install hugo 創建 hugo 的目錄結構,目錄名稱為 quickstart hugo new site quickstart 切換當前目錄到 quickstart cd quickstart 初始化 git git init Clone Ananke 的 theme 到自己的 theme git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke 設定現在的 theme 是 ananke echo "theme = 'ananke'" >> hugo.toml 啟動 server hugo server 啟動後大概就是長這個樣子 創建第一個頁面 hugo new content posts/my-first-post.md 確認頁面的資料 +++ title: "My First Post" date: 2023-10-07T10:26:52+08:00 draft: true +++ 在底下就可以進行撰寫了,以下是我的文章內容 +++ title = '使用 Hugo 建置 Blog' date = 2023-10-07T10:26:52+08:00 draft = false +++ ## QuickStart --- #### 安裝 hugo brew install hugo #### 創建 hugo 的目錄結構,目錄名稱為 quickstart hugo new site quickstart 雖然剛剛新增了頁面,但其實你現在應該看不到這個頁面,所以要先終止原先的 hugo server 使用 development 模式才可以看到 draft 為 true 的頁面 以下兩個都可以