Skip to content

使用 Hugo 主題 LoveIt 架設 blog 資源紀錄

davidlei

這個 blog 使用了 LoveIt 主題。

詳細的設定參數都是參考其官方部落格,寫得相當詳細,很值得參考。

至於與 GitHub Pages 連動的部分,網路上有很多不同的解法,這裡分享我自己用的方式。

由於 GitHub Pages 只認得 docspublic 這兩個資料夾來存放靜態檔案,因此需要把 Hugo 生成的靜態檔案放到專案根目錄的 /docs/public 下。以下是我的專案架構:

其中 blog 是 Hugo 的主要工作目錄,docs 則是讓 GitHub Pages 讀取靜態檔案的目錄。

/blog 新增文章後,用指定目錄的方式讓靜態檔案生成到 /docs,再推上 GitHub:

hugo -d ../docs
cd ..
git add . 
git commit -m "update"
git push

reference

Edit this post
Previous
C Function Pointer 基礎用法整理
Next
The Google File System (GFS) 論文心得