A static blog built with Hugo and the PaperMod theme, deployed to GitHub Pages. Comments are powered by Giscus (GitHub Discussions). Originally migrated from WordPress.
Live site: https://mathieson.github.io/blog/
| Tool | Version | Install |
|---|---|---|
| Hugo (extended) | ≥ 0.120 | brew install hugo (macOS) |
| Git | any | Required for theme submodule |
After cloning, initialise the PaperMod theme submodule:
git submodule update --init --recursive./preview.sh
# or: hugo server -D --source siteOpen http://localhost:1313. The -D flag includes draft posts.
Draft posts have draft = true in their frontmatter. They are visible locally with -D but excluded from production builds. To publish a draft, change draft = true → draft = false.
- Enable Discussions: repo Settings → Features → Discussions.
- Install the Giscus GitHub App and grant it access to your repo.
- Visit https://giscus.app, enter your repo name, and copy the generated values.
- Paste
repo,repoId,category, andcategoryIdinto the[params.giscus]block insite/hugo.toml.
If migrating from WordPress, run migrate_comments.py to import comments as GitHub Discussion replies:
uv run --with requests migrate_comments.py \
--xml <your-wordpress-export.xml> \
--repo mathieson/blog \
--category Announcements \
--base-path blog \
--token <your-github-pat>A GitHub personal access token with repo and discussions:write scopes is required. Create one at https://github.com/settings/tokens.
Deployment is fully automated via GitHub Actions (.github/workflows/deploy.yml). Every push to main triggers a build-and-deploy pipeline:
- Checks out the repo (including the PaperMod submodule)
- Installs Hugo extended
- Runs
hugo --source site - Publishes the output to GitHub Pages
Before the workflow can deploy, configure Pages in your repo:
- Go to repo Settings → Pages
- Under Build and deployment → Source, select GitHub Actions
After that, every push to main will deploy automatically. The live URL appears in the Actions run log and on the Pages settings page.