Starter repository tour
This page describes the repository created from
pgsty/oink-starter. It is not a tour
of the much larger oink.pgsty.com documentation and regression repository.
The theme source is not copied into either site: go.mod pins it as a Hugo
Module, and Hugo stores the resolved source in the Go module cache.
Top-level map
oink-starter/
oink-starter/
- hugo.yamlidentity, languages, outputs, parameters, module import
- go.modsite module and exact OINK release
- go.summodule checksums
examples/
- hugo.single.yamlEnglish-only complete profile
- hugo.bilingual.yamlEnglish + Chinese complete profile
data/
home/
- en.yamlone compact landing page per language
- zh.yaml
- fr.yaml
content/
- _index.mdlanguage home roots
- _index.zh.md
- _index.fr.md
- docs/Introduction, Get Started, Tutorial, Reference
- blog/posts, design records, release announcements
- book/sequential tutorial about the Starter
assets/
- icons/logo.svgprocessed project logo
static/
- favicon.svgcopied unchanged to the site root
i18n/
- fr.yamlStarter-specific French interface overrides
.github/workflows/
- github-pages.yamlstrict build and GitHub Pages deployment
- cloudflare-pages.yamlstrict build and Cloudflare Direct Upload
- README.mdoperating summary for repository maintainers
- LICENSEtemplate source license
Generated public/, resources/, .hugo_build.lock, and module caches are
ignored build state, not source.
What to change first
| Path | Responsibility | Initial action |
|---|---|---|
hugo.yaml |
Identity, canonical URL, languages, outputs, theme features, optional integrations | Change the two marked values; choose a language profile before other edits |
data/home/ |
Home-page promise, cards, calls to action | Rewrite every enabled language after one language is approved |
content/ |
All reader-facing material | Replace example leaves; keep a section root until deciding to remove that whole surface |
assets/icons/logo.svg |
Processed logo | Replace only with final artwork |
static/favicon.svg |
Browser icon | Replace together with the logo review |
params.github_* in hugo.yaml |
Edit/history/new-page/issue links | Uncomment only after the destination repository exists |
What to keep
go.modandgo.sum: together they pin and verify OINK v1.0.0. Commit both.- The three Goldmark settings in
hugo.yaml: native Steps, Cards, Fields, image attributes, and Book targets depend on them. outputs: removingmarkdown,LLMS, orprintintentionally removes the corresponding Markdown, agent-index, or print surfaces.fetch-depth: 0in workflows whenenableGitInfostays on: last-modified and contributor facts need repository history.GOWORK: offandHUGO_MODULE_WORKSPACE: offin CI: a developer’s local workspace must not replace the published release being verified.
Optional surfaces
Docs, Blog, and Book are independent top-level surfaces. To remove one safely:
- delete its
content/<surface>/tree; - remove any home-page card or link that targets it;
- confirm no other page links to it;
- run a warning-strict build and inspect the remaining top navigation.
Do not delete only translated section roots: that creates language-specific navigation and fallback behaviour that is difficult to distinguish from a mistake. Remove a surface in all enabled languages or document the asymmetry.
The two configuration profiles under examples/ are optional after the
language decision. They are useful references, but the root hugo.yaml is the
only active site configuration.
Content and navigation
Under Docs and Book, directory structure and weight form the sidebar and
pager sequence. Top navigation comes from menus.main on section roots. A
translated root repeats the same identifier, parent, and weight while
translating visible labels.
The Starter intentionally demonstrates the Documentation System model:
- Introduction explains what and why;
- Get Started gets a new user to a result;
- Tutorial teaches an end-to-end task;
- Reference records exact supported behaviour.
Rename or reshape those sections for the project, but preserve the separation between learning paths rather than mixing every kind of answer into one tree.
Language model
English source files end in .md; Chinese and French peers end in .zh.md and
.fr.md. Home data uses language keys under data/home/. The root profile
declares the languages, their locale, order, and site description.
The single and bilingual profiles keep disabled languages declared. This is intentional: Hugo then recognizes the unused suffixes as translations instead of rendering several files onto one English URL. Copy a profile only before project-specific configuration begins; afterwards merge changes by hand.
Where OINK lives
Two files establish the module boundary:
hugo mod graph shows the resolved version. Production follows the exact tag
in go.mod; a local HUGO_MODULE_REPLACEMENTS value is a development override
and must never be committed or treated as release proof.
Deployment files
The GitHub Pages workflow runs automatically on pushes to main; repository
settings must select GitHub Actions as the Pages source. The Cloudflare workflow
runs manually, or automatically only after the repository variable
CLOUDFLARE_PAGES_ENABLED=true is set. Its required account ID and API token
remain repository secrets.
Keep only the workflows for deployment paths you operate. Cloudflare Direct Upload and Cloudflare Git integration are alternative ownership models for the same project, not two gates to run together.
Safe customization order
- Prove the untouched preview.
- Change identity and select languages.
- Replace one home page and then its translations.
- Replace content and verify navigation.
- Change brand and reader features one group at a time.
- Enable complete external integrations.
- Run the strict production build.
- Deploy, then verify production independently.
Commit between layers when the repository is already yours. Small boundaries make a later regression or rollback attributable to one decision.
Verify
The module graph names the pinned release, the build emits no warning or error,
and Git status contains source edits but no public/ or cache files. Then open
the enabled language roots and one Docs, Blog, and Book route before moving to
deployment.
Related
- Use OINK Starter — the complete layered workflow
- From scratch — add OINK without adopting this content model
- Organizing content — sidebar, pager, and menu authority
- Configuration — every current site parameter
- Deploy — host-specific setup and production checks