Scenario components

Configure complete reading, release, landing-page, and Book publishing workflows from local content and data.

Scenario Components solve a complete publishing job rather than one fragment of a page. Each scenario coordinates content, local data, navigation, runtime loading, accessibility, and non-HTML output behind one strict contract.

They complement the component reference: use that chapter to look up an individual writing primitive, and use this chapter when the job spans multiple pages, files, or output formats.

Choose a scenario

Scenario Use it when you need Primary source of truth
Sequential reading A manual, Book, or blog should have a dependable sequence Sidebar/content tree and page metadata
Releases and downloads Release facts, assets, and install paths must agree Front matter and data/download/
Landing pages A product page needs reusable full-width sections data/landing/ or inline section data
Book publishing Long-form work needs numbering, citations, and print Existing Book tree and stable page IDs

Shared guarantees

  • Local facts: normal builds do not fetch release state, stars, prices, screenshots, avatars, or other mutable facts from remote APIs.
  • Static first: HTML contains the complete content before progressive enhancement; a page receives JavaScript only for the capabilities it uses.
  • Strict input: malformed parameters, identifiers, URLs, checksums, or data records fail the build with a useful source position.
  • Output aware: HTML, print, Markdown, and RSS either receive a defined representation or deliberately omit interaction-only content.
  • One navigation authority: the visible content tree also drives pagers, Book tables of contents, and aggregate print order.
  • Language safe: shared facts use documented suffix fallback, while narrative data may be maintained per language.

Before adoption

Pin the minimum release that owns these contracts:

GO
require github.com/pgsty/oink v0.4.1

Use Hugo Extended 0.160.1 or newer. Adopt one scenario at a time, build every configured output, and inspect the result in each language. A local build, a public theme tag, a site version pin, and a hosted deployment are separate evidence gates; do not infer one from another.

For an existing Oink site, start with the 0.4.0 upgrade guide.

Sequential reading and mathematics

Configure the shared docs, Book, and blog pager and render mathematics with local server-side KaTeX.

Releases and downloads

Keep release facts, archive links, checksums, and rolling or pinned download channels consistent without remote API calls.

Landing pages

Compose reusable, full-width product pages from local, language-aware data and Oink’s validated section registry.

Book publishing

Publish long-form content with one navigation tree, numbered components, stable cross-references, generated indexes, and whole-Book print HTML.