We provide a starter theme template for you to create a HB site quickly.
Install the HB theme in one minute.
Hugo server takes a long time to process on first run to download modules and process a lot of images. You may want to remove the unused images and commit the resources/images
folder to improve the build performance.
1git clone --depth 1 https://github.com/hbstack/theme blog
1cd blog
The blog
is the local directory, change it at will.
Firstly, we need to change the module path located in go.mod
, replace the module github.com/hbstack/theme
with your own, such as module github.com/user/repo
.
1sed -i -e 's/module\ github.com\/hbstack\/theme/module\ github.com\/user\/repo/' go.mod
1git add .
2
3git commit --amend
Modify the commit message, such as First commit
.
1git remote set-url origin https://github.com/user/repo
1git push origin main
If you’re located at China mainland without VPN, the Hugo module download may fail, see Go and Hugo Proxy Servers for setting up the Hugo Modules proxy.
1npm ci
Please note that Go and Node.js are required, read more on build tools.
1npm run dev
1npm run prod
baseURL
, giscus.*
.