This is the source for Han Wuguang's Tech Blog.
Some minor customizations were done on the PaperMod theme:
assetslayoutsstatic
- hugo-admonitions - Adds callouts.
- PaperMod - The site's theme. Supports dark mode and search.
Pre-requisites: Install Hugo
- Run
.\hugo.exe server --buildDrafts --buildFuture. - The local site is available at: https://localhost:1313/
- Create a new folder under
content/posts/YYYY/MM/TITLE. This will be the page bundle for the new post. - Create a new
index.mdfile in the page bundle. This file contains the content of your new post. - Build the site locally and test.
To update Hugo,
- Go to https://github.com/gohugoio/hugo/releases to determine the target version.
- Edit the
.github/workflows/hugo.yamlfile and replace the value of the build environment variableHUGO_VERSIONwith the version number (exclude thevprefix) identified in the previous step.
To update modules,
- Go to the module:
cd themes/MODULE_NAME. - Run
git pullto update to the latest version.
- Run
git submobule add --depth=-1 MODULE_GITHUB_URL themes/MODULE_NAME. - Go to the module:
cd themes/MODULE_NAME. - Checkout the version that you want to use.
- Edit
config.ymland add the module to thethemesection. - Run
.\hugo.exe serverto test it out locally.