10 Publish, deploy and keep up to date
A site is finished when readers can reach it and it stays correct as OINK moves on. The Starter already carries the build settings and the deployment workflows, so this chapter is mostly about knowing what each one does: what the build publishes besides HTML, how to deploy Acme DB’s site, and how to take the next OINK release.
Publish more than HTML
Every page can be published in several forms at once. The Starter lists them
under outputs in hugo.yaml:
| Output | Published at | Who it serves |
|---|---|---|
HTML |
Every page | Readers in a browser |
markdown |
The page address plus index.md |
AI assistants, and the Copy Markdown and View Markdown page actions |
LLMS |
/llms.txt, one per language |
An agent finding out what the site contains |
print |
/_print/ plus the section path |
Readers printing or saving a whole section as a PDF |
RSS |
The section path plus index.xml |
Feed readers |
LLMSFULL |
/docs/llms-full.txt, when the Docs root lists it |
An agent reading the whole manual in one request |
NAVJSON |
/navigation.json, when the home page lists it |
An agent planning which pages to read |
Each key replaces the whole list for that kind of page, so when you add a
format, keep the ones already there; a format left out simply stops being
published, without a warning. This site publishes all seven, so you can try
them here: press M for this page’s Markdown, or open
/llms.txt.
Two more page actions hand the page to an assistant: Open in ChatGPT and Open in Claude. They send the page’s address to that service, so they stay off until you turn them on:
Build for production
Run the production build from Chapter 2 before
every deployment that changes configuration. It is the same command the
Starter’s workflows run, so a warning you see locally is a warning your host
would print. Then commit hugo.yaml, go.mod and go.sum with your content.
Never commit a local module replacement: the host would look for a theme path
that exists only on your machine.
Deploy
The Starter ships two workflows in .github/workflows/. Pick the host and
follow its steps:
- GitHub Pages. In the repository’s Settings → Pages, set Source
to GitHub Actions. Every push to
mainthen builds the site and publishes it, with GitHub’s Pages address, subpath included, passed in asbaseURL. - Cloudflare Pages. Create a Pages project of the Direct Upload kind,
then add the repository secrets
CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_TOKEN. The workflow builds in GitHub Actions and uploads the result. - Check the live site. Open the address the workflow prints, switch
languages, search, and open one page’s
index.md.
On your own domain, set baseURL to it in hugo.yaml first: canonical links,
feeds, llms.txt and social cards are all written with it.
Deploy covers other hosts, preview deployments that
search engines should not index, and rollback.
Comments and analytics
Anything that would contact another service, comments through Giscus, Google Analytics, a hosted search, stays off until it is configured completely. A half-filled block keeps the feature off rather than falling back to a public default, and analytics run only in production builds, so previews are never tracked. Comments and Analytics list the keys.
Upgrade OINK
The site is pinned to one OINK release in go.mod, so it builds the same way
until you decide otherwise. To move to a new release, read its notes first,
then pin the exact tag:
Pin a published tag, never a branch or @latest, so the same commit of your
site always builds the same site. Run the production build, read the warnings,
which name any setting the release renamed, look at a few pages in both
languages, and commit go.mod and go.sum together.
Upgrade lists what changed in each release. If you
installed the OINK skill, download it again too: it names the release it was
written for.
Know which stage you are at
“It works” means different things at different stages. Say which one you mean, in a pull request or to your agent:
| Stage | What it proves | What it does not |
|---|---|---|
| Local preview | Pages render and edits show up | That the production build is clean |
| Production build | Content, configuration and the pinned release build together | That the host builds it the same way |
| Workflow passed | The host built and uploaded the site | That the live pages look right |
| Live site checked | Readers get the site you reviewed | Anything about the next change |
Check your work
- The production build ends with
Total in …, and you have read every warning above it. - The live site serves both languages, search,
llms.txtand a page’sindex.md. go.modnames an exact OINK tag, andhugo mod graphshows the same one.
Ask your agent
Where to go next
You have built every layer of an OINK site once. From here, the reference answers the questions this book did not:
- Components — One page per component, with every option and its output in print and Markdown.
- Customization — Navigation, search, languages, versions and print, setting by setting.
- Case library — Forty-odd production sites, each with what it demonstrates and how.
- Get started — The OINK skill, to install for your agent.