Hugo 搭建博客站
[[Hugo]] 是一个基于 Go 的流行开源静态网站生成器。用它可以快速的搭建静态网站,几行指令即可完成。
- 安装 Hugo 连接远端内容
brew update
brew install hugo
...
hugo version
hugo v0.154.5+extended+withdeploy darwin/amd64 BuildDate=2026-01-11T20:53:23Z VendorInfo=Homebrew
- 创建新项目
hugo new site hugo-blog
cd hugo-blog
- 安装主题
git init
git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
echo "theme = 'PaperMod'" >> hugo.toml
- 连接到 Github
git remote add origin ...
git commit -m '...'
git push --set-upstream origin master
- 进行一些小修改,改变Title等元数据
vi hugo.toml
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'PaperMod'