
官網
基於go 語言開發
官網地址:https://gohugo.io/
環境
1.Homebrew
如果你是macOS用戶,請使用Homebrew快速安裝
2.Chocolatey
如果你是windows用戶,請使用Chocolatey快速安裝
環境配置請參考本站對應安裝教程
快速開始
-
安裝 hugo
brew install hugo -
創建博客工程
使用如下命令新建一個名為
mysite的網站:hugo new site mysite -
創建一片文章
hugo new post/first.md
主題安裝
-
下載主題
官網主題地址:https://themes.gohugo.io/
把主題通過git克隆或直接下載到本地。放到 …/blog/themes/目錄下
cd themes git clone https://github.com/vjeantet/hugo-theme-casper.git casper -
編譯預覽
hugo server -t casper -D打開網址 http://localhost:1313/ 即可查看本地生成的靜態網站
-
主題推薦
