This is the source of Hanson's weblog, built with Hugo and deployed on Cloudflare Pages.
- Static site generator: Hugo (extended), currently
0.148.2 - Theme: PaperMod, vendored as a git submodule at
themes/papermod - Hosting / CI: Cloudflare Pages, building directly from this repo on every push to
main(no GitHub Actions workflow is used) - Content: Bilingual (English / Chinese) Markdown posts
config/_default/ # Split Hugo config: hugo.yml, params.yml, languages.en.yml, languages.zh.yml
content/posts/ # Blog posts, organized as content/posts/<year>/<slug>/index.md
archetypes/ # `hugo new` post template
static/ # Files served as-is (favicon, CNAME, images)
themes/papermod/ # PaperMod theme (git submodule)
Posts are Hugo page bundles — each lives in its own folder (content/posts/<year>/<slug>/index.md) alongside any images it references.
Clone the repo with submodules (needed to pull in the PaperMod theme):
git clone --recurse-submodules https://github.com/hanson2010/hanson2010.github.io.gitIf you already cloned without --recurse-submodules:
git submodule update --init --recursiveRequires the extended edition of Hugo (0.148.2, matching production — see Deployment).
Run the dev server with drafts and future-dated posts visible:
hugo server -D -FBuild the site to public/ (matches the production build):
hugohugo new posts/<year>/<slug>/index.mdThis uses archetypes/default.md, which sets date and draft: true. Add title, categories, and tags manually — see existing posts under content/posts/ for conventions. Set draft: false when ready to publish.
The site is hosted on Cloudflare Pages, connected directly to this GitHub repository. Cloudflare builds and deploys automatically on every push to main (and generates preview deployments for other branches/PRs). Dashboard build settings:
| Setting | Value |
|---|---|
| Build command | hugo |
| Build output directory | public |
| Environment variable | HUGO_VERSION=0.148.2 |
There is no build configuration checked into this repo (an earlier GitHub Actions + GitHub Pages workflow was removed when the project moved to Cloudflare Pages) — the settings above live only in the Cloudflare Pages dashboard.
The theme is a git submodule. To pull in updates:
git submodule update --remote themes/papermod
git add themes/papermod
git commit -m "Update papermod theme"