A small, production-ready skeleton for open-source project sites built with OINK and Hugo. It ships with English, Simplified Chinese, and French home pages; Blog, Docs, and Book content; and deployment workflows for GitHub Pages and Cloudflare Pages.
No OINK documentation, analytics account, comment repository, regression suite, or project-specific brand is included. Google Analytics and Giscus stay fully commented until you configure them.
Select Use this template on GitHub, create your repository, then run three commands:
git clone https://github.com/YOU/YOUR-REPOSITORY.git
cd YOUR-REPOSITORY
hugo serverOpen http://localhost:1313/. The first run downloads the pinned OINK Hugo Module. Building the site requires Git, Go 1.27 or newer, and Hugo Extended 0.165.0 or newer; it does not require Node.js or npm.
Cloning this original template is also exactly three commands:
git clone https://github.com/pgsty/oink-starter.git
cd oink-starter
hugo serverThe default site works unchanged. For a real project, start with only these edits:
- Change
Project Nameandhttps://example.org/at the top ofhugo.yaml. - Replace the three compact home-page files under
data/home/. - Rewrite or delete the sample pages under
content/.
The title uses one YAML anchor, so one edit changes all three languages. Navigation lives with each section’s translated _index page; renaming a section does not require editing a second menu tree. Replace assets/icons/logo.svg and static/favicon.svg only when you have real project artwork.
Common optional settings are already organized and commented in hugo.yaml: repository links, Giscus, Google Analytics, accent color, typography, image zoom, sharing, and feedback. Uncomment a complete block only when you are ready to operate that integration.
content/
├── blog/
│ ├── post/ articles
│ ├── design/ design notes and decisions
│ └── release/ release announcements
├── docs/
│ ├── introduction/
│ ├── get-started/
│ ├── tutorial/
│ └── reference/
└── book/ a short tutorial about this starter
English files end in .md; their Chinese and French peers end in .zh.md and .fr.md. Keep translated files side by side and keep explicit heading IDs aligned.
The root hugo.yaml enables English, Chinese, and French. Two copy-ready alternatives are included:
cp examples/hugo.single.yaml hugo.yaml # English only
cp examples/hugo.bilingual.yaml hugo.yaml # English + ChineseThe profiles keep unused languages declared but disabled, so Hugo recognizes their suffixes and safely ignores their content. Restore the three-language configuration from Git before switching profiles again.
Preview while writing:
hugo serverRun the publication gate locally:
hugo --cleanDestinationDir --gc --minify --environment production \
--printPathWarnings --panicOnWarningGenerated public/, resources/, and caches are ignored by Git.
- Open Settings → Pages and choose GitHub Actions as the source.
- Push
main, or run Deploy to GitHub Pages manually from the Actions tab.
.github/workflows/github-pages.yaml installs the pinned toolchain, performs a warning-strict production build, calculates the correct GitHub project subpath, and publishes the artifact through the Pages deployment API.
The Cloudflare workflow uses Direct Upload so the same warning-strict build runs in GitHub Actions.
- Create a Cloudflare Pages Direct Upload project. Use the repository name as the project name, or set a repository variable named
CLOUDFLARE_PROJECT_NAME. - Add repository secrets
CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_TOKEN. The token needs Account → Cloudflare Pages → Edit. - Run Deploy to Cloudflare Pages manually once. To deploy every push to
main, add the repository variableCLOUDFLARE_PAGES_ENABLED=true.
The default canonical address is https://<project>.pages.dev/. Set CLOUDFLARE_SITE_URL to a custom production URL when you attach a domain.
Cloudflare Git integration is a separate deployment mode. Use either Git integration or this Direct Upload workflow for a given Pages project, not both.
A local build, a committed change, a pushed branch, a green deployment workflow, and correct public rendering are separate gates. After deployment, inspect /, /zh/, and /fr/, plus representative Blog, Docs, and Book pages on desktop and mobile.
MIT. Replace the generic copyright line when adopting the template.