Releases and downloads
Oink separates immutable release facts from their presentation. A release page owns the version and repository identity; local download data owns distribution channels. Cards, lists, checksum tables, documentation pages, and Landing pages derive from those records instead of copying URLs and commands into several templates.
Define release facts
Add a strict release map to the page front matter:
version and repo are required. Omit tag to derive v{version} and omit
date to use the page date. Optional product, prev, and checksums fields
complete the record. Unknown keys, wrong types, or a repository outside the
owner/name form fail the build.
For a simple GitHub release, the exact tag URL is also accepted as shorthand:
Oink derives repository, release, archive, compare, checksum, and asset links locally. It does not call GitHub during a build and does not claim that a tag or asset exists remotely.
Render the release card
Place the parameter-free shortcode where the fact summary should appear:
The invocation accepts no facts and no parameters; the page front matter is the only authority. HTML receives a semantic link card with no runtime. Print and RSS receive a static link list, and Markdown receives ordinary Markdown links.
Build a release index
A release section can opt into deterministic ordering:
Pages sort by normalized release date descending, then valid SemVer precedence,
then a deterministic lexical fallback. The default is one global sequence.
release_group_by_product: true requires each selected page to define
product. release_products accepts one product or an array, matches the
product string exactly, and filters before sorting. Invalid filters fail instead
of rendering a plausible but empty page.
Publish checksum assets
Write exact sha*sum lines inside release-assets:
Or commit a checksum file as a page or Hugo asset and reference exactly one source:
The parser rejects malformed lines with their line number, mixed algorithms, algorithm/hash-length disagreement, path-like filenames, and ambiguous input sources. HTML links each asset and conditionally loads one local copy runtime; print shows complete hashes without controls; Markdown and RSS emit full-hash tables.
group="auto" groups common platform and architecture names. Use algo only
when declaring the expected checksum algorithm, and base only when the asset
base differs from the URL derived from release facts.
Define download channels once
Create data/download/pig.yaml:
A record needs a string version directly or through params.version, plus a
non-empty channels array. Every channel needs a unique anchor-safe id, one
kind (rolling or pinned), and a localized title.
Shared fields resolve from the exact language suffix, then the primary-language
suffix, then the unsuffixed field. For example, Chinese may resolve
title_zh_cn, then title_zh, then title. Only a pinned channel’s url and
steps[].code may interpolate ${version} or ${tag}. Rolling channels reject
all interpolation so a stable command cannot accidentally pretend to be pinned.
Render downloads
Reference the data key with one positional parameter:
HTML renders a channel index and static-first sections. Code steps reuse Oink’s enhanced code renderer; checksum channels reuse Release Assets. Print expands the same safe content, Markdown emits headings, source fences, and full hashes, and RSS omits the component.
Set published: false before the immutable release exists. Rolling channels
remain usable, while pinned channels show a non-linking pending state, omit
pinned commands, and disable asset links and copy controls. Flip the fact only
after the tag and assets resolve; never paste speculative links into prose.
A Landing page can consume the same record with a download section:
Release checklist
- Confirm the version, tag, previous tag, repository, and date from the source release process.
- Validate every checksum against the published artifact before committing it.
- Build HTML, print, and Markdown; inspect complete hashes outside HTML.
- Test
published: falsebefore publication andtrueonly after the remote tag and assets resolve. - Verify every language and a subpath deployment.
- Treat source completion, theme tag publication, module resolution, consumer pinning, and hosted availability as separate gates.