OINK is a Hugo theme for technical documentation: product manuals, project
sites, books and API references, in one language or many. You write plain
Markdown, run hugo, and get a static site with a navigation tree, local
full-text search, light and dark modes, and a print view. The theme ships every
script, font and stylesheet it uses, so the build needs no Node.js, npm or CDN.
New to OINK? Get started has this site running locally in two
minutes and shows how to build your own with an AI agent. Already running
OINK? Read the 1.8.0 release notes, then follow the
upgrade guide.
Where to start
Get started — Clone the docs locally, try the AI agent prompt, or add OINK to a project.
Components — Callouts, tabs, diagrams, cards and more, each with its source beside the result.
OINK Hands-On — Build a site from one prompt, then learn every layer of it in ten hands-on chapters.
Case studies — How production sites solved navigation, migration and landing-page design.
Design and CLI, at the bottom of the sidebar, document how OINK itself
is built and maintained. You do not need them to build a site.
1 - What is OINK
Decide whether OINK fits your project, what you get with it, how it differs from Docsy and MDX-based tools, and where it falls short.
OINK is a Hugo theme for technical documentation that
has outgrown a README: product manuals, API references, books, release pages
and blogs, often in several languages, maintained by engineers rather than a
front-end team. You write Markdown, run hugo, and publish a static site with
a sidebar built from your folders, local full-text search, a print view and a
Markdown copy of every page for AI agents. Every script, font and stylesheet
ships inside the theme, so the build needs no Node.js, npm, Sass or CDN, and
unless you add an integration such as analytics or comments, the theme makes
your readers’ browsers request nothing from third parties.
OINK began as a fork of Docsy. It keeps
Docsy’s content model and multilingual behavior and replaces the shell,
navigation, search and components.
Seventy-nine production sites run on it: 48
independent projects, among them Apache HugeGraph’s bilingual documentation,
a nine-language team portal at Red Hat AI Services, and Cortrix’s AI agent
memory docs, plus 31 sites from the PGSTY and Vonng ecosystem, the largest of
which spans nearly 5,000 Markdown files in eight languages, Arabic included.
One Hugo build produces a static site ready to host
What you get
A build that needs only Hugo. Any edition of Hugo builds the site, and Go
is needed only to download the theme as a Hugo Module. The stylesheet is
plain CSS, so your repository has no Sass compiler, PostCSS step or
package.json. Get started lists the versions.
Components that stay Markdown.> [!NOTE] is a callout, a table followed
by {.fields} is a parameter list, and an image followed by
{caption="…"} is a captioned figure. On GitHub or in any editor the same
source still reads as a quote, a table and an image.
A complete reading shell. Sidebar tree, table of contents, breadcrumbs,
pager, a Cmd/Ctrl + K command palette, keyboard navigation, light and dark
modes and six visual presets.
Search without a service. A BM25 engine in the browser queries an index
Hugo builds for each language, and it finds Chinese, Japanese and Korean
text typed without spaces.
Real multilingual sites. Hugo’s own translation model, an interface
translated into 32 locales, right-to-left scripts, and an optional view that
puts a page beside its translation.
More than documentation. Books with numbered figures and
cross-references, release and download pages generated from YAML, landing
pages assembled from 22 section types, and OpenAPI references rendered by
bundled Swagger UI and Redoc.
Output for people and machines. Print a whole section at once, read any
page as plain Markdown, or point an AI agent at llms.txt.
Highlights describes each capability and links to its
guide.
The theme stops at the static site. Your source can live on GitHub, GitLab or a
private Git server, and Hugo’s output deploys to any static host. Content,
brand and components specific to your product stay in your site; the theme
supplies the shell and the reusable parts.
Is OINK for me
OINK fits when
The site has many pages and mixes documentation, a blog, a book, release pages and an API reference
You publish full translations, not an English site with a translate link
Builds must be reproducible, and the build machine may have no network access
Several sites should share one shell without copying layouts and shortcodes
Nobody on the team is a front-end engineer or wants to maintain a Node toolchain
Look elsewhere when
The site has one or two pages and needs no navigation; a README or a lighter Hugo theme is simpler
The site is mostly application UI; OINK can carry its documentation, but product components stay in your site
You want interactive React components inside your prose (MDX)
You want a completely different look from one switch; beyond the six presets, appearance changes go through CSS tokens and partial overrides
You need a CMS or a WYSIWYG editor
Weigh two more things. Most features are off until you configure them,
including search, dark mode, image zoom, comments, feedback and the Markdown
and agent outputs; the Starter turns
the common ones on for you. And OINK is young and moves quickly: 1.0.0 shipped
in August 2026 and 1.8.0 three months later. Each site pins an exact release,
so nothing changes until you raise the pin, and the
upgrade guide has a section for every release that asks
you to change something.
How it differs from other documentation systems
The usual alternatives are Docsy, which OINK forked, and Node-based systems
built on MDX, such as Docusaurus. These are the differences that tend to decide
the choice:
OINK
Docsy
Docusaurus and other MDX systems
Build tools
Hugo in any edition, plus Go to fetch the theme module
Hugo Extended to compile Sass, plus npm for PostCSS and Autoprefixer
Node.js and npm
Callouts and tabs
Markdown that GitHub also renders: > [!NOTE], fences with {tab="…"}
Shortcodes such as alert and tabpane
MDX, with React components inside the prose
Search
Bundled BM25 engine, one index per language, unspaced CJK included
Lunr offline search, or a hosted service
Algolia DocSearch, or a community plugin for local search
Fonts and scripts
Bundled and served from your own domain; no jQuery
Google Fonts unless switched off; jQuery on every page
Scripts bundled by the Node build
Home page
Sections listed in data/home/<lang>.yaml
blocks/* shortcodes in a Markdown page
A React page
If you already run Docsy, your content and most front matter carry over;
Migrating from Docsy lists what to delete
and convert. If you are comparing Hugo themes such as Docsy and Hextra, build
a copy of your own content tree with each before you decide, because overrides
and language needs show differences no feature list does.
OINK is a hard fork rather than a skin over Docsy, and it keeps Docsy’s source
history, Apache-2.0 obligations and attribution; see
License and acknowledgements.
Start here
Get started — Clone the Starter, preview it, make it yours one piece at a time, and deploy it.
Components — Every component on its own page, source first, then the result.
Showcase — 79 production sites and the OINK features each one uses.
Look up what OINK adds to an ordinary Hugo theme, one capability at a time, with the setting that turns it on and a link to its guide.
Everything here ships in the theme. Some of it works as soon as a page uses
it; the rest waits for one configuration key, named in its section next to the
guide that explains it. If you are still deciding whether OINK suits your
project, read What is OINK first.
Components are written in Markdown
Most components are ordinary Markdown plus an attribute line, so the source
stays readable on GitHub and in any editor. A callout is a > [!NOTE]
blockquote, with ten semantic types and one neutral disclosure. A parameter
list is a table followed by {.fields}, steps and cards are lists followed by
{.steps} or {.cards}, timelines and changelog updates are definition lists
with {.timeline} and headings with {.update}, and images, videos and audio
share Markdown image syntax with {caption="…"}. Tabs are adjacent code fences,
each with a {tab="…"} attribute, and file trees, galleries, maps, Mermaid and
ECharts are fences named after their data language. Outside OINK, all of these
fall back to blockquotes, tables, lists, headings and code blocks with nothing
lost.
For what plain Markdown cannot express, such as cards with icons and images,
or a field entry several paragraphs long, there are 29 shortcodes. Offline
quoted social posts are > [!SOCIAL] callouts, so they stay blockquotes in
plain Markdown. Typeset copy (params.ui.rich_copy, on by
default) also keeps pasted selections clean in rich-text editors such as Notion,
Feishu and Word.
Hugo builds the site in any edition, and nothing else runs during the build.
The theme’s stylesheet is plain CSS that Hugo concatenates, so there is no
Sass, PostCSS, npm or webpack step. Go is needed only to fetch the theme as a
Hugo Module, over the network or from a local module cache; with an offline
archive or a Git submodule in place, Hugo alone builds the site.
In the browser, search, the command palette, diagrams and tabs run as
JavaScript. Those scripts ship with the theme, and each page loads only the
ones its content uses.
Everything the browser needs is committed to the theme repository: Bootstrap
styles, Font Awesome, four font families, Mermaid, KaTeX, Markmap, Swagger UI,
Redoc, Asciinema, ECharts, Infographic, Leaflet and a local PlantUML engine, among
others. VENDOR.json records the version, source, license file and SHA-256
checksum of each one, so you can audit exactly what your site serves.
A feature that could contact another server stays off until you configure it
completely. PlantUML renders in the browser unless you set
params.plantuml.svg_image_url. Diagrams.net needs
params.drawio.drawio_server, and Algolia needs appId, apiKey and
indexName; with a value missing, each warns at build time and stays off
rather than falling back to a public service. Interactive maps likewise wait
for a tile service you name in params.map, and a video card contacts no
platform unless the site lists it in params.video_embeds and the reader
clicks.
Local-first covers the theme, not what authors add. External links, remote
images and video, iframes and remote API specifications; hosted search such as
Algolia or Google Programmable Search; analytics, comments and other SaaS
integrations; and a remote PlantUML or Diagrams.net renderer are all network
choices you make, and pages that use them need network access when they are
read.
Every component has a defined form in each of four outputs, so a page reads
correctly wherever it ends up: interactive HTML; a print view with the zoom and
copy controls removed and every disclosure expanded; plain Markdown; and RSS.
The print view covers a whole section at once (this section’s is
/_print/docs/about/), and a page’s Markdown version is its address plus
index.md.
The site lists the outputs it publishes under outputs; the theme adds none
on its own.
OINK uses Hugo’s own multilingual model: translation routing, a language
picker ordered by weight, fallback for untranslated pages, right-to-left
scripts, and canonical and alternate links for search engines. The interface
comes in 32 language packs with identical keys, covering all 31 locale file
names Docsy supports plus a generic zh. Each pack is written natively, with
no English placeholders; zh and zh-cn are Simplified Chinese and zh-tw
is Traditional Chinese. With params.ui.compare: true, readers can open an
existing translation beside the current page and scroll both together.
Turn on params.offline_search and Hugo writes one search index per language.
A scanning BM25 engine in the browser queries it, with no Lunr and no outside
service. It matches English words with Porter stemming and a spelling
fallback, code identifiers and symbol runs, and Chinese, Japanese or Korean
queries typed without spaces, which it matches as overlapping character pairs.
An index larger than 2 MiB moves page text into a separate file that loads in
stages, and searching for a parameter’s name opens its field-list entry
directly. A page can raise its ranking with search_boost and add synonyms
with search_keywords.
Cmd/Ctrl + K opens one box for pages, commands and page actions such as
switching language or theme and copying the page as Markdown, so finding
something and doing something share an entry point. A bare / opens it ready
to search, and a query that starts with > lists only commands.
Twenty-nine single-key shortcuts are on by default (ten for navigation, nine for
actions and ten for the view), and can be turned off for a site, a section or a single
page. w and s move through the sidebar tree and a and d collapse and
expand it, q and e go to the previous and next page, k and j jump to the
previous and next heading, h lists the pages you read recently and g goes
home. Other keys search, edit or print the page, hand it to ChatGPT or Claude,
fold or unfold everything at once, switch the preset, color mode and
language, open the duo view, toggle Zen Mode, and widen or narrow the reading
column. Every shortcut stands aside while you type in a text field or compose
with an input method. Press ', or click the question-mark button in the
footer, to see all twenty-nine in three columns; keys a page cannot use are dimmed.
Turn on params.ui.backlinks and each page lists the pages that link to it.
Hugo derives the list at build time from your ordinary links, so there is no
new syntax and no JavaScript. The list sits in the right rail under
“Backlinks” and folds after eight entries; this site has it on, so you can see
it beside this page.
Four kinds of page need more structure than a documentation page, and the
theme provides it:
Books number their chapters. {#id num=} numbers figures, tables, equations and examples, xref cross-references them, book-toc, book-figures and related shortcodes generate indexes, and a whole book prints as one document.
Release and download pages are generated from data/download/*.yaml: release cards, asset tables and checksums, with the data deciding what is published.
Landing pages assemble home-page sections from data/home/<lang>.yaml, and any page with layout: landing can use data under data/landing/.
API references render with the bundled Swagger UI and Redoc, and the specification can live on the site itself.
Add markdown to outputs and every page also publishes a .md version,
announced in its HTML <head> with rel="alternate" and offered in the page
actions for copying or viewing. The LLMS output format writes an llms.txt
inventory at the site root (this site’s is https://oink.pgsty.com/llms.txt).
Two more outputs serve agents that want everything at once. A section that
enables LLMSFULL publishes its whole text as one llms-full.txt, which an
agent fetches in a single request, and a site that enables NAVJSON publishes
its sidebar tree as data in one navigation.json per language. This site
publishes both: https://oink.pgsty.com/docs/llms-full.txt and
https://oink.pgsty.com/navigation.json.
“Open in ChatGPT / Claude” links are off by default, because a click
sends the page’s URL to a third party. A site turns them on with
params.ui.page_context_menu.assistant_links.
Configure params.versions to add a version menu to the navbar. An archived
version shows a banner that links to the current one, and the site decides
whether the menu jumps to the matching page or to each version’s home. Each
version is a separately built and deployed static site, so no runtime service
is involved.
Configuration — where to look up the parameters named above
1.2 - Case Guide
Find the OINK production case closest to your documentation, book, blog, catalog, or community site.
The quickest way to design an OINK site is to find a live one shaped like
yours and see how it was built. The case library documents 79 of
them: 48 independent community sites and 31 from the PGSTY and Vonng
ecosystem, this documentation site included. Each case links to the live site
(and to its source repository where that is public), explains the design and
its trade-offs, and separates the code the site wrote itself from what the
theme provides. Read
the case for the architecture, then follow its links to the guides for exact
configuration. Page counts and similar figures come from the snapshot taken
when the case was written.
Start the site itself from the Starter, not from the theme
repository’s tests/site/: that folder is a test fixture whose pages exist to
exercise rendering edge cases, not a design to copy.
This Apache Software Foundation full-stack graph database platform applies a
custom brand hero on OINK Slate across nearly 300 bilingual English and Chinese
documentation pages.
Open-source semantic storage and memory docs for AI agents on OINK Slate,
combining {.wide .expand} reference tables, Mermaid diagrams, and OpenAPI
specs under /docs/.
This self-hosted comic and manga library website uses OINK’s high-contrast Ink
preset with a custom violet accent, announcement bar, and dark product preview.
Static Site Generators in the Age of AI uses OINK’s dark-mode Book shell,
lecture slides, learning paths, and playground under a clean subpath deployment.
This Australian university student association site uses OINK’s centered landing
hero for membership onboarding, timelines, club news, and merchandise.
This self-hosted AI Agent Workspace and Gateway keeps its centered product site
and 88 bilingual documentation pages inside the site/ directory of its main
application repository.
Personal essay and translation blog layering a custom Paper, Ink, and Vermilion
editorial design and seal mark over OINK while keeping all four visual presets.
This bilingual personal engineering blog and digital garden organizes 144
long-form essays, short shares, and TIL notes behind a typography-led landing
page.
This Proxmox cluster Terraform and Ansible operations manual co-locates docs
with infrastructure code and publishes HTML, Markdown, and llms.txt together.
This Chinese Oracle database and homelab blog skips a marketing hero and uses
OINK’s three-column card-grid blog shell directly as its entry experience.
This very large English site combines a distribution manual, editorial blog,
extension catalog, taxonomies, version navigation, and pricing landing pages.
This eight-language PostgreSQL kernel and component documentation hub spans
nearly 5,000 Markdown files, exercising split BM25 search indexes and Arabic
RTL layout in one repository.
This bilingual manual for local Linux labs and native macOS VMs combines warm
editorial hero artwork with terminal quick-start previews, docs, and a blog.
This 366-page bilingual manual for PostgreSQL vector and BM25 search extensions
pairs technical architecture diagrams with benchmark comparisons and downloads.
This bilingual manual for PostgreSQL columnstore and Apache Iceberg lakehouse
tables shares a diagram-led product identity with sibling PGSTY extension sites.
This 1,344-page bilingual personal technical blog organizes six long-running
editorial columns with per-column RSS feeds alongside books and project pages.
This 690-page bilingual open standard, public cost ledger, and playbook uses a
centered editorial Paper hero to anchor six structured content sections.
This 601-page personal biography, memoir, poetry collection, and Expo
photography archive shows OINK serving humanities and long-term archival
publishing.
This full reference site contains public documentation, live component examples,
design contracts, multiple content shells, and regression coverage in one repository.
This PostgreSQL extension catalog uses a queryable dataset as its primary object.
It indexes 2,241 extensions and 576 packaged builds across 16 platforms.
Find which license covers the theme, this documentation and each bundled third-party runtime, and what you must keep when you reuse them.
OINK consists of three kinds of material, each under its own license: the
theme source, this site’s documentation, and the third-party assets the theme
ships. They are not relicensed as one combined work. Every table here links to
the authoritative file in the repository, and
where a summary disagrees with the license text, the file is authoritative.
Browser libraries, fonts and icons shipped with the theme
Each component’s own licence
Theme VENDOR.json and the licence files beside each asset
CC BY 4.0 covers only the original documentation content, not theme code,
trademarks, screenshots or third-party assets. Likewise, the theme’s
Apache-2.0 license leaves each bundled dependency under its own license.
Community contributors
OINK is maintained by PGSTY. Thank you to
@imbajin, who reported and contributed the
reading repairs below together with their fixtures, regression tests and
bilingual docs. They first shipped in 1.3.1 and remain in 1.8.0.
Contribution
Pull request
Markmap node text across light/dark modes and visual presets
OINK is derived from Docsy, Copyright 2018 Google LLC and Docsy contributors.
OINK’s own theme work is Copyright 2026 PGSTY contributors.
The project and its upstream both use Apache License 2.0. VENDOR.json records each third-party browser dependency’s license, source, version, and checksum. Each required NOTICE file accompanies its asset.
The Docsy name and Google’s trademarks belong to their respective holders. These names identify the upstream project and imply no endorsement.
This site also derives from the Docsy project website, as the site’s own
NOTICE records. Docsy is OINK’s only code upstream: OINK keeps Docsy’s source
history, Apache-2.0 obligations and copyright notices, and modified files carry
a modification notice as Apache-2.0 requires.
Third-party runtimes shipped with the theme
Everything the browser needs is committed to the theme repository, under
assets/third_party/ and static/webfonts/, so these assets need no npm step
and no download at build time; resolving the theme as a Hugo Module still needs
Go and an available module source. VENDOR.json is their machine-readable
manifest. Each entry records the name, pinned version, source URL, license
file path and the SHA-256 of every selected artifact, and the manifest adds an
aggregate checksum for each of the two asset trees.
The table matches the
OINK v1.8.0 manifest
(VENDOR.json generated 2026-11-28, schema 1, 26 entries). Versions change
with each theme release, so use the manifest from your pinned theme version.
Every source is the npm registry (https://registry.npmjs.org/…).
Package
Version
Licence
What it does in the theme
bootstrap
5.3.8
MIT
Grid, component styles, and RTL bundle
@fortawesome/fontawesome-free
7.3.1
CC-BY-4.0 AND OFL-1.1 AND MIT
Icons throughout the site
@fontsource-variable/inter
5.3.0
OFL-1.1
Interface and body font
@fontsource-variable/ibm-plex-sans
5.3.0
OFL-1.1
Body font for Paper; print font for Terminal
@fontsource/chakra-petch
5.3.0
OFL-1.1
Brand display font
@fontsource/ibm-plex-mono
5.3.0
OFL-1.1
Code font (and screen text for Terminal)
@docsearch/js
5.2.0
MIT
The optional Algolia DocSearch front end
@docsearch/css
5.2.0
MIT
Its stylesheet
mermaid
12.4.0
MIT
Mermaid diagrams
katex
0.19.1
MIT
Mathematics styles and fonts
swagger-ui-dist
5.36.0
Apache-2.0
OpenAPI reference pages
redoc
3.2.0
MIT
OpenAPI reference pages
asciinema-player
3.19.0
Apache-2.0
Terminal recording playback
echarts
6.1.0
Apache-2.0
Charts
@antv/infographic
0.2.20
MIT
Infographics
leaflet
1.9.4
BSD-2-Clause
Interactive maps (opt-in via params.map)
pako
3.0.3
MIT AND Zlib
Decompression (diagram data)
external-svg-loader
1.7.1
MIT
Inlining external SVG
idb-keyval
6.3.0
Apache-2.0
Browser-side caching
@plantuml/core
1.2026.10
MIT
Local PlantUML diagram engine
@viz-js/viz
3.31.0
MIT AND EPL-2.0
Graphviz layout for local PlantUML
@markmap/core
1.1.1
MIT
Mind maps (core model)
@markmap/parse
1.1.1
MIT
Mind maps (Markdown parser)
@markmap/render
1.1.1
MIT
Mind maps (SVG renderer)
@markmap/view
1.1.1
MIT
Mind maps (interactive view)
@markmap/plugin-math
1.1.1
MIT
Mind map formula rendering (MathJax)
Each license text sits beside its asset under assets/third_party/, for
example assets/third_party/bootstrap/LICENSE and
assets/third_party/katex/LICENSE, and Mermaid ships its upstream THIRD_PARTY_NOTICES. Swagger UI, ReDoc and ECharts keep
their own NOTICE or bundled-declaration files. @viz-js/viz 3.31.0 embeds
Graphviz 16.1.0 (EPL-2.0, replacing EPL-1.0) and Expat 2.8.5 (MIT); their
notices and upstream source links sit beside the scripts in
assets/third_party/plantuml/. The scoped Markmap 1.1.1 packages list every
sub-package they bundle, MathJax and D3 primitives included, in
assets/third_party/markmap/PACKAGES.json and LICENSES.txt. Packages that
1.5.1 and earlier shipped are no longer distributed: Bootstrap’s JavaScript
bundle, @popperjs/core, lunr (with assets/js/third_party/), and the
legacy Markmap 0.18, D3, highlight.js and WebFontLoader packages; the
1.6.0 release notes describe their removal.
If you redistribute the theme, include all of this license and notice
material. If you update a runtime, update its artifact, license file, source
and checksum in the same change.
Fonts and icons
Inter, IBM Plex Sans, Chakra Petch and IBM Plex Mono use the SIL Open Font
License 1.1. OINK 1.8.0 ships 33 files under static/webfonts/: fourteen
Inter subsets, twelve IBM Plex Sans subsets, four brand-font files and three
Font Awesome files. Font Awesome Free 7.3.1 has a composite license: CC BY 4.0
for the icon artwork, SIL OFL 1.1 for the font files and MIT for the code, with
the text in assets/third_party/Font-Awesome/LICENSE.txt.
The theme makes no request to a remote font service: the repository contains
no Google Fonts link, and the site serves fonts only from its own baseURL. To
change fonts or switch to the platform’s system fonts, see
Brand and appearance.
Design references
Docsy is the only code upstream. The projects below influenced the design
language only: OINK has ported no code from them and depends on none of them at
runtime.
Fumadocs — Content-first presentation, information hierarchy, and writing components such as file trees and field lists (the theme’s NOTICE records this acknowledgement).
Nextra — A simple documentation shell, filename labels and copy controls on code blocks, and per-page layout switches.
Hextra — A Hugo-native approach to implementation, file trees, badges, and tabs.
Mintlify — Layered navigation structure, synchronized code groups, and the reading experience of an API reference.
Hugo is the build platform, and Go resolves modules when
the theme is installed as a Hugo Module. Both are prerequisites; the theme
redistributes neither binary.
These names describe origin, dependency or design influence and
imply no endorsement by these projects. Project and product names belong
to their respective holders.
Reusing this documentation
CC BY 4.0 lets you share and adapt this documentation for any purpose,
provided you give attribution, link to the license, state whether you made
changes, and do not imply endorsement by OINK, PGSTY or any upstream project.
This attribution is sufficient:
Adapted from the OINK documentation by PGSTY contributors, licensed under
CC BY 4.0, with modifications.
Images and quotations credited separately keep their own credit and license.
Removing the page footer does not remove the attribution obligation.
Reusing the theme
Apache-2.0 lets you use, modify and distribute the theme source and build
output on its terms: keep the license, copyright and attribution notices and
the contents of NOTICE, and state which files you changed when you
distribute modified source. A theme distribution should include LICENSE,
NOTICE, VENDOR.json and every third-party licence file the manifest
references.
Apache-2.0 grants no trademark rights, and it does not turn third-party assets
into Apache-licensed works.
Related
Contributing — report problems, improve docs, and submit fixes
What is OINK — what the project is and where it came from
Report a problem or send a fix to the repository that owns it, with the checks a theme or documentation change needs before review.
Bug reports, corrections, translations and focused pull requests are all
welcome. Three repositories share the work, so start by finding the one that
owns the behavior you want to change.
pgsty/oink-cli — Optional CLI commands and native site checks.
Report a problem in the repository that owns the affected behavior. The CLI
has its own version and release cycle, and ordinary Hugo sites do not need it.
Report a reproducible problem
A report that someone else can reproduce gets fixed fastest, so first check
that the problem still occurs on the latest release. Then include
the OINK version, the output of hugo version, the relevant configuration and
a minimal content example.
For a display problem, add the page, the viewport width, the browser, the
visual preset and whether light or dark mode was on, and say what you expected
and what happened instead. Remove credentials and private content from the
report and any reproduction.
Build and check
Theme work needs the theme and this site cloned side by side, because the
site’s checks build against the sibling theme checkout:
~/src/
├── oink/
└── oink.pgsty.com/
Use Hugo (tested on 0.170+) and Go for Hugo Modules; the theme declares no
minimum Hugo release, and its CI tests against latest without maintaining
older-Hugo compatibility jobs. The site’s
regression tests also need Node.js 26.13.0 and npm 12.2.2 or newer, although
no theme or site build uses them. Before you start, read each repository’s
AGENTS.md, this site’s WRITING.md and TRANSLATION.md, and the
Design contract for the area you are changing.
The theme’s stylesheet is plain CSS: edit the layer files under
assets/css/td/, which Hugo concatenates. Editing a layer is the whole
change, with no build step and no generated file to commit, and
python3 bin/check-stylesheets.py checks the layers and how they are
assembled.
Run the theme checker that covers your change first; the theme’s AGENTS.md
lists them. Then run the site suites from this repository:
npm ci
make check
make browser
make check runs the non-browser suite against the sibling theme, and
make browser runs the browser suite, which you need whenever rendering or
interaction changed. Finally, look at the affected English and Chinese pages
at desktop and mobile widths, in light and dark mode. The
repository README
explains how to build against the published theme release instead of your
sibling checkout.
Do not add --panicOnWarning or HUGO_PANICONWARNING to a build or CI job.
OINK reports invalid input as a warning and keeps building with a safe
fallback, and its tests trigger those warnings on purpose, so the flag would
fail the build.
Prepare a pull request
Keep a pull request to one change, and describe the problem, the resulting
behavior and how you validated it. Update English and Chinese pages together
and keep their heading IDs, because other pages and the theme’s warnings link
to them. A change to public theme behavior ships with its implementation, the
checker that covers it, and both language versions of the affected Design
contract; new design proposals go in the bilingual
Design proposals section.
Commit only source and reviewed test expectations. Generated output, caches,
binaries and filesystem module replacements stay out of Git, and in a shared
worktree, other people’s unrelated changes stay as they are. Leave historical
release notes and dated research as written, because they record the evidence
of their time.
Credit and licences
The acknowledgements credit
each community fix to its author and pull request. Theme code and site tooling
are licensed under Apache-2.0 and original documentation under CC BY 4.0; keep
third-party license and notice files intact. See
License and acknowledgements for the full scope.
2 - Get started
Clone the OINK docs site to run a full site locally in two minutes, then build your own personal or project site with an AI agent, from scratch, or inside a project’s docs/ folder.
The fastest way to understand OINK is to clone this documentation site and run
it on your machine. In two minutes you have a complete live site to click
through—with real Markdown source right beside it—and from there you can hand
one prompt to an AI coding agent to build your own site.
Prerequisites
You need Git, Go, and Hugo (tested on 0.170+). Go is required because Hugo
fetches the theme as a Go module; building an OINK site never needs Node.js,
npm or a Sass compiler.
$ hugo version
hugo v0.170.1+withdeploy darwin/arm64
Instead of staring at an empty skeleton, clone oink.pgsty.com itself and
start Hugo’s local server:
Terminal
git clone https://github.com/pgsty/oink.pgsty.com.git
cd oink.pgsty.com
hugo serve
The first run takes a moment while Hugo downloads the pinned OINK theme into
your local Go module cache; every subsequent start takes a second. Open
http://localhost:1313/ to explore the live site:
Click through Docs, Book, Case and Blog, and open the
Appearance menu to switch between Paper, Slate, GitHub, Ink, News and
Terminal in both light and dark mode.
Press / to try local full-text search, and switch between
English and Chinese from the top bar.
Open any page under content/docs/components/ in your editor, change a
sentence, and save: the browser reloads automatically so you can see how
Markdown maps to rendered components.
Because this repository doubles as OINK’s integration test suite, treat it as a
live reference rather than a template to deploy. Once you know what you want,
create your own site in a fresh directory below.
Step 2: Build your own site with an AI agent
Once Git, Go and Hugo work on your machine, the fastest way to build your own
site is to open a coding agent such as Claude Code or Codex in an empty folder
and give it a concrete prompt backed by the OINK site-building skill
(oink-site):
Terminal
mkdir my-site &&cd my-site
claude # or codex, or any coding agent that runs shell commands
Paste this prompt after replacing the <angle brackets> with your own details:
Prompt: build a personal site with Hugo and OINK
Read https://oink.pgsty.com/skill.md and follow it to build my personal site
with Hugo and the OINK theme in this empty directory.
About me: <Your Name>, <one-line bio, e.g. backend engineer writing about
databases and distributed systems>.
Domain: <https://you.example.com>.
Languages: <English, or English and Simplified Chinese>.
Site structure:
- Home page assembled from OINK landing data: a concise hero introducing me,
cards linking to my main sections, and links to GitHub / X.
- A Blog section with card-grid indexes, tags, RSS feed, and three realistic
starter posts in my voice.
- A Notes section using the Docs shell for evergreen technical notes.
- An About page with my bio, current projects, and contact links.
Appearance and hygiene:
- Default to the Paper preset, enable dark mode, and offer Paper, Slate,
GitHub, Ink, News and Terminal in the Appearance menu.
- Enable local search, Markdown outputs, and llms.txt; include a .gitignore
that excludes public/, resources/, .hugo_build.lock and .hugo_cache/.
- Pin the latest published OINK release in go.mod rather than tracking main.
When the production build passes with zero unexpected warnings, run hugo serve,
check the site in a browser on desktop and mobile widths, and tell me what
placeholders I should replace next.
The skill file (https://oink.pgsty.com/skill.md, or
https://oink.pgsty.com/skill.zh.md for Simplified Chinese) sends the agent to
these docs for current OINK syntax, warns it away from retired Docsy or older
OINK keys, and maps each kind of site to real examples in the
case library.
To keep the skill installed across sessions instead of referencing its URL each
time, download it once and start a new agent session:
Download the file again whenever you want to refresh it; the header notes the
OINK release it targets. For more prompt patterns—open-source project sites,
CLI manuals and books—read Build a site from one prompt.
Choose your next guide
From here, follow the guide that matches where your site lives today:
Browse locally — Already have an OINK repository? Run hugo serve, read live docs in the browser, edit with auto-reload, and monitor reports written by coding agents.
From scratch — Assemble a minimal standalone site file by file, or switch an existing Hugo site to OINK: project layout, hugo.yml prerequisites, first page, and offline or submodule installs.
Add docs to a project — Already have an open-source codebase? Add an isolated docs/ Hugo sub-project with .gitignore hygiene and GitHub Pages or Cloudflare Pages auto-builds.
Upgrade — Upgrading an older OINK site or migrating from Docsy: version upgrades, syntax migration, and override review.
2.1 - Browse locally
Clone an existing OINK repository and run hugo serve to read docs in your browser, preview edits as you type, and watch AI agents’ latest reports render live.
You do not need to deploy a site—or even build one yourself—to get value from
OINK. Whenever you have an OINK repository on disk (this docs site, a
teammate’s handbook, an online book, or a workspace where an AI agent writes
notes), running hugo serve turns that folder into a fast, searchable local
website in your browser.
Clone and start the server
Install Git, Go and Hugo per Prerequisites, then clone
the repository and run hugo serve (Hugo’s short alias for hugo server) in
the folder that holds hugo.yml or hugo.yaml:
Terminal
git clone https://github.com/OWNER/OINK-SITE.git
cd OINK-SITE
hugo serve
The first start downloads the pinned OINK theme into your local Go module
cache. Once the terminal prints Web Server is available at http://localhost:1313/, open http://localhost:1313/ in any browser. Press
Ctrl+ with C in the terminal whenever you want to stop the server.
Read in the browser, not raw Markdown
Reading a documentation tree through hugo serve gives you the full reading
experience that plain Markdown viewers cannot render:
Structured navigation: the collapsible sidebar, page outline (TOC),
breadcrumbs, and previous/next links stay in sync with the folder tree.
Instant search and shortcuts: press / or
Ctrl+ with K to search the whole repository locally, and press
' or click the footer ? button to view keyboard shortcuts.
Rendered components: callouts, tabs, field tables, KaTeX math, Mermaid
and ECharts diagrams, and galleries render natively with no network
dependencies. Maps render their place list offline too; map tiles load only
when the site has configured a tile service.
Reader comfort: switch between Paper, Slate, GitHub, Ink, News and
Terminal, toggle light and dark mode, open Duo View on bilingual sites, or
print clean PDFs.
If the repository includes unpublished drafts (draft: true in front matter),
start the server with hugo serve -D so those pages appear in the sidebar too.
Edit and watch changes reload live
Leave hugo serve running in one terminal while you edit Markdown files under
content/ or home-page YAML under data/. Every time you save a file—or
switch Git branches—Hugo rebuilds the affected pages in milliseconds and
refreshes your browser tab automatically.
Useful daily preview commands
hugo serve -D # include draft pages while writinghugo serve -D --navigateToChanged # jump the browser straight to the file you just savedhugo serve -D --renderToMemory # serve from memory without writing anything to public/
Passing --renderToMemory (-M) is especially clean when you are reviewing a
repository in Git, because the preview never touches public/ on disk.
Follow AI agent reports in real time
When a coding agent such as Claude Code or Codex is working on a large task—for
example, auditing a codebase, writing design proposals, drafting documentation,
or logging experiment results—reading long Markdown tables and diagrams inside
a scrolling terminal quickly becomes tiring.
Point the agent to write its reports as ordinary Markdown pages inside an OINK
site’s content/ directory, and keep hugo serve -D --renderToMemory running
in a side terminal with http://localhost:1313/ open in your browser:
The agent writes or updates a report (such as content/docs/reports/audit.md)
with headings, {.fields} tables, callouts, or Mermaid / ECharts diagrams.
Hugo detects the file write immediately, rebuilds in memory, and reloads the
browser tab while keeping your reading position.
You read formatted sections, interactive diagrams, and cross-linked pages in
real time—and because --renderToMemory writes no build output to disk, the
agent’s Git working tree stays clean.
This turns any OINK repository into a zero-setup local reading room for both
human notes and agent-generated reports.
Common snags
Symptom
Fix
Port 1313 is already in use by another preview
Run hugo serve -p 1314 to pick another port
A change to hugo.yml, data/, or a layout did not appear
Restart with hugo serve --disableFastRender, then hard-reload the browser
A page with draft: true is missing from the sidebar
Add -D (hugo serve -D)
The site lives inside a docs/ subfolder of a larger repo
Run hugo serve -s docs from the repository root, or cd docs && hugo serve
For advanced server switches, phone/LAN preview, Docker containers, cache
clearing, and production builds, see Local preview.
Related
Get started — clone the docs site and try building with an AI agent
From scratch — build your own standalone OINK site
Local preview — full hugo server reference, LAN access, containers, and caches
2.2 - From scratch
See what a minimal standalone OINK project looks like, build one from an empty directory, add OINK to an existing Hugo site, or install it without Go modules.
When you want a clean standalone OINK site and want to understand every file in
it—rather than letting an agent scaffold it or cloning a large template—a
working project takes only a handful of files. This guide walks from an empty
folder to a live site, shows how to switch an existing Hugo site to OINK, and
covers offline and non-Go install methods.
If you want to add documentation inside an existing code repository’s docs/
directory instead of creating a separate repository, read
Add docs to a project. If you prefer a pre-built
three-language Docs, Blog and Book template with GitHub Pages and Cloudflare
Pages workflows ready to edit, you can also start from the
OINK Starter. For Docsy sites, follow
Migrating from Docsy.
What a minimal OINK project looks like
An OINK site is an ordinary Hugo repository. The theme itself does not live in
your Git tree: go.mod pins the exact OINK tag, and Hugo downloads it into the
module cache on the first build.
my-docs/
my-docs/
hugo.yml#single site config: title, baseURL, languages, Goldmark, params, theme import
go.mod#pins github.com/pgsty/oink@vX.Y.Z
go.sum#checksums that verify the pinned release
.gitignore#keeps public/, resources/ and Hugo caches out of Git
content/
_index.md#home page entry (optional when data/home/ drives the home page)
Everything else—stylesheets, scripts, fonts, Font Awesome icons, search,
diagrams, and layouts—comes from the theme module. Commit source files plus
go.mod and go.sum; keep public/, resources/, .hugo_build.lock and
.hugo_cache/ ignored.
From an empty directory to the first page
Make sure Git, Go and Hugo are installed per
Prerequisites, then run these four steps.
Create the skeleton and fetch the theme
Terminal
hugo new site --format yaml my-docs
cd my-docs
git init
hugo mod init github.com/example/my-docs
hugo mod get github.com/pgsty/oink@v1.8.0
Replace github.com/example/my-docs with your repository’s module path.
hugo mod get creates go.mod and go.sum; commit both so every machine
and CI run builds against the exact same verified theme release. Pin a tag
rather than main so the site changes only when you deliberately upgrade;
GitHub Releases lists every tag.
Create .gitignore before your first build so generated artifacts never
enter Git:
Rename the generated hugo.yaml to hugo.yml (Hugo accepts either name;
keep only one configuration file at the root) and replace its contents with
the baseline below:
hugo.yml
title:Product DocsbaseURL:https://docs.example.com/defaultContentLanguage:en# enableGitInfo: true # enable after your first Git commit so pages show last-modified dateslanguages:en:label:Englishlocale:en-USweight:1title:Product Docsparams:description:Everything about running Product in productionmenus:main:- {name:Docs, pageRef:/docs, weight:20}- {name:Blog, pageRef:/blog, weight:50}# The three Goldmark prerequisites: OINK's Markdown components depend on themmarkup:goldmark:renderer:unsafe:true# allow inline HTML in contentparser:attribute:block:true# attribute lines such as {.steps} {.cards} {caption=}wrapStandAloneImageWithinParagraph:false# block images carry attribute lineshighlight:noClasses:false# code colors follow light and dark modeparams:offline_search:truegithub_repo:https://github.com/example/my-docscopyright:authors:'[Example Inc.](https://example.com/)'from_year:2026ui:preset:paperpreset_menu:[paper, slate, github, ink, news, terminal]dark_mode:truesidebar_menu_foldable:truesection_index:cardsoutputs:home:[HTML, markdown, LLMS]page:[HTML, markdown]section:[HTML, RSS, print, markdown]module:imports:- path:github.com/pgsty/oink
Each block has one job:
Block
Controls
Without it
Top level + languages
Site name, canonical baseURL, languages and navbar
A wrong baseURL breaks absolute links and search in production
markup.goldmark
The three parser settings OINK components need
Attribute lines render as literal {.steps} text
params
Local search, repository links, presets and shell switches
Optional features stay off by design
outputs
Per-page .md copies, llms.txt and print views
No “Copy as Markdown” or print view
module
Theme import
Hugo cannot locate OINK
For math equations, also add Goldmark’s passthrough extension from
Math. Every site parameter and its default lives
in Configuration.
Write the first section and page
Each top-level directory under content/ becomes a section, and nested
folders build the sidebar ordered by weight. Give the section an
_index.md and add your first page:
content/docs/_index.md
---title:DocslinkTitle:Docsdescription:Everything about running Product in production.weight:20---Start with [Install](/docs/install/).
content/docs/install.md
---title:Installdescription:Install Product on a fresh machine.weight:10---## Prerequisites {#prerequisites}
> [!IMPORTANT]
> Product requires PostgreSQL 18 or newer.
## Install {#install}
```bash
curl -fsSL https://get.example.com | bash
```
Add explicit {#id} anchors to headings from day one: if you add a second
language later, both languages share identical section links. See
Writing pages and
Organizing content for the full authoring model.
Preview locally
Terminal
hugo serve
Open http://localhost:1313/docs/. You should see the Docs sidebar listing
Install, working search, and the appearance switcher. The site root
stays minimal until you add a landing page in data/home/; see
Home and landing pages.
Add OINK to an existing Hugo site
If you already have a Hugo site with content, work on a Git branch and keep
your existing content/ tree intact; you do not need hugo new site:
If the site lacks go.mod, run hugo mod init with your repository’s
module path; if it already has one, keep it.
Run hugo mod get github.com/pgsty/oink@v1.8.0.
Replace the old theme selection in your configuration with module.imports
pointing to github.com/pgsty/oink (keeping unrelated module imports), and
merge the three markup.goldmark settings plus
markup.highlight.noClasses: false from Write hugo.yml.
Review custom templates under layouts/, stylesheets under assets/,
old-theme shortcodes, and front-matter type or layout values that
depended on the previous theme.
Run hugo serve, check representative pages across light and dark modes,
then turn on optional OINK features one by one and finish with
Verify.
Other install methods
A Hugo Module is the default because Hugo resolves the version and verifies its
checksum in go.sum. The other three methods serve specific constraints: an
isolated network without Go proxy access, a host without Go installed, or an
organization that audits a vendored copy inside its repository. Apart from
hugo mod vendor, they replace module.imports with theme: oink, making
version tracking and integrity checks your responsibility.
The four methods compared
Method
Needs Go
Version auditable
Theme source in your repo
Use when
Hugo Module
Yes
go.sum verifies automatically
No
The default
Git submodule
No
Repository records the commit
By reference
Theme must be referenced inside Git without Go
Offline archive
No
Checksums verified by hand
Yes
Air-gapped or offline build environments
Pinned source copy
No
Record the tag and checksum
Yes
Host requires a complete committed tree
Hugo Module (recommended)
Terminal
hugo mod init github.com/example/product-docs
hugo mod get github.com/pgsty/oink@v1.8.0
hugo.yml
module:imports:- path:github.com/pgsty/oink
Run hugo mod graph to verify the resolved version and hugo mod get -u to
upgrade. Every machine that builds the site needs Go.
CI must initialize submodules before running Hugo, otherwise themes/oink is
empty:
CI checkout step
git submodule update --init --recursive
Offline archive
For an isolated network without internet access, prepare the theme on a
connected machine and move the complete package across. There are two routes.
hugo mod vendor freezes the resolved module into _vendor/, so later
builds need neither network access nor Go:
Terminal
hugo mod vendor # writes _vendor/ with the theme's mounted treetar czf ../my-docs.tgz . # place the archive outside the directory being packed
Whenever _vendor/ exists, Hugo reads it automatically (hugo mod graph shows
+vendor) and module.imports stays unchanged. Only the vendoring step needs
Go; to upgrade, re-run hugo mod get and hugo mod vendor on a connected
machine. Because _vendor/ omits LICENSE, NOTICE and VENDOR.json, copy
those three files from the theme repository if you redistribute the archive.
A release tag archive avoids Go modules completely. Download a tagged
archive and unpack it into themes/oink/:
Because the repository root is the theme root, layouts/, assets/, i18n/
and static/ unpack straight under themes/oink/. To transfer the archive
with a checksum, create both on the connected machine:
Bootstrap, Font Awesome, fonts, search, and diagram runtimes all ship inside
the theme, so an offline deployment needs no node_modules, PostCSS or CDN.
Pinned source copy
If your host requires theme source files inside the site repository, unpack a
verified tag archive into themes/oink/ as above, set
theme: oink, and commit the files alongside a note of the tag and SHA-256
checksum.
Do not run git clone into themes/oink and commit that folder: the nested
.git directory makes Git record an uninitialized gitlink instead of the files.
To track by reference, use a Git submodule.
Developing against a local theme checkout
Only needed when editing the OINK theme and a site together. Place both
checkouts side by side:
Sibling directory layout
~/pgsty/
├── oink/ # the theme
└── product-docs/ # your site
Point Hugo at the sibling checkout for a single command without touching
go.mod:
Terminal
cd ~/pgsty/product-docs
HUGO_MODULE_REPLACEMENTS='github.com/pgsty/oink -> ../oink' hugo serve
A Go workspace (go work init with HUGO_MODULE_WORKSPACE=go.work) works the
same way. Neither should ever enter Git; CI must build the release pinned in
go.mod. See Previewing against a theme checkout
for verifying which theme release actually resolved.
Verify
Terminal
hugo mod graph # confirm the resolved OINK taghugo --cleanDestinationDir --gc --minify --printPathWarnings
The build succeeds when it finishes with Total in … and prints no unexpected
warnings. Check that /docs/ opens with your sidebar, search finds a heading
from your page, dark mode changes code-block colors (noClasses: false), and
git status --short lists only source files (hugo.yml, go.mod, go.sum,
content/).
Related
Get started — run the docs site locally and try the AI agent prompt
Browse locally — daily reading, live editing, and watching AI agent reports
Deploy — publishing public/ to GitHub Pages, Cloudflare Pages, or your own host
Upgrade — upgrading OINK releases and migrating from Docsy
2.3 - Add docs to a project
Add a self-contained OINK documentation site inside an existing open-source repository’s docs/ directory, keep build outputs out of Git, and wire GitHub Pages and Cloudflare Pages auto-builds.
You already have an open-source repository with application code—a Go service, a
Rust CLI, a Python package, or a database extension—and you want real
documentation to live right beside the code so pull requests update code and
docs together. Putting a self-contained OINK site inside docs/ keeps Hugo
isolated from your main build while publishing cleanly on every push.
For a real production example of this layout, see AGW, which
hosts its bilingual documentation and landing page inside a subfolder of its
application repository.
Repository layout
Keep the Hugo configuration, module pin, and content completely inside docs/:
my-project/
my-project/
cmd/#your project's own source code
internal/
go.mod#your project's own Go module (if it is a Go project)
README.md
.gitignore#excludes docs/ build outputs without hiding app files
.github/
workflows/
ci.yaml#existing application tests
docs.yaml#builds and deploys docs/ only when docs/ changes
docs/#self-contained OINK sub-project
hugo.yml#site config with github_subdir: docs
go.mod#pins github.com/pgsty/oink@vX.Y.Z
go.sum#verifies the pinned OINK release
content/
_index.md
docs/
_index.md
install.md
data/
home/
en.yaml
assets/
icons/logo.svg
static/
favicon.svg
Giving docs/ its own go.mod is deliberate: even if your project itself is
written in Go and already has a go.mod at the repository root, the two module
graphs stay completely separate so the documentation theme never enters your
application’s dependency tree.
Initialize the docs/ sub-project
Install Git, Go and Hugo per Prerequisites, then run
these steps from your project’s repository root:
Create docs/ and pin OINK
Terminal
mkdir -p docs/content/docs
cd docs
hugo mod init github.com/OWNER/PROJECT/docs
hugo mod get github.com/pgsty/oink@v1.8.0
Ending the module path in /docs keeps it distinct from the root module.
Commit both docs/go.mod and docs/go.sum so CI resolves the exact same
theme tag you tested locally.
Write docs/hugo.yml with github_subdir
Create docs/hugo.yml. Compared to a standalone site, the crucial extra
setting is params.github_subdir: docs: without it, every Edit this
page and history link points to /content/... at the repository root and
returns 404 on GitHub.
docs/hugo.yml
title:My ProjectbaseURL:https://OWNER.github.io/PROJECT/defaultContentLanguage:enenableGitInfo:truelanguages:en:label:Englishlocale:en-USweight:1title:My Projectparams:description:Documentation for My Projectmenus:main:- {name:Docs, pageRef:/docs, weight:20}markup:goldmark:renderer:unsafe:trueparser:attribute:block:truewrapStandAloneImageWithinParagraph:falsehighlight:noClasses:falseparams:offline_search:truegithub_repo:https://github.com/OWNER/PROJECTgithub_branch:maingithub_subdir:docs# required when the Hugo site lives in docs/ui:preset:paperpreset_menu:[paper, slate, github, ink, news, terminal]dark_mode:truesidebar_menu_foldable:truesection_index:cardsoutputs:home:[HTML, markdown, LLMS]page:[HTML, markdown]section:[HTML, RSS, print, markdown]module:imports:- path:github.com/pgsty/oink
Add your first page and preview
Write docs/content/docs/_index.md and docs/content/docs/install.md (see
From scratch for minimal examples),
then preview from the repository root with -s docs (or cd docs && hugo serve):
Terminal (from repository root)
hugo serve -s docs
Open http://localhost:1313/docs/ and verify that the Edit this page
entry in the page-actions menu beside the title opens
docs/content/docs/... in your repository.
Manage .gitignore cleanly
Hugo writes generated HTML, processed images, lock files and module caches into
the site directory. Add explicit docs/-prefixed ignore rules to your
repository’s .gitignore before running your first build, so generated output
never bloats Git history or creates merge conflicts—and so you never
accidentally ignore a public/ or resources/ directory used by your main
application:
.gitignore (repository root)
# OINK / Hugo documentation build outputs and local caches
docs/public/
docs/resources/
docs/.hugo_build.lock
docs/.hugo_cache/
go.work
go.work.sum
Know which files stay out of Git and which ones CI requires:
Path
Track in Git?
Why
docs/public/
Ignore
Built HTML/CSS/JS output; regenerated cleanly by CI on every deploy
docs/resources/
Ignore
Cached processed images (_gen/); stale copies bloat diffs
docs/.hugo_build.lock
Ignore
Ephemeral Hugo build lock file
docs/.hugo_cache/
Ignore
Local or CI Hugo cache directory
go.work, go.work.sum
Ignore
Machine-local Go workspace paths break other contributors and CI
docs/hugo.yml, docs/go.mod, docs/go.sum
Commit
Site configuration and exact checksum-verified OINK release
Authored Markdown, landing data, logos, CSS and static files
Run a production build once and check git status --short to verify that zero
generated files show up as untracked:
Terminal
hugo -s docs --cleanDestinationDir --gc --minify --environment production --printPathWarnings
git status --short
Auto-build on GitHub Pages
Add one GitHub Actions workflow at .github/workflows/docs.yaml. Two details
differ from a standalone docs repository: every build step runs inside
working-directory: docs (with cache-dependency-path: docs/go.sum and
artifact path docs/public), and the paths: filter ensures code-only commits
do not waste runner minutes rebuilding unchanged docs.
.github/workflows/docs.yaml
1name:Deploy Docs to GitHub Pages 2 3on: 4push: 5branches:[main] 6paths: 7- 'docs/**' 8- '.github/workflows/docs.yaml' 9workflow_dispatch:1011permissions:12contents:read13pages:write14id-token:write1516concurrency:17group:github-pages18cancel-in-progress:false1920env:21# Never let a workspace override the release pinned in docs/go.mod.22GOWORK:off23HUGO_MODULE_WORKSPACE:off24HUGO_CACHEDIR:${{ github.workspace }}/docs/.hugo_cache2526jobs:27build:28name:Build docs29runs-on:ubuntu-latest30defaults:31run:32working-directory:docs33steps:34- name:Check out repository35uses:actions/checkout@v736with:37fetch-depth:0# required for enableGitInfo last-modified dates3839- name:Set up Go40uses:actions/setup-go@v741with:42go-version:stable43cache-dependency-path:docs/go.sum4445- name:Configure GitHub Pages46id:pages47uses:actions/configure-pages@v64849- name:Install Hugo50uses:peaceiris/actions-hugo@v351with:52hugo-version:latest5354- name:Download OINK module55run:go mod download github.com/pgsty/oink5657- name:Build production site58run:|59 hugo --cleanDestinationDir --gc --minify --environment production \
60 --printPathWarnings \
61 --baseURL "${{ steps.pages.outputs.base_url }}/"6263- name:Upload Pages artifact64uses:actions/upload-pages-artifact@v565with:66path:docs/public6768deploy:69name:Deploy70environment:71name:github-pages72url:${{ steps.deployment.outputs.page_url }}73runs-on:ubuntu-latest74needs:build75steps:76- name:Publish77id:deployment78uses:actions/deploy-pages@v5
How the build logic hangs together:
paths: ['docs/**', '.github/workflows/docs.yaml'] triggers automatic
deploys only when documentation or the workflow itself changes;
workflow_dispatch still lets you trigger a deploy manually at any time.
defaults.run.working-directory: docs makes go mod download and hugo
operate strictly on docs/go.mod and docs/hugo.yml without touching a
root-level go.mod.
--baseURL "${{ steps.pages.outputs.base_url }}/" injects the exact URL
GitHub Pages serves—including the /<PROJECT>/ subpath—so search indexes,
stylesheets and canonical links never 404.
--printPathWarnings without --panicOnWarning keeps OINK’s warnings
readable in the log without aborting on non-fatal diagnostics.
In GitHub, open Settings → Pages → Build and deployment → Source, choose
GitHub Actions, and push to main.
Auto-build on Cloudflare Pages
Cloudflare Pages supports two deployment models for a docs/ sub-project. Pick
one per Cloudflare Pages project—never connect both Git integration and
Direct Upload to the same project:
GitHub Actions Direct Upload (recommended)
Building in GitHub Actions and uploading docs/public via Wrangler lets you
run the latest Hugo release (even when Cloudflare’s default build image ships
an older Hugo), plus native paths: filtering so application-only pushes skip
doc deploys.
.github/workflows/docs-cloudflare.yaml
1name:Deploy Docs to Cloudflare Pages 2 3on: 4push: 5branches:[main] 6paths: 7- 'docs/**' 8- '.github/workflows/docs-cloudflare.yaml' 9workflow_dispatch:1011permissions:12contents:read13deployments:write1415concurrency:16group:cloudflare-docs-${{ github.ref }}17cancel-in-progress:true1819env:20GOWORK:off21HUGO_MODULE_WORKSPACE:off22HUGO_CACHEDIR:${{ github.workspace }}/docs/.hugo_cache2324jobs:25deploy:26name:Build and upload docs27runs-on:ubuntu-latest28defaults:29run:30working-directory:docs31steps:32- name:Check out repository33uses:actions/checkout@v734with:35fetch-depth:03637- name:Set up Go38uses:actions/setup-go@v739with:40go-version:stable41cache-dependency-path:docs/go.sum4243- name:Install Hugo44uses:peaceiris/actions-hugo@v345with:46hugo-version:latest4748- name:Download OINK module49run:go mod download github.com/pgsty/oink5051- name:Build production site52env:53SITE_URL:${{ vars.CLOUDFLARE_SITE_URL || 'https://my-project.pages.dev/' }}54run:|55 hugo --cleanDestinationDir --gc --minify --environment production \
56 --printPathWarnings \
57 --baseURL "${SITE_URL}"5859- name:Upload to Cloudflare Pages60uses:cloudflare/wrangler-action@v461with:62apiToken:${{ secrets.CLOUDFLARE_API_TOKEN }}63accountId:${{ secrets.CLOUDFLARE_ACCOUNT_ID }}64command:pages deploy docs/public --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME || github.event.repository.name }} --branch=${{ github.ref_name }}65gitHubToken:${{ secrets.GITHUB_TOKEN }}
Set up Cloudflare once:
In the Cloudflare dashboard, create a Direct Upload Pages project.
Add repository secrets CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN
(scoped to Account → Cloudflare Pages → Edit).
Set optional repository variables CLOUDFLARE_PROJECT_NAME (defaults to the
repository name) and CLOUDFLARE_SITE_URL once you attach a custom domain
such as https://docs.example.com/.
Cloudflare Git integration
If you prefer Cloudflare to run Hugo directly with no GitHub Actions workflow,
connect the repository in Workers & Pages → Create → Pages → Connect to Git
and configure these build settings:
Setting
Value
Why
Root directory (path)
docs
Runs hugo inside docs/ so it reads docs/hugo.yml and docs/go.mod
Build command
hugo --cleanDestinationDir --gc --minify --environment production --printPathWarnings
Matches OINK’s production build flags
Build output directory
public
Relative to Root directory (docs), publishing docs/public
Include watch paths
docs/*
Skips doc builds on commits that only touch application source code
HUGO_VERSION
0.170.1 (or current release)
Overrides Cloudflare’s older default Hugo (OINK is tested on 0.170+)
GOWORK / HUGO_MODULE_WORKSPACE
off
Prevents workspaces from overriding docs/go.mod
For branch preview builds, override the preview build command with
--environment staging --baseURL "$CF_PAGES_URL" so Cloudflare preview URLs
emit noindex and never compete with your production domain in search engines.
Verify before you merge
Run hugo -s docs --cleanDestinationDir --gc --minify --environment production --printPathWarnings
and confirm the log ends with Total in … and no unexpected warnings.
Run git status --short: docs/public/, docs/resources/ and
docs/.hugo_build.lock must not appear.
Commit docs/hugo.yml, docs/go.mod, docs/go.sum, docs/content/,
.gitignore and your workflow file.
After the workflow turns green, open the live URL and check search, dark
mode, canonical links, and Edit this page (it must open the file under
docs/content/).
Browse locally — run hugo serve -s docs while writing code and docs side by side
From scratch — standalone OINK setup and offline / submodule install methods
Configuration — full hugo.yml reference, including github_subdir
3 - Authoring
Write documentation pages, blog posts, books, image albums, release pages and API references, and arrange them into a sidebar.
Everything a reader sees comes from Markdown files under content/, and this
section shows how to write them: a documentation page, the folder tree that
becomes the sidebar, and the content types that bring their own layout, such
as blog posts, books, image albums, release pages and API references. They all
share one Markdown dialect and one set of front matter keys, so what you learn
in Writing pages carries over to every other type.
Find it by task
I want to…
Read
Write a documentation page: front matter, heading anchors, links, images, drafts
Create a documentation page, from where the file goes and the front matter it needs to stable anchors, links, images, drafts and the controls the theme adds at the end.
A documentation page is one Markdown file under content/: a few lines of YAML
front matter, then the body. Where you save the file decides its URL and its
place in the sidebar, so a new page needs nothing beyond the file itself:
content/docs/install.md
---title:Install PigstylinkTitle:Installdescription:Get a working PostgreSQL cluster onto a clean EL 9 machine.weight:20---## Prerequisites {#prerequisites}
A Linux machine you can reach over SSH, passwordless `sudo`, and Python 3.11 or
newer.
> [!IMPORTANT]
> The installer rewrites `/etc/yum.repos.d/`. Back it up first.
With hugo server running, the page appears at /docs/install/ and as
Install in the sidebar. If your site does not build yet, start with
Get started.
Creating a page
The path under content/ becomes the URL: content/docs/install.md is
published at /docs/install/. A translation is a file of the same name with a
language suffix, such as install.zh.md, in the same directory, and it shares
the English page’s logical path.
A page with no files of its own is a single .md file. When it has
screenshots, recordings or example configuration, make it a directory instead:
name the page index.md and put its files beside it. Hugo calls this a
page bundle, and the
page refers to its files by their bare names:
the two page shapes inside content/
content/
docs/
_index.md#section index, English
_index.zh.md#section index, Chinese
install.md#single-file page → /docs/install/
install.zh.md#its Chinese translation
anatomy/#page bundle → /docs/anatomy/
index.md
index.zh.md
shell.webp#page resource, shared by both languages
Both shapes look the same in the sidebar. hugo new content docs/install.md
creates the file with front matter from an
archetype; writing it by hand
works just as well. A bundle resource without a language suffix is shared by
every language. File naming and resources
explains language-specific resources and the one case that needs them: a page
that exists only in Chinese.
The front matter you need
The YAML between the two --- lines at the top of the file is the front
matter. Four keys belong on every page:
content/docs/install.md
---title:Install Pigsty # page heading, browser title, search result titlelinkTitle:Install # short name in the sidebar and breadcrumbs; falls back to titledescription:Get a working PostgreSQL cluster onto a clean EL 9 machine.weight:20# ordering among siblings; use multiples of 10 to leave room---
Write description as one sentence saying what the reader can do with the
page. It appears on section index cards, in search results and on social
cards, so it is what someone reads when deciding whether to open the page.
weight orders the page among its siblings; Ordering
explains ties and pages without one.
Every other key is optional: an icon, draft status, a search boost, comments,
the page shell. Page parameters lists them all.
Heading levels and stable anchors
Start body sections at ##. The theme renders title as the page’s one #
heading, so a # in the body would add a second. The outline in the right
column lists headings from ## down to Hugo’s
markup.tableOfContents.endLevel, which is ### unless you set it to 4 to
include ####.
Give every ## and ### an explicit English ID:
Source
## Prerequisites {#prerequisites}
### Disk and memory {#disk-and-memory}
Without an explicit ID, Hugo derives one from the heading text, which causes
two problems:
A translated heading gets a different ID (#前提条件 instead of
#prerequisites), so a link that works in English lands at the top of the
Chinese page. With the English ID on both, /docs/install/#prerequisites
and /zh/docs/install/#prerequisites reach the same place; see
Heading anchors must align.
Rewording a heading silently breaks every link to it. Treat a published ID
as part of the URL, and when you must rename one, leave an empty anchor with
the old ID so existing links still arrive:
Source: leaving a target behind for the old anchor
## Getting started <a id="get-started"></a> {#quickstart}
Use lowercase English words joined by hyphens, unique within the page.
OINK’s Markdown extensions
The body is standard Markdown, rendered by Hugo’s Goldmark, plus the forms
below. Each is ordinary Markdown with at most one attribute line, so the
source still reads well on GitHub or in any editor:
Component
Shortest syntax
Page
Callouts
> [!NOTE] on the first line of a blockquote; > [!SOCIAL] quotes a social post
The few components that need more than Markdown can express use shortcodes:
badges, keyboard keys (bare <kbd> also renders as a keycap), file includes,
terminal recordings, and the Book figure and table family. Their syntax is in Components.
The forms combine. Here a code fence and a callout sit inside steps:
Source
1. Install PostgreSQL 18:
```bash
brew install postgresql@18
```
1. Start the server and connect to it:
```bash
brew services start postgresql@18
psql postgres
```
> [!TIP]
> `brew services list` shows whether the server is running.
{.steps}
Install PostgreSQL 18:
brew install postgresql@18
Start the server and connect to it:
brew services start postgresql@18
psql postgres
Tip
brew services list shows whether the server is running.
Writing links
Choose the form by what the link points at:
Form
Example
When to use it
Absolute site path
[Configuration](/docs/customize/config/)
The default. It names the published route, survives moving the source file, and is easy to find and replace across the site
A target that must exist: a missing one fails the build instead of leaving a broken link
All three point at directory-style routes with a trailing slash
(/docs/write/pages/), the way Hugo publishes pages by default. In a
bilingual site, link to the logical page rather than to a .zh.md file, and
use the same fragment IDs in both languages.
Plain Markdown links are not checked when the site builds, so:
Write internal links as absolute paths; after a restructure, one site-wide
search and replace finds them all.
When you move a page, add its old path to aliases so outside links keep
working, and point your own links at the new route instead of leaning on the
alias.
When you are not sure a target exists, use ref and let the build check it.
The theme passes links to Goldmark unchanged; it has no link render hook.
External links therefore open in the same tab. For new tabs, write the link as
HTML or add your own layouts/_markup/render-link.html.
Where images go
Put a page’s own screenshots in its page bundle, images several pages share in
assets/images/, and large files that need no processing in static/. All
three use the same  syntax, and an attribute line below the
image adds a caption, a size, zoom or a figure number; see
Images.
Drafts and publishing
Mark an unfinished page draft: true and no build publishes it:
front matter
---title:Migration guide, not yet finaldraft:true---
hugo server -D (--buildDrafts) previews drafts. A page whose date lies in
the future is left out the same way until you build after that date, and -F
(--buildFuture) previews it. Production builds use neither flag, so plain
hugo publishes only finished pages.
What appears at the end of a page
Do not write a feedback prompt, a last-updated line, previous/next links or a
comment box into the body. The theme adds them after the last paragraph,
always in this order:
The action menu beside the title (copy as Markdown, edit this page, view
history, open an issue, print) is generated too, and is configured in
Repository links and page info. Why the blocks
come in this order is explained in
What the page end is made of.
Verify
Build once after writing a page:
hugo --printPathWarnings
The build should end with Total in … and no ERROR. A mistyped attribute or
component parameter produces a warning with its source position and renders a
safe fallback, as described in
Configuration principles; a ref to a
missing page fails the build. --printPathWarnings reports two pages that
publish to the same path, which happens most often in multilingual sites or
after a change to permalinks.
Then check in the browser:
The page sits in the sidebar where its weight puts it.
The right-hand outline lists your ## headings, and clicking one puts an
English anchor in the URL.
A heading has the same anchor on the English page and on its translation.
Components — each component’s syntax and parameters
Languages — paired bilingual files and fallback for untranslated pages
Local preview — the hugo server switches worth knowing
3.2 - Organizing content
Arrange folders and _index.md files into the sidebar you want, then control order, section indexes, icons, folding, hidden pages and where documentation lives.
The folders under content/ are your navigation. Each folder becomes a group
in the sidebar, each Markdown file a page, and weight sets the order, so you
shape the sidebar by arranging files instead of maintaining a separate menu.
The same tree drives the breadcrumbs, the previous/next pager and the child
list on every section page, which keeps all of them in agreement.
Directories are the sidebar
Hugo calls a folder a section; the Markdown files in it are its pages, and
nested folders are subsections. The sidebar renders that tree level by level,
labels each entry with linkTitle (or title when there is none), and orders
siblings by weight. A product’s documentation might look like this:
content/docs/
content/
docs/
_index.md#the Docs root: type: docs + cascade
install/#weight: 10
_index.md
requirements.md#weight: 10
linux.md#weight: 20
kubernetes.md#weight: 30
operate/#weight: 20
_index.md
backup.md#weight: 10
upgrade/#weight: 20, a page bundle
index.md
upgrade-dialog.webp
reference/#weight: 90
_index.md
configuration.md
upgrade/ is a page bundle: a folder holding index.md and the files that
page uses. It appears in the sidebar and gets its URL exactly like a single
file would; see Creating a page.
Every directory needs an _index.md
A section’s own page is the _index.md in its folder (_index.zh.md for
Chinese). Without it, Hugo still creates the section, but with no title,
description, icon or weight: the sidebar shows the bare folder name and you
cannot control its position.
content/docs/deploy/_index.md
---title:DeploylinkTitle:Deploydescription:Publish the site to GitHub Pages, Cloudflare Pages or your own Nginx.weight:50icon:fa-solid fa-cloud-arrow-up---
A section’s _index.md can also carry cascade, which applies front matter to
every page below it, so a setting shared by a whole subtree is written once:
content/docs/reference/_index.md
---title:Referenceweight:90cascade:pager:false# no previous / next on any page in this subtreesearch_boost:0.8# reference pages rank slightly lower in search---
Ordering: use multiples of 10 for weight
Siblings sort by ascending weight; only pages with equal weights fall back to
date and then linkTitle. Number in steps of 10 (10, 20, 30) so you can later
insert a page between two others without renumbering them. A section’s own
weight, set in its _index.md, places it among its siblings.
A page without weight counts as 0, and Hugo puts such pages after every page
that has one, ordered among themselves by date and title. That order shifts as
content changes, so give every page a weight.
List or cards on a section index
Below the body of an _index.md, the theme lists the section’s children, so a
section page needs no hand-written table of contents. The site chooses the
style:
hugo.yml: the site-wide default
params:ui:section_index:cards# list | cards
list, the theme default, shows one line per child with its title and
description. cards lays out a grid of link cards built from each child’s
icon, linkTitle and description; this section’s own index page is an
example. In the card style, description is the card’s text, so keep it to
one sentence that fits on a line. A section that needs the other style
overrides it in its front matter:
content/docs/reference/_index.md
section_index:listcascade:section_index:list # and its descendant sections too
Two page switches work with either style: simple_list: true renders a compact
bulleted list of titles, and no_list: true leaves the list out for a page
whose body already provides its own navigation. Site-wide settings such as the
number of card columns are in
Section index style.
Hiding from the sidebar
Front matter
Effect
toc_hide: true
The page is absent from the sidebar tree and from the previous/next sequence. It is still published, and links to it still work
hide_summary: true
The page is absent from its section’s child list
sidebar_divider: true
The entry stops being a link and becomes a group heading in the sidebar
manual_link: https://…
The sidebar row points elsewhere. Pair it with manual_link_title and manual_link_target: _blank
toc_hide and hide_summary control two different places, so set both only
when the page should appear in neither.
Sidebar icons
Give a page or a section an icon with one Font Awesome class pair in its front
matter:
content/docs/deploy/_index.md
icon:fa-solid fa-cloud-arrow-up
An icon on every leaf page makes a long sidebar hard to scan, so a site-wide
policy decides which entries show theirs:
hugo.yml
params:ui:sidebar_icon_policy:groups# all | groups | none
Value
Effect
all
Every entry that declares an icon shows it. This is the default when the key is unset
groups
Only the root and entries with children show icons; ordinary leaf pages do not
none
No entry icons in the sidebar
For a new site, set groups explicitly: sections keep the icons that identify
them, and leaf pages stay plain. This site uses groups, which is why only
its sections carry icons in the sidebar.
Expanding and folding
A section with children has a fold arrow in the sidebar. By default the branch
that holds the current page is open and the others are closed, except blog
sections, which start open. sidebar_expanded in a section’s _index.md
overrides that default in either direction:
content/docs/reference/_index.md
sidebar_expanded:true# this section is always expanded by default
The browser remembers the reader’s choices for the sidebar as a whole: whether
it is collapsed, its width and its scroll position. It does not remember
individual branches; a site that wants that can add it with the
sidebar API. Site-level folding, compact mode, how many levels
start open, width and truncation are set in
Layouts and page types, and every key is
defined in Configuration.
Groups without a landing page
When a folder exists only to group its children, make its _index.md a
divider and do not publish it:
The title becomes a plain group label in the sidebar. When folding is on, its
button opens and closes the children, and without JavaScript the group stays
open. The children remain in the pager, search, the navigation JSON and the
print view. Omit build to keep publishing the section page while the sidebar
still shows a non-link label. A divider without children renders as a plain
separator heading.
Three other switches look similar but do something else, so none of them
replaces a group: toc_hide hides the section’s whole subtree, no_list only
drops the child list from the section’s own page, and hide_summary only
removes the entry from its parent’s list. build.render: link keeps a
permalink without publishing a page; for a group that should never be a
destination, use never, so no other navigation can offer a link to it.
The shell follows type, not the path
The documentation shell (sidebar, table of contents, breadcrumbs, pager) does
not depend on the folder name. It comes with the page’s type: the five
built-in types below have it, and they are the default of
params.ui.shell_types (see Layouts and page types
before changing that list).
Documentation can therefore live at any path, with a cascade assigning
type: docs. To put a handbook at content/handbook/, its section root reads:
content/handbook/_index.md
---title:Operations handbooktype:docssidebar_root_for:self # the sidebar tree roots here rather than falling back to /docscascade:type:docs # the whole subtree uses the documentation shell---
Important
When the documentation directory is not called docs, sidebar_root_for: self
is needed alongside type: docs. Otherwise the sidebar looks for its root at
params.ui.docs_section (default docs), and a reader under /handbook/
sees the /docs/ tree.
Multiple sidebar roots
The sidebar shows one tree at a time, and a row above it names that tree’s
root: by default, the top-level section the reader is in. A large subtree, such
as a versioned API reference or a self-contained handbook, can become a root of
its own:
The section’s index page and all its descendants take it as their sidebar root
children
The index page stays in the parent tree; only its descendants use this root
The switcher above the tree is the same on every page. It lists each top-level
section and each section that declares sidebar_root_for: self, as a plain
link when there is one entry and as a dropdown when there are more. To keep a
top-level section or a nested root out of that list, set
sidebar_root_menu: false in its _index.md; while a reader is inside that
section, the switcher still shows it as the current location.
Below the switcher, the root’s index page is the first link in the tree: the
switcher picks a tree, and the root link opens a page. Set
sidebar_root_link_self: false to make that row point to the parent section
instead.
Verify
hugo --printPathWarnings
The build should end with Total in … and no ERROR. After moving folders
around, --printPathWarnings reports any two pages that now publish to the
same path.
Then check in the browser:
The sidebar order matches the weight values you wrote, and a new section appears where you expect it.
Each section index lists all of its children; a missing one has hide_summary set or lacks an _index.md.
Breadcrumbs and the pager follow the sidebar’s order, because they read the same tree.
The tree has the same shape in every language, which needs a translated _index.md (such as _index.zh.md) beside each original.
If a section has more entries than params.ui.sidebar_menu_truncate allows,
the build warns and names the value to raise it to. Act on that warning: the
entries past the limit are missing from the sidebar.
Controlling a branch from site code
window.OinkSidebar lets site code open and close sidebar branches, for
example to restore a reader’s saved choices. Load the script after the theme’s
own scripts, for instance from layouts/_partials/hooks/body-end.html, and
wait for ready before reading or changing state. This example expands the
first group in the sidebar:
A branch’s ID is the aria-controls value of its toggle button.
getState(id) returns {id, expanded}, or null for an unknown ID. Each
change dispatches one oink:sidebar-disclosure event on document, with the
detail {id, expanded, source}, after the button, the branch and their
accessibility state agree; setting the value a branch already has sends no
event. A branch that contains the current page stays open when you restore
state through the API, though the reader can still fold it.
If you persist branch choices, scope the storage key by language and by
navigation version, cope with storage being unavailable, and ignore saved IDs
that the current page does not have. The
sidebar contract defines the full
lifecycle.
Look up every front matter key OINK reads, with its type, default and effect, to change one page or a whole section.
Front matter lets one page, or a whole section through cascade, depart from
the site-wide settings in hugo.yml: a wide layout for one reference table, no
pager on a landing page, comments on blog posts but not on the docs. The keys
below are every page key OINK reads, grouped by what they change. Hugo’s own
fields (slug, url, build, sitemap, expiryDate and the rest) work as
usual and are documented by
Hugo. Site parameters
are in Configuration.
How page keys work
A page key is the site key without params. and ui., written at the top
level of the front matter. The site’s params.ui.section_index becomes
section_index on a page, and params.page_width becomes page_width. Do not
nest page keys under a ui: block: the theme does not read one and does not
warn about it either, so the setting silently has no effect. When a key seems
to do nothing, check its name and placement against these tables first.
A section’s cascade uses the same names one level deeper and applies them to
every page beneath it:
content/docs/reference/_index.md
cascade:pager:falsesection_index:list
When several places set the same key, the most specific wins:
the page’s own front matter;
the nearest cascade above it;
the site parameter in hugo.yml.
A Default of “site value” means the key falls back to the site parameter of
the same name. An invalid value warns and the page uses the default shown here,
as described in Configuration; the
tables mention a fallback only where it differs. Keys that OINK has renamed or
retired are not listed: the build warns when it meets one, and
Upgrade has the replacements.
Basics
Every page uses a few of these, and title is the one it cannot do without.
title, string, default—
Page heading, browser title and search result title. Required on every page
linkTitle, string, defaulttitle
Short name in the sidebar, breadcrumbs, pager and cards
description, string, default—
One-sentence summary for section cards, search snippets and meta description. Blog pages also show it as an introduction above the body
weight, integer, default0
Order among siblings; use multiples of 10. 0 (unset) sorts after every page with a weight. See Organizing content
draft, boolean, defaultfalse
A draft never reaches the build output; preview it with hugo server -D. See Writing pages
date, date, default—
Blog date and release-page sort key. A future date keeps the page out of the build by default
lastmod, date, defaultGit commit time
The page-end “last modified” time. With enableGitInfo on, Git supplies it and you need not write it
aliases, string array, default—
Old paths that redirect to this page, for when a page moves
type, string, defaulttop-level directory name
Picks the template and the shell: docs, book, blog, swagger, expo. See Organizing content
layout, string, default—
Picks a layout for one page: landing or releases
cascade, map, default—
Applies the keys below to the whole subtree
Sidebar and navigation
Reach for these when a page belongs somewhere else in the sidebar, or nowhere,
or when a section index should list its children differently.
Organizing content shows how they combine.
icon, Font Awesome class pair, default—
Icon in the sidebar, section cards and search results, such as fa-solid fa-rocket
toc_hide, boolean, defaultfalse
Removes this page and its subtree from the sidebar and the pager sequence, in content-derived and explicit trees alike
hide_summary, boolean, defaultfalse
Leaves the page out of its section index
sidebar_divider, boolean, defaultfalse
Turns the entry into a group heading without a link, which the pager skips; a section marked this way still lists its children. For a group with no page of its own, use build.render: never instead (group without a page)
sidebar_expanded, boolean, defaulttrue for blog sections, false otherwise
Opens this section in the sidebar by default
sidebar_root_for, self / children, default—
Makes this section the root of the sidebar tree. self includes the section index; children covers only its descendants. Any other value warns and is ignored
sidebar_root_link_self, boolean, defaulttrue
The root row links to the section itself; false links it to the parent section instead
sidebar_root_menu, boolean, defaulttrue
Offers a top-level section or nested self-root in the sidebar’s root switcher. An excluded root still shows as the current location while you are inside it
toc_root, boolean, defaultfalse
When the sidebar root is the site home, removes this whole top-level section from the tree and the pager sequence
manual_link, URL, default—
Points this row in the sidebar and section index somewhere else
manual_link_relref, content reference, default—
The same link, resolved with relref. A missing target fails the build
manual_link_title, string, defaulttitle
Hover title for the manual link
manual_link_target, string, default—
Link target such as _blank; the theme adds noopener
no_list, boolean, defaultfalse
The section index lists no children
simple_list, boolean, defaultfalse
The section index lists children as a compact bulleted list
section_index, list / cards, defaultsite value (list)
Style of the section index
section_index_columns, integer, default2
Column count of the card style
notoc, boolean, defaultfalse
Hides the outline in the right rail
pager, boolean, defaultdecided by params.ui.pager_types
false removes previous / next from this page. A non-boolean warns and the page keeps its type’s setting
navbar_enabled, boolean, defaultsite value (true)
Whether this page renders the navbar
navbar_autohide, boolean, defaultsite value (false)
On desktop screens with a mouse, hides the navbar until the pointer nears the top edge or keyboard focus enters it. The home page ignores the site value and follows only its own front matter
breadcrumb, boolean, defaultshell default
Whether this page renders breadcrumbs. Docs and Book pages default on, Blog pages off
theme_color, string, defaultsite value
#rgb or #rrggbb accent for this page. In a section root’s cascade, it gives the whole section its own color. See Brand and appearance
theme_color_dark, string, defaultderived
The dark-mode accent. A page that overrides only theme_color under a cascade that sets this key inherits the cascade’s dark value, so override both. theme_color: false opts the page out of an inherited section color
page_context_menu, boolean, defaultsite value (true)
The page action menu on the title row: copy Markdown, edit this page, print and so on
page_context_menu.assistant_links, boolean, defaultsite value (false)
The ChatGPT and Claude items, written page_context_menu: { assistant_links: false }. A page can only turn them off; it cannot turn them on when the site has not
Page shell
Change these when one page needs a different frame around its content: a
wider column, no sidebar, a slimmer footer. Site defaults and their effects are
in Layouts and page types.
page_width, normal / wide / full, defaultnormal
Width of the content column
reading_width, slim / normal / wide, defaultnormal
Line length on Book pages. Applies only to type: book
footer_style, fat / slim / none, defaultsite value (fat)
Footer shape
body_class, string, default—
A class added to <body> for the site’s own CSS
reading_time, boolean, defaultsite value
Whether this page shows a reading time
sidebar_enabled, boolean, defaulttrue
false hides the left sidebar on this page
scroll_spy, boolean, defaultsite value
Accepted and ignored: the outline always highlights the heading you are reading
What follows “last modified”: the commit subject, its hash, or nothing
sidebar_expand_levels, sidebar_menu_compact, sidebar_menu_foldable, sidebar_item_overflow, as the site parameter, defaultsite value
Per-page sidebar behavior; the values are in Configuration
sidebar_width_min, sidebar_width_max, positive integer, defaultsite value (220 / 480)
Limits for resizing the desktop sidebar on this page. A minimum above its maximum warns and restores the site pair
code_copy, boolean, defaultsite value (true)
Default copy button on this page’s code blocks. A fence’s own copy= wins
rich_copy, boolean, defaultsite value (true)
Typeset HTML copy for prose selections pasted into rich-text editors
toc_style, fixed / flow, defaultsite value (fixed)
A fixed right-rail panel, or a wider rail that starts in the content flow
toc_taxonomies, boolean, defaultsite value (true)
Whether taxonomy clouds join the outline in the right rail
taxonomy_icons, map, defaultsite value
Per-taxonomy icon overrides for this page, or for a section through cascade
Search
Use these to make the right page rank first for a query, or to keep a page out
of search entirely. The guide is Search.
search_keywords, string or string array, default—
Extra search terms: synonyms, abbreviations, other languages
search_boost, positive number, default1.0
Ranking multiplier: the final score is the text match score times this value. A non-numeric, infinite, zero or negative value falls back to 1.0
search_exclude, boolean, defaultfalse
Keeps the page out of the local index
Output formats
Set these when a page should not get a Markdown copy or should stay out of the
printed chapter. The guides are AI-agent support
(.md and llms.txt) and Print.
outputs, string array, defaultsite outputs
The output formats this page generates. [HTML] drops its .md version
no_print, boolean, defaultfalse
Leaves the page out of the whole-chapter and whole-book print view
Page end: comments, feedback and provenance
These decide what follows the article. The order is fixed: share bar, then
feedback, then provenance, then the pager, then comments. See
Writing pages.
Lists the pages that link here in a “Backlinks” group beside the outline. A section can cascade it. See Navigation and menus
translation_notice, language code or false, defaultsite params.ui.translation_notice (off)
The language of the authoritative version, so a translation can say so and link back. Write false on a page written natively in this language
Upstream attribution
Declare a source when a page is adapted from someone else’s material. The
provenance line at the page end then names the work, the copyright holder and
the license, and links to the full notice. Values resolve from the site
parameters, then the data/upstreams entry named by upstream_source, then
the page’s front matter; the most specific declaration wins.
upstream_link itself is read only from front matter (a cascade counts, a
site parameter does not), because a site-wide value would make every page
claim the same source.
upstream_link, URL, default—
Address of the material this page is derived from. An empty string opts out of a value inherited through cascade
upstream_name, string, default—
Name of the upstream work, as the credit shows it. Required once upstream_link is set
upstream_copyright, string, default—
Copyright notice, kept exactly as upstream wrote it. Required
upstream_license, SPDX identifier, default—
Must appear in data/licenses. Required
upstream_notice, site path or URL, default—
Page carrying the full notice: license text, warranty disclaimer, upstream NOTICE, snapshot pin. Required
upstream_ref, string, default—
Tag or commit of the snapshot, shown in parentheses after the work
upstream_source, string, defaultsite parameter
Entry in data/upstreams that holds upstream facts shared by many pages
upstream_modified, boolean, defaultfalse
Changes the credit to say the work was adapted. When the site has repository information, the same sentence also links to the page’s history. A non-boolean is treated as false
The attribution is all or nothing, because a partial credit misleads readers
more than an obvious gap. A companion key without upstream_link, a missing
required key, a license not found in data/licenses or an unknown
upstream_source entry each warns and omits the whole attribution. The theme
ships an SPDX table at data/licenses.yaml; a site adds or overrides entries
with a file of the same name.
Image zoom
Turn this on for pages of screenshots or diagrams that readers need to see at
full size.
image_zoom, boolean, defaultsite value (false)
Whether images on this page open full size when clicked. See Images
Blog posts
Posts use these for bylines, series and featured images, and blog sections use
them to choose the post index. The guide is Blog posts;
List layouts compares the four index layouts.
author, string, default—
Post byline; inline Markdown is allowed. Ignored on a page that has authors
authors, string array, default—
Terms of the authors taxonomy, in byline order. Needs author: authors under taxonomies:. See Authors and bylines
series, string array, default—
Terms of the series taxonomy; the strip above the body uses the first one. See Series
series_weight, integer, default—
Place in the series. Weighted members come first in ascending order, the rest follow by ascending date
The first entry is the post’s featured image and share card. In a section’s cascade, it sets a default for the section. images: [] opts a page out of an inherited value, but does not hide an image the page bundle supplies as featured, cover or thumbnail
byline, string, default—
Credit shown with the featured image wherever that image is rendered
How the post shows its featured image on the article itself; hero makes a full-width image header
blog_index, list / cards / table / gallery, defaultsite value (list)
Layout of the blog section’s post index. table always lists the whole section without pagination
blog_index_columns, positive integer, defaultsite value (3)
Card columns at wide breakpoints; medium and narrow screens keep their own limits
blog_index_size, positive integer, defaultsite value (12)
Posts per page for list, cards and gallery, and for all four views when switching is on. A standalone table ignores it
blog_index_toggle, boolean, defaultsite value (false)
Publishes all four layouts with a switch that remembers the reader’s choice. When false, only the configured layout is published and saved choices are ignored
blog_gallery, map, defaultsite block
Replaces the site’s whole gallery block; omitted fields use the built-in defaults. A reader’s saved mode and size win
blog_gallery.mode, wall / cards / seamless, defaultwall within a page block
Justified rows with 6px gaps, masonry with visible captions, or rows without gaps. Independent of blog_index
blog_gallery.size, integer 160–360, default240 within a page block
Target tile size in CSS pixels; independent of posts per page
share, string array or false, defaultsite params.ui.share (empty)
Share targets at the page end. Replaces any inherited list; false opts the page out; an unknown target warns and is dropped. See Share
summary, string, default—
Excerpt for gallery entries and for post rows on tag and category pages when description is absent
Book
A book sets type: book on its section through cascade; these keys then
number chapters and mark drafts. The guide is Books.
book_number, string, default—
Chapter number, shown before the page title and the sidebar entry
book_status, draft, default—
Marks an unfinished chapter: flagged in the sidebar and contents; book-toc with drafts=false leaves it out
sidebar_headings, false / true / integer 2–4, defaultsite value (false)
Lists the current page’s headings under its sidebar entry, down to the given level; true means h2
book_draft_banner, boolean, defaultsite value (false)
Adds a banner at the top of a draft chapter
Expo albums
An album page (type: expo) reads its images and opening arrangement from
this block. The guide is Expo albums.
expo, map, defaultsite params.ui.expo
Replaces the site block; absent fields use the defaults below
expo.images, string, defaultimages/*
Pattern matching the image resources in the page bundle
expo.mode, wall / cards / seamless, defaultwall
Arrangement shown until the reader picks one
expo.size, integer, default240
Target tile size from 160 to 360 CSS pixels; a size the reader saved wins
Titles, captions, credits, weights, explicit IDs and separate originals for
individual images use Hugo’s native resources metadata; see
Image metadata.
Landing
A page with layout: landing builds its sections from a data file or from its
own front matter. The guide is Home and landing pages.
landing, string, default—
Reads the sections from data/landing/<key>/<language>.yaml
sections, array, default—
Section definitions written in the front matter, taking precedence over landing. A value that is not an array warns and renders no sections
Release pages
A release note names its GitHub release with one key, and a section with
layout: releases lists those pages newest first by date and then SemVer,
ignoring weight. The guide is Releases and downloads.
release_url, string, default—
One GitHub release URL, https://github.com/<owner>/<repo>/releases/tag/<tag>. The theme derives the owner, project, tag and source archive links from it and takes the date from the page’s date; download assets come from a checksums block in the body. Any other value warns and the release block is skipped
Related
Writing pages — the handful of keys every page needs
Write blog posts with dates, bylines, series and featured images, then choose how the blog index, RSS feed and share bar present them.
A blog section gives dated writing the shell readers expect from a blog: a
newest-first index with a thumbnail on every row, an RSS feed, bylines, tags
and share links. The body of a post is ordinary Markdown, written exactly like
a documentation page; what changes is the front matter and the section around
it.
Write a post
Create one Markdown file per post anywhere in the blog section. The file path
becomes the URL, and the date, not the folder, decides where the post appears:
content/blog/release/2.4.0.md
---title:Release 2.4 — parallel restore and faster vacuumlinkTitle:v2.4.0 # short name in the sidebar and pagerdate:2026-08-14# publication date; decides list orderlastmod:2026-08-14description:>- Version 2.4 restores large clusters in parallel, halves vacuum time on
append-only tables, and adds a dry-run mode to every upgrade command.author:The maintainerscategories:[Release]tags:[Release, Backup]---
Four keys matter more on a post than on a documentation page:
date is required, because it sets the post’s place in the index and its
RSS timestamp. A post dated in the future stays out of the build until that
day; preview it with hugo server -F.
description appears above the body as the post’s introduction and in
search results, so write it as a sentence for the reader rather than a
keyword list.
author accepts inline Markdown, so [Alice Chen](https://example.com/alice)
works. For several authors, portraits or profile pages, use
authors instead; a post that has authors ignores author.
The date is shown in the format of params.time_format_blog, ISO
2006-01-02 by default. Set it per language for a localized form:
The body takes every component a documentation page does,
and headings take explicit English {#id} anchors here too. tags and
categories appear as chips under the title, a cloud in the right rail and a
filter menu in the navbar; Taxonomies covers
enabling them and translating their labels. The page end (feedback, last
modified, pager, comments) works as described in
Writing pages; a blog usually turns feedback off
and keeps comments.
A bilingual post is a pair of files, 2.4.0.md and 2.4.0.zh.md, with the
same date, author, weight and aliases. Translate the title, description
and tags, but not commit IDs, version numbers, commands or URLs.
Featured image
The featured image is the thumbnail on the post’s index row and the picture on
its social share card. OINK uses the first of these it finds:
the first entry of images in the post’s front matter;
an image in the post’s page bundle whose filename contains featured or
feature, then cover or thumbnail; it is cropped to fit, and the
resource’s own byline becomes its caption;
images inherited from an ancestor section’s cascade, nearest first.
The third source gives a whole section a default image, so posts without art of
their own still get a thumbnail:
content/blog/release/_index.md
cascade:images:[/images/release.webp]
To drop an inherited image from one post, write images: [] in its front
matter; to drop it from a whole subsection, put that in the subsection’s
cascade. Neither hides an image the page bundle supplies. The site-level
params.images is used for share cards only, never as an index thumbnail.
On the article itself
By default the featured image appears only on index rows and share cards. Set
params.ui.featured_image to show it on the article as well:
Mode
What the article shows
none
No image on the article. The default
banner
The image above the title in a fixed 16:9 frame, so a run of posts reads with the same rhythm
wash
A faint copy of the image behind the article header, fading out before the body
hero
A full-width image header
hugo.yml
params:ui:featured_image:banner
The page key is featured_image, so a subsection’s cascade can switch it on
for that tree alone and a single post can opt out. A post without an image
shows none in any mode, which makes it safe to enable for a section where only
some posts have art. The modes load no script. A bundled or asset raster image
is re-encoded as WebP and requested ahead of the page’s other images; an
animated image keeps its frames.
content/blog/release/_index.md
cascade:featured_image:wash
Authors and bylines
Use the authors taxonomy when a blog has more than one writer, or when
readers should be able to see everything one person wrote. Declaring the
taxonomy is the only switch; the theme adds no parameter for it:
The article header shows their portraits and linked names in that order, index
rows show the names, and the blog feed lists each author alongside the
site-level managingEditor.
An author’s profile is the taxonomy term page, so no data/authors file is
involved:
content/authors/alice-chen/_index.md
---title:Alice ChenlinkTitle:Alicedescription:Maintains the backup and restore tooling.images:[portrait.webp]---The long introduction, rendered on the profile page under the name.
Bylines use the term page’s linkTitle, or title when there is none, so a
profile can carry a full name while bylines show a short one. description is
the one-line introduction and the body the long one. The portrait is chosen by
the same rules as a post’s featured image, so images: and a
bundled portrait.webp both work. A Chinese profile is an _index.zh.md beside
it. An author named in a post but without a profile page still gets a byline:
the name, an initial in place of a portrait, and a link to their post archive.
Series
A series is a reading path through posts that each stand on their own, such as
a five-part deep dive into backup internals. It is lighter than a
book, which adds chapter numbers, cross-references and a
combined print view. Declaring the taxonomy enables it:
hugo.yml
taxonomies:series:series
A post names its series and may give itself a position:
series:[backup-internals]series_weight:20
The post then shows a strip above its body with the series name, the post’s
position, a link to the next part, and the full list inside a <details>, with
no JavaScript. The term page content/series/<name>/_index.md is the series
introduction; an _index.zh.md beside it makes it bilingual.
Members with a series_weight come first in ascending order; the others follow
from oldest to newest, and the content path breaks ties. The strip and the term
page use the same order. A post in several series shows one strip, for the
first series it names, and a series with only one post shows none.
Neither authors nor series appears in the taxonomy chip row on a post,
since each has its own place on the page. To show one there as well, name it in
params.taxonomy.page_header.
Release notes
A version announcement is an ordinary post, conventionally under
blog/release/, with the version in linkTitle (v2.4.0). To add a card
linking the GitHub release and source archives, an asset table with checksums,
or a chronological release index, see
Releases and downloads.
Set up the blog section
The Starter already has a blog. To create one, make a section under content/
and give it type: blog. Split it into subsections by audience or purpose if
you like, but not by year: the index orders posts by date on its own.
The section root sets the type for the whole subtree, along with anything every
post should share:
content/blog/_index.md
---title:Blogdescription:Engineering notes and release announcementstype:blogicon:fa-solid fa-blogsidebar_root_for:self # the blog has its own sidebar treecascade:type:blogfeedback:false# posts do not ask "was this page helpful?"comments:true# but they do take comments---
params.ui.blog_section (default blog) tells the theme where the blog root
is. If you name the directory something else, change that parameter or keep
sidebar_root_for: self as above.
In the sidebar, blog sections start expanded and list posts newest first. A
post with a weight is pinned above the dated ones there; the post index
ignores weight and stays in date order.
List layouts and pagination
Below the section’s own _index.md text, OINK appends the post index: every
post in the section and its subsections, newest first, without year groups.
blog_index chooses how it looks:
Value
Layout
What the reader sees
list
Horizontal rows (default)
Thumbnail, title, date, subsection, tags and summary
cards
Card grid
A cropped 16:9 cover above the title, metadata and summary
table
Compact table
Date, title and tags, one row per post
gallery
Image gallery
Covers at their own proportions with titles and descriptions; click to open the post
Set the site default with params.ui.blog_index in hugo.yml, or set
blog_index in a blog section’s _index.md to override it there; a section’s
cascade passes it to the sections below. These settings shape blog section
indexes only. Tag and category pages keep their own layout, and a custom home
page needs its own template to show posts.
list, cards and gallery show 12 posts per page. Change that with
blog_index_size, in hugo.yml for the site or in a section’s front matter
for one blog:
hugo.yml
params:ui:blog_index_size:20
Hugo’s pagination.pagerSize has no effect on these lists, because the theme
passes blog_index_size to the paginator itself.
The card form
cards turns the rows into a grid of content cards, each with a 16:9 crop of
the featured image above the title, a date and subsection line, and a
three-line summary:
hugo.yml
params:ui:blog_index:cardsblog_index_columns:3
blog_index_columns applies above the xl breakpoint; between md and xl the grid
has two columns, and below md one. When the image can be processed, Hugo crops
it with .Fill, so readers download a small preview instead of the original.
Table and layout switching
table is an archive view: it always lists every post in the section on one
page, without pagination. Set blog_index_toggle: true to let readers choose
for themselves. A switch appears beside the title (and on
L when keyboard navigation is on), cycling list → cards →
table → gallery → list:
content/blog/_index.md
blog_index:cardsblog_index_toggle:true
The switch remembers the reader’s choice. With it on, list, cards and
gallery share the same blog_index_size pages and pager, while table still
shows every post at once. Every layout keeps date order and manual_link
destinations. Hidden layouts load their images lazily, but their markup and
thumbnails still add build time. With blog_index_toggle: false, only the
configured layout is published and any saved reader choice is ignored.
Gallery form
gallery suits a blog whose posts are mostly visual. Each post becomes a
linked cover, taken from its featured image; the default wall joins covers into
rows while keeping their proportions. Titles and descriptions appear on hover or
keyboard focus, and below the image on touch screens. A post without a cover
keeps a title tile.
On hover or keyboard focus; below images on touch screens
seamless
The same rows without gaps
On hover or keyboard focus; below images on touch screens
cards
Masonry columns
Always visible below images
blog_index: cards is the regular card grid; masonry inside the gallery is
blog_index: gallery with blog_gallery.mode: cards. blog_gallery.size is
the target tile size, from 160 to 360 CSS pixels with a default of 240, and has
nothing to do with blog_index_size, the number of posts per page.
Readers can change the arrangement and size, and their choice is remembered
separately from Expo albums. With keyboard navigation on and the gallery in
view, ; cycles wall → cards → seamless, and
, / < or . / > shrinks
or enlarges tiles by 20 px.
The site default is a blog_gallery block under params.ui. A block in a
page or cascade replaces it whole, and any field it omits falls back to
wall and 240. The reference tables are in
site parameters and
page parameters.
RSS
Which pages publish a feed is decided by outputs. Adding RSS to section
gives every section its own feed:
Writing outputs replaces all of Hugo’s defaults, so list RSS explicitly. A
page kind without it has no feed, and the build does not warn you.
With the tree above, /blog/index.xml carries every post, subsections
included, and /blog/release/index.xml only the release posts. Individual
posts have no feed of their own. Each
language has its own feed at that language’s path plus index.xml, and Hugo’s
services.rss.limit caps the number of items. On the blog root and its
first-level subsections, the first button on the title row is the RSS link, so
readers never have to guess the address.
To publish no feeds at all, turn the kind off. That is more thorough than
removing RSS from each page kind:
hugo.yml
disableKinds:[RSS]
In a feed, components take their static form: disclosures are expanded and
interactive controls removed.
Share
params.ui.share adds a row of share links at the top of the page end. It is
empty by default, so nothing appears until you list the targets you want, in
the order you want them:
Sixteen targets are available: x, bluesky, mastodon, facebook,
linkedin, reddit, hackernews, telegram, whatsapp, line,
pinterest, weibo, chatgpt, claude, email and copy. An unknown name
warns and is dropped. There is no discord, because Discord offers no public
share link to build one from; copy covers it.
The page key is also share, so a cascade limits the bar to one tree, a
page’s own list replaces the inherited one, and share: false removes it from
a single page:
content/blog/_index.md
cascade:share:[x, bluesky, email, copy]
Only regular pages show the bar; lists, term pages and the home page have no
single item to share, and print, Markdown and RSS output leave it out. Each
target is a plain link carrying the page’s permalink and title, plus a local
copy button. The bar loads no third-party scripts or stylesheets, and a
service hears about the page only when a reader clicks its link.
chatgpt and claude hand that same permalink to an assistant with a prompt
asking it to read the page. They are separate from the “Open in ChatGPT” and
“Open in Claude” items of the page action menu, which send the live browser URL
when clicked and therefore stay behind page_context_menu.assistant_links.
The copy button is the built-in copy_link action, which the Command Palette
offers on every page whether or not a share bar is configured.
Verify
hugo --printPathWarnings
The build should end with Total in … and no ERROR. Then check that:
the post appears at /blog/ in the right date order, with the date in the
format you expect;
public/blog/index.xml exists, contains the post, and uses complete
absolute links;
the post has a thumbnail in the index (if not, none of the three
featured-image sources matched);
Turn a directory tree into a book with type: book: chapter numbering, numbered figures and tables, cross-references, generated indexes and whole-book print.
Documentation is consulted: readers arrive from search, read one page and
leave. A book is read in order, and its readers expect what print taught them:
numbered chapters, figures and tables they can cite as “Figure 2-1”,
cross-references that keep working when chapters move, and the whole text as
one document they can print or export. Set type: book on a content tree and
OINK provides all of that while every chapter stays an ordinary Markdown page.
A book needs two site settings. Goldmark block attributes and passthrough must
be on, as listed in
the three Goldmark prerequisites, and
params.ui.shell_types must contain book, which the default list already
does. If the manuscript already exists in another Hugo site, read
Migrating an existing manuscript first.
A minimal book
The book root is an ordinary Hugo section, its subdirectories are chapters, and
the pages inside them are sections. That tree is the only chapter list: the
sidebar, the pager, the generated contents and the printed book all read it,
so moving a file moves the chapter everywhere at once.
content/handbook/, one book
content/handbook/
_index.md#book home: type: book + cascade, holding book-toc and the indexes
ch01/
_index.md#chapter 1 front page: book_number: 1
install.md#section 1.x
bootstrap.md
ch02/
_index.md#chapter 2: numbered with book_number, optionally marked draft
replication.md
failover.md
appendix.md#an unnumbered appendix, still in the sidebar and the reading order
The root page declares the type, cascades it to every page below, and asks for
the print output that produces the whole-book document. Print is opt-in
because aggregating every chapter makes the build noticeably slower:
Front matter outputs replaces the site’s list for that page, so name every
format the root should keep. To set it in hugo.yml instead, add print to
outputs.section, or to outputs.home when the book is the site root; that
turns print on for every page of that kind.
A chapter’s _index.md needs only a title, its number and its position:
content/handbook/ch02/_index.md
---title:Replication and failoverbook_number:2book_status:draftweight:20---
Chapter numbers, drafts and headings
book_number is shown exactly as written before the chapter title, in the
sidebar entry and in the generated contents. The theme never derives a number
from directory order, so 2, B and A are all valid, and rearranging the
tree never changes a number a reader has already cited. Figure, table,
equation and example numbers follow the same rule: each num is a string you
write, such as 2-1, 5.3 or A-2, not a counter.
book_status: draft labels an unfinished chapter in the sidebar and in
book-toc. It is an editorial label, not Hugo’s draft: the chapter still
builds and publishes. To also put a localized notice above the body of every
draft chapter, turn on the banner, which is off by default:
The banner appears only on type: book pages with book_status: draft, and its
text is the book_draft_notice localization string.
sidebar_headings lists the current page’s headings under its sidebar entry,
which helps in long chapters. It is false by default; true lists h2
headings, and 2, 3 or 4 sets the deepest level listed. A page or a
section cascade can override the site value, and the table of contents on the
right is unaffected either way.
Give every heading you plan to link to an explicit ID, such as
## Synchronous replication {#sync-replication}. A generated ID changes when
the heading text does, which is fine for navigation but breaks references that
must last. The complete key definitions are in
Configuration and
Page parameters.
Numbering: the native form
Figures, tables, equations and examples each get a number from an attribute
line placed directly under the Markdown block, with no blank line between them:
num= sets the number, #id the anchor, and caption= a plain-text caption.
This is the form to reach for first, because the source stays readable in any
Markdown viewer and footnotes inside the block keep working.
Figures
Without an #id, a figure’s anchor is fig-<num>.
Source

{#book-release-note num="2-1" caption="The release notes page is also the single source of release facts." width=600 height=300}
Figure 2-1The release notes page is also the single source of release facts.
Native figures need
markup.goldmark.parser.wrapStandAloneImageWithinParagraph: false; otherwise
Hugo wraps the image in a paragraph, the attribute line attaches to the
paragraph, and the figure gets no number. The alternative text comes from the
image’s own ![…], never from the caption. To make the figure a link, add
link= to the same attribute line; you do not need the fig shortcode for
that.
Tables
An attribute line under a pipe table numbers it, with tbl-<num> as the
default anchor.
Source
| Isolation level | Dirty read | Non-repeatable read | Phantom read |
| --- | --- | --- | --- |
| Read Committed | Not possible | Possible | Possible |
| Repeatable Read | Not possible | Not possible | Possible |
| Serializable | Not possible | Not possible | Not possible |
{#tbl-2-1 num="2-1" caption="Anomalies permitted at each PostgreSQL isolation level."}
Isolation level
Dirty read
Non-repeatable read
Phantom read
Read Committed
Not possible
Possible
Possible
Repeatable Read
Not possible
Not possible
Possible
Serializable
Not possible
Not possible
Not possible
Table 2-1Anomalies permitted at each PostgreSQL isolation level.
Equations
An attribute line under a $$ block numbers the formula, with eq-<num> as the
default anchor. On wide screens the number and caption sit to the right of the
formula; on narrow screens they wrap below it, and a formula wider than the
screen scrolls sideways. Short captions keep equations easy to scan.
Source
$$
A = \frac{\mathrm{MTBF}}{\mathrm{MTBF} + \mathrm{MTTR}}
$$
{#eq-2-1 num="2-1" caption="Availability from MTBF and MTTR."}
A=MTBF+MTTRMTBF
Equation 2-1Availability from MTBF and MTTR.
This form needs Goldmark passthrough. A site without it uses the eq
shortcode below, which renders the formula with KaTeX during the build.
Examples
A code fence with num= and caption= becomes a numbered example, with
eg-<num> as the default anchor. An #id on the fence names the surrounding
<figure>, which is what references point to. An example needs both
attributes: a caption without a number is ignored, and a number without a
caption is dropped with a warning. The caption heads a single frame around the
code.
Source
```sql {num="2-1" caption="Daily write volume on the primary." #eg-2-1}
SELECT date_trunc('day', ts) AS day, count(*)
FROM pg_stat_statements_history
GROUP BY 1 ORDER BY 1 DESC LIMIT 7;
```
The shortcodes fig, tbl, eq and eg render the same <figure> as the
native form, register in the same target table, and sort by their position in
the source. Use them when a single Markdown block cannot hold the content: a
figure made of several images or other Markdown, several tables under one
number, an equation on a site without passthrough, or an example with several
fences and prose between them.
fig takes its image from src= or from its inner Markdown, never both. It
also accepts link, alt, width, height and class, and title as an
alias of caption for migrated content:
Source
{{< fig num="2-2" src="/images/docsy.webp" alt="The default Docsy shell"
caption="OINK's upstream: the Docsy content model is still underneath." width="600" height="300" />}}
Figure 2-2OINK's upstream: the Docsy content model is still underneath.
tbl wraps the label, the table, the caption and the anchor in one figure:
Source
{{< tbl num="2-2" caption="How a numbered component appears in each of the four outputs." >}}
| Output | Label | Anchor |
| --- | --- | --- |
| HTML | Visible | Stable |
| Print | Visible | Stable |
{{< /tbl >}}
Output
Label
Anchor
HTML
Visible
Stable
Print
Visible
Stable
Table 2-2How a numbered component appears in each of the four outputs.
eq renders its content with KaTeX during the build, so it works without
passthrough:
Written without parameters, {{< eq >}} is plain display math: it has no
number and no anchor, xref cannot point at it, and it is not listed among the
equations.
eg wraps any Markdown, usually one or more fences:
Source
{{< eg num="2-2" caption="Bringing up a new replica with pg_basebackup." >}}
```bash
pg_basebackup -h primary -U replicator -D /pg/data -Fp -Xs -P -R
```{{< /eg >}}
Example 2-2Bringing up a new replica with pg_basebackup.
In both forms, an ID must be unique within its page, and within one kind a
number maps to a single ID. A duplicate keeps the first registration and logs a
warning that gives the line of the first one.
No footnotes inside a shortcode body
Hugo renders each shortcode body as a separate document, but footnotes belong
to the page. A [^label] inside the body of tbl, eg, fig, card,
tab, field or include therefore either prints literally, when the
definition is on the page, or starts a second footnote list whose fn:N IDs
collide with the page’s own, when the definition is inside the body. The
build warns with the file, line and label.
Use the native form for a table or code block that needs footnotes. A table,
image or fence with {num=… caption=…} stays in the page document, so its
footnotes number and link normally, and the rendered figure is the same.
Footnote-like text in code, such as a [^0-9] character class, is not
affected.
Cross-references
On the same page an ordinary link works: Table 2-1 points at the
isolation-level table above. You type the label and number yourself, though,
and must find every such link when a number changes. xref builds the label,
number and link from the kind and number, and works across pages and
languages:
Source
See {{< xref fig="2-2" />}} and {{< xref eg="2-1" />}};
with an explicit anchor: {{< xref fig="2-1" anchor="book-release-note" />}}.
Give at most one kind key: fig, tbl, eq or eg. It supplies the localized label (Figure, Table, Equation, Example) and the default anchor <kind>-<num>.
anchor= replaces that anchor when the target declared its own #id.
page= points at another page, looked up in the current language, so the source never hard-codes a /zh/ prefix.
Without a kind, give both anchor= and the link text: {{< xref page="../ch01/install" anchor="sync-replication" >}}synchronous replication{{< /xref >}}.
A reference may come before its target, on the same page or in a later chapter.
In the whole-book print, an xref becomes a jump within the document, while a
plain Markdown link to another page still points at the website. Write any
reference that should also work in print as an xref.
Indexes: contents and lists of figures
Five shortcodes generate what a printed book carries up front: a table of
contents and lists of figures, tables, equations and examples. Each walks the
book tree, renders the pages below the current navigation root and collects
what they registered, so they usually sit on the book root (_index.md) or a
dedicated page:
content/handbook/_index.md
{{< book-toc depth=3 >}}
## List of figures {#lof}
{{< book-figures >}}
## List of tables {#lot}
{{< book-tables >}}
## List of equations {#loe}
{{< book-equations >}}
## List of examples {#lox}
{{< book-examples >}}
They appear here only as source, because on this page they would list the
entire Docs tree. OINK Hands-On shows them at work; its source
is
content/book/_index.md.
book-toc lists chapters at depth=1, adds nested sections at 2 (the default), and adds each page’s headings at 3. drafts=false leaves book_status: draft chapters out of this list without unpublishing them.
book-figures, book-tables, book-equations and book-examples take no parameters. Each entry reads like “Figure 2-1 — caption” and links to the target’s anchor.
In the whole-book print, every one of these links becomes a jump within the document.
Reading order
Readers move through a book with the pager at the end of each page. It follows
the sidebar tree in pre-order, a section’s index page first and then its
children by weight, and it is on for docs, book and blog by default.
Set params.ui.pager_types to change those types, or pager: false to remove
it from one page:
hugo.yml
params:ui:pager_types:[docs, book]
Entries hidden with toc_hide, link-only manual_link entries and
sidebar_divider rows are never pager destinations.
Printing the whole book
Once the root has the print output, /_print/handbook/ holds the whole book
as one HTML document: a cover, a table of contents, the root page’s body, and
every chapter in reading order. Pages with no_print: true, link-only entries,
divider rows and hidden placeholders are left out. Per-chapter print and the
print switches are covered in Print.
Numbered figures, tables, equations and examples keep their IDs exactly, so
xref links resolve inside the document. Heading and footnote IDs get a
prefix naming their source page, because several chapters may each have a
summary heading or a first footnote fn:1; the links the theme generates
are rewritten to match. A single page printed on its own keeps its ordinary
IDs.
For EPUB or PDF, also list BookManifest in the root’s outputs. The build
then writes book.json beside the root page, recording the reading order,
headings, numbered targets and references. Two scripts in the theme repository
turn the manifest and the print HTML into files: bin/book-epub.py needs
Pandoc 3 and a Pandoc metadata file with the book’s title and author, and
bin/book-pdf.py needs Chrome or Chromium and produces A4 pages. Run them after
the build; Hugo itself produces neither file. Here and below, /path/to/oink
is a checkout of the theme repository at the release your site pins:
Terminal
python3 /path/to/oink/bin/book-epub.py --manifest public/handbook/book.json \
--public public --metadata epub.yaml --output handbook.epub
python3 /path/to/oink/bin/book-pdf.py --manifest public/handbook/book.json \
--public public --output handbook.pdf
Migrating an existing manuscript
A manuscript written for another Hugo theme usually numbers figures with a
site-specific figure shortcode, bold pseudo-captions and bare links to
#fig_* anchors. bin/migrations/book_figures.py rewrites those forms into
fig, tbl and xref and keeps the anchors already published, so inbound
links keep working. Pin the site to the current OINK release first, then
migrate the content on a dedicated branch, starting with a dry run:
Each profile recognizes the conventions of one real manuscript, and only the
forms actually found in it. DDIA has one profile for each of its two editions:
tpme
A pseudo-h6 caption beside an image, a caption beside a table, and bare /en/...#fragment links
ddia-v2
The site’s own figure shortcode, classified by number into figure / table / code example
ddia-v1
A bare image with an adjacent bold numbered caption, with the ID derived from the image filename
pg-internal
A bold or italic “Figure N” caption in Chinese or English next to an image, and a numbered table caption next to a table
A manuscript whose conventions match none of them is rewritten by hand into
the native form.
--profile
Required; one of the four values above
--root
Required; the consuming repository’s root
--path
Restricts to a file or directory under --root; repeatable. The default scans the whole content tree
--write
Applies the rewrite. The default is a dry run that writes nothing
--no-diff
Suppresses the diff while keeping the summary and the report
--report
Writes the machine-readable JSON report
The diff goes to standard output and the summary to standard error. The report
carries files_scanned, files_changed, counts, skipped and idempotent.
The script rewrites only targets it can identify uniquely; where the number is
unclear, the caption is not unique or the marker form is unknown, it leaves the
text alone and records the item in skipped for you to handle. Bold text,
inline code and formulas inside a legacy caption become plain text, because a
Book caption is plain text.
After reviewing the diff, apply it, then run the script again to confirm there
is nothing left to change:
The second report should show files_changed: 0, empty counts and
idempotent: true, and the script exits with code 0.
Verify
Build with hugo --printPathWarnings and read every warning: a malformed number, a duplicate ID and an example without a caption each produce one.
On a page, check for localized labels such as “Figure 2-1” and for xref links that land on their targets.
Compare the chapter order in the sidebar, the pager, book-toc and the whole-book print.
Check the Markdown output with curl -s http://localhost:1313/handbook/ch02/index.md. A shortcode figure becomes **Figure 2-2.** caption followed by its body; a native figure keeps its source block and attribute line.
Run the theme’s anchor check against the build output. It confirms that every reference’s target exists, that kind and number agree, that IDs are unique within each page, and that numbered images have alternative text; it expects at least one numbered target and one xref.
Terminal
python3 /path/to/oink/bin/check-book.py --site-public public
Book shortcode parameters
num, string, default—
Required (except for the bare eq form). Matches [0-9A-Za-z.-]+ and must be quoted
Matches [A-Za-z][A-Za-z0-9_.:-]* and is preserved byte for byte
caption, plain text, defaultempty
Required for eg. Optional for fig, tbl, and eq. Not Markdown
class, class token, default—
Appended to the <figure>. Requires num
src, image path, default—
fig only. Mutually exclusive with inner content, and follows the shared image resolution order
linkaltwidthheight, —, default—
fig only. Width and height are positive integers
title, plain text, default—
fig only. A migration alias for caption, mutually exclusive with it
xref:
figtbleqeg, number string, default—
At most one. Supplies the localized label and derives the anchor
anchor, ID, defaultderived from kind and number
Required when no kind is given, together with inner link text
page, page reference, defaultcurrent page
Resolved through page lookup in the current language. A missing page warns and renders text without a link
book-toc:
depth, integer 1–3, default2
1 chapters / 2 with nested sections / 3 with the heading tree
drafts, boolean, defaulttrue
false filters draft chapters out of the generated list
book-figures, book-tables, book-equations and book-examples take no
parameters.
Limits
An attribute line must touch its block. A formatter such as Prettier that separates or moves it turns a numbered figure back into a plain image without any warning.
book_kind and book_part are accepted as metadata but change nothing on the page; only book_number and book_status have a visible effect.
The index shortcodes render every page below the root, which lengthens the build of a very large book. Whole-book print is opt-in for the same reason.
EPUB and PDF come from the two scripts, never from Hugo alone. Typeset pagination, font embedding and back-of-book index compilation are not provided.
Related
Organizing content — how the tree becomes the sidebar and the reading order
Images — captions, sizing, zoom and image processing
Tables — table attribute lines and full-width tables
Create an image album, add optional metadata, select a layout, and use the image viewer.
Expo turns folders of images into a collection readers browse rather than
read: albums grouped in the sidebar, a grid of the selected album’s images,
and a viewer for zooming and stepping through them. Use it when the images are
the content, such as a photo archive, a screenshot library or a set of posters
and diagrams. For a few images inside an article, the
Gallery component fits better. The
example albums show every control described here.
Create an album
An album is a folder holding an index.md that describes it and an images/
subfolder with the pictures. Filenames supply the default image titles, so an
album needs no file per image; you add metadata only where you want more.
---title:Field notesdescription:Plants and water from a field visit.weight:10---Photographs from the north trail.
Put the images in the album’s images/ folder.
A section page lists its child topics and albums, and the sidebar follows the
same tree; on narrow screens it opens as a navigation drawer. The album’s body
text is optional and appears above the images.
Expo does not paginate, so split a large collection into several albums. On a
section page, each album card uses the album’s first image in sort order as its
cover, and a topic without images of its own borrows the first one from its
albums. Covers fill a 4:3 frame, so they may be cropped.
Image metadata
To give an image a title, description, credit or fixed position, add a
resources entry to the album’s front matter. The src path is relative to
the album folder.
Album front matter
resources:- src:images/01-fern.jpgtitle:Fernparams:id:fernalt:A green fern frond seen from abovecaption:Branching leaves beside the north trail.byline:Alex Chenweight:10
Field
Use
title
Image title. If omitted, Expo derives a title from the filename
params.alt
Text that describes the image. If omitted or empty, it uses the title
params.caption
Plain-text description
params.byline
Plain-text credit
params.weight
Numeric image order. Lower values come first. The default is 0
params.id
Stable image ID within the album
params.original
Optional path to another image in the same album bundle
Images with equal weights keep the order of their resource names. Because the
default weight is 0, images without a weight come before any image with a
positive weight; to fix the complete order, weight every image.
An id gives the image a permanent link, here
/photos/nature/field-notes/#img-fern, which survives renaming the file as long
as the album URL stays the same. Without one, Expo derives the ID from a hash
of the filename, so renaming the file breaks links to the image. An ID starts
with an ASCII letter or digit, may continue with _ and -, and must be
unique within its album.
To link a larger original from a lighter preview, put the original in
originals/ and set params.original: originals/fern.jpg. Keep both at the
same aspect ratio, and keep originals/ outside the expo.images pattern, or
every original also appears in the album as an image of its own. Expo reads
only images in the album bundle; it never fetches remote files.
Defaults
Choose the site-wide layout and tile size in hugo.yml:
hugo.yml
params:ui:expo:images:images/*mode:wallsize:240
Key
Allowed value
Built-in default
images
A pattern for image resources in the album bundle
images/*
mode
wall, cards, or seamless
wall
size
An integer from 160 to 360, in CSS pixels
240
An album, or a section through cascade, can set its own top-level expo
block:
Album front matter
expo:images:images/*mode:cardssize:280
A page block replaces the site block as a whole: a field it omits takes the
built-in default, not the site’s value. size is the tile size the layout aims
for, not a fixed width and height for every image.
A reader’s own choice wins over both. The layout and size a reader picks are
saved in the browser for the whole site and persist through reloads, album
changes and appearance changes. When browser storage is unavailable, each page
starts from your defaults.
Layouts
Mode
Display
wall
Rows of image tiles with 6 CSS pixels between them
cards
Columns of cards with visible titles, descriptions, and credits
seamless
Rows of image tiles with no gaps between them
Readers switch layouts with the three icons in the album toolbar, which also
holds a play/pause button and an image-size slider. On devices with a mouse,
wall and seamless show captions on hover or keyboard focus. Album tiles
always show the whole image, so an image with extreme proportions leaves empty
space inside its tile.
GIFs play by default, and Pause switches them to still previews. When the
system asks for reduced motion, Expo starts with still previews and Play starts
them. The button is disabled in an album without GIFs. Images load as they
approach the visible area, but a large GIF still costs its full file size once
it loads.
The image viewer
Selecting an image opens the viewer. A small image starts at its original
size; a large one shrinks until it fits the image area in both directions.
Control
Action
Reset
Restore the initial size and center the image
Expand to fit
Enlarge or shrink the image until its limiting edge fits the image area
Zoom out / Zoom in
Divide or multiply the current scale by 1.25
Open original
Open the original image file in a new tab
Locate in album
Close the viewer and move to this image in the album
Previous / Next
Show the adjacent image in the same album
Close
Close the viewer and restore focus to an image link
Expand to fit keeps the whole image visible; it does not put the browser into
fullscreen. Zooming in can make the image larger than the viewing area: drag
it with the left mouse button, and it stops at the image’s edges. On a touch
screen, an enlarged image scrolls natively, a fitted image changes with a
one-finger horizontal swipe, and pinching keeps the browser’s own behavior.
Double-click alternates between the initial fit and a closer view: a reduced
image opens at 100% under the pointer, and an image already at its original
size expands to fit.
Changing images resets the scale and position, and Previous and Next stop at
the ends of the album. Percentages are in CSS pixels: at 100%, one source pixel
occupies one CSS pixel.
Keyboard shortcuts
On an album page (not a section page listing albums), with keyboard_nav
enabled, ; cycles through wall, cards and seamless,
, / < shrinks the tiles by one step (−20 px), and
. / > enlarges them by one step (+20 px).
The viewer has its own keys. They work whenever the viewer is open, whatever
keyboard_nav says, and take precedence over the page’s single-key
navigation. They stay out of the way of text input, input-method composition
and any Ctrl, Command or Alt combination.
Key
Action
W / A / S / D
Move the enlarged image up / left / down / right
Q or H
Previous image
E or L
Next image
J or −
Zoom out
K, + or =
Zoom in
R or 0
Reset the size and position
F
Expand to fit
Escape
Close the viewer
W, A, S and D move the image 80 CSS pixels per press, and only along an axis
where it overflows. The Left and Right arrow keys change images while the image
fits horizontally; once it is wider than the viewing area, they scroll it
instead. In right-to-left languages the arrows follow the reading direction.
Appearance and page width
Expo has no appearance settings of its own. Albums use the site’s visual
preset (Paper, Slate, GitHub, Ink, News or Terminal) and its light or
dark mode, readers switch them from the shared navigation as on any other
page, and the grid re-lays itself out after a preset change. To offer every
preset, set
params.ui.preset_menu: [paper, slate, github, ink, news, terminal]; see
Visual presets. The top navbar follows
the site’s navbar settings, and the album page shows its image toolbar instead
of the article action menu.
An album uses the full available page width and has no outline on the right.
Set page_width in its front matter for a narrower body. If your site sets
params.ui.shell_types, keep expo in the list, or albums lose their sidebar.
Translations and other outputs
For a Chinese album, add index.zh.md beside index.md, and _index.zh.md to
each translated section. Both languages share the image files; translate the
title, description and resource metadata in each page, and keep the same image
id for the same image so links match across languages.
Albums work without JavaScript: image links open the original files and
captions stay visible. Where you enable them, Print shows still previews,
Markdown and LLMSFULL list image links with their metadata, and RSS carries
static image descriptions. See Print and
Agent outputs to turn those outputs on.
Check an album
Run hugo --printPathWarnings and read the warnings.
Open each album and confirm the image order, titles and descriptions.
Open a small image, a wide image, a tall image and, if the album has one, a GIF.
Try Reset, Expand to fit, zoom, dragging, the keyboard shortcuts and Locate in album.
Check both languages, a narrow screen, each preset you offer, and light and dark mode.
An empty album usually means a wrong type, a folder that is not a page bundle
(no index.md), or an expo.images pattern that matches nothing. A default
that seems to have no effect is usually overridden by a choice saved in your
browser, or by a page expo block that replaced the whole site block.
3.7 - Releases and downloads
Publish a release page with a GitHub release card, a checksummed asset table and install instructions, all built from facts kept in your repository.
A release page tells readers what shipped and lets them download it safely: a
card linking the GitHub release and its source archives, a table of files with
their checksums, and install instructions for each way of getting the
software. OINK builds all of it from facts kept in your repository (one
release_url in the page’s front matter, the sha256sum output you paste
into the body, and a data/download/<key>.yaml record), so the build never
contacts GitHub.
The examples on this page are rendered for real
This page’s own front matter sets release_url to OINK v0.4.0, so the card,
asset tables and download block below are live output. The checksums and
asset filenames are made up, and the download links they produce point at
files that do not exist. Do not verify anything against these hashes.
What a release page is made of
What you want
What renders it
Where the facts come from
A summary card with tag, date, source archives and repository
release-card
The page’s release_url
A table of assets with checksums
The checksums fence, or release-assets
sha*sum lines in the page body
Install instructions for several channels
download
data/download/<key>.yaml
A chronological index of releases
layout: releases
Each page’s release_url, or its title
Link the release
A release page names its GitHub release with one front matter key, the release
URL for an exact tag:
The owner, project and tag come from the URL, and the date from the page’s own
date. A value that is not an exact-tag GitHub release URL warns and the
release block is skipped. Pages written for OINK 0.5 (the release map,
release_products, release_group_by_product) get a warning naming the
replacement; see the 0.6.0 release notes.
Put the card where you want the summary. The shortcode takes no parameters,
because every fact comes from the front matter:
The card carries four links derived from the URL: the release itself, the
.tar.gz and .zip source archives, and the repository. It does not list
checksum files, which belong in the asset table below, or compare the release
with the previous one, which GitHub already does on the release page.
Checksums and assets
Paste the output of sha256sum (or any sha*sum command) into a checksums
fence, and the page gets a download table with each file linked and its hash
ready to copy:
Each line must be either <hex><two spaces><filename> or
<hex><space>*<filename>, exactly as the tools print it; blank lines and lines
starting with # are ignored. The hash length identifies the algorithm (MD5,
SHA-1, SHA-256 or SHA-512), and one block holds one algorithm. A filename must
be a single path segment, and package type, operating system and architecture
badges are added when the filename makes them recognizable. A malformed line, or
one whose algorithm differs from the rest of the block, warns with its line
number and is skipped, so a single typo costs one row rather than the table.
On a page with release_url, asset links point at
https://github.com/<owner>/<repo>/releases/download/<tag>/. On a page without
one, set base= to wherever the files are hosted. Setting both, or neither,
warns and skips the block, because a guessed base would publish links to the
wrong files:
algo= pins the algorithm instead of inferring it, and group="auto" groups
rows by platform and architecture.
release-assets is the shortcode form of the same table. It adds one
parameter the fence lacks, src=, which reads the checksum file itself from a
page resource or global asset instead of inline lines; use either src or
inline lines, not both.
The HTML table shortens each hash for display, while screen readers and the
copy button get the full value; the copy button’s script loads only on pages
that have a table. Without JavaScript the table is still complete and linked.
Print and RSS show the full hashes without controls, and the page’s Markdown
output is a pipe table of full hashes.
Download block
Install instructions belong to the product rather than to one release: the
install script, the source archive and the package repository stay the same
from version to version. Keep them in one data record and render it with
download, whose only parameter is the record’s key, the file name under
data/download/ without .yaml:
Source
{{< download "prd5" >}}
Install script
The rolling channel deliberately contains no version interpolation.
The block opens with a row of links to each channel, followed by one section
per channel. Code steps use the enhanced code block and its copy button, and a
channel with checksums renders the same asset table as above. Print shows the
same content expanded, the Markdown output keeps the titles, code fences and
full hashes, and RSS leaves the block out. A landing page’s download section
reads the same record, so the home page and the docs never disagree about the
current version; see Home and landing pages.
Release workflow
A release note and the download data do different jobs. The release note,
written as a blog post, tells readers what
changed, how to upgrade and what breaks; it carries release_url and can open
with a release-card. The download data tells them which channel to use,
which command to run and which hash to check, and it changes in one place when
the version does.
Publish a new version in this order, so that no page ever links to a file that
is not there yet:
In data/download/<key>.yaml, set version to the new version and
published: false. Rolling channels keep working, while pinned channels
show a “pending release” state with their commands omitted and their asset
links and copy buttons disabled.
Write the release note, for example content/blog/release/0.4.0.md, with
its release_url.
Create the tag and upload the assets, then set published: true. Do not
write a guessed download link into the prose in the meantime.
The release index page
A section of release notes can list them as a strict chronology instead of a
blog index:
content/blog/release/_index.md
---title:Releaseslayout:releases---
Every regular page in the section is listed newest first by date; when two
pages share a date, the version in their tags breaks the tie, by SemVer
precedence with a deterministic fallback for tags that are not SemVer. An entry
whose release_url parses reads project tag, such as oink v0.4.0, above
the page description. A page without one keeps its own title, so an ordinary
note between releases is a normal entry rather than an error.
When you would rather keep the blog shell, blog_index: table gives a compact
date-ordered archive instead; this site’s release notes use it.
Download data format
This site’s real record is data/download/prd5.yaml, the one rendered above:
data/download/prd5.yaml
version:0.4.0repo:pgsty/oinkpublished:truechannels:- id:scriptkind:rollingtitle:Install scripttitle_zh:安装脚本icon:fa-solid fa-boltnote:The rolling channel deliberately contains no version interpolation.note_zh:滚动渠道刻意不插入版本号。steps:- title:Installtitle_zh:安装code:curl -fsSL https://repo.example.org/oink/install | bashlang:bash- id:sourcekind:pinnedtitle:Source archivetitle_zh:源码归档icon:fa-solid fa-code-branchurl:https://github.com/pgsty/oink/archive/refs/tags/${tag}.tar.gzsteps:- title:Clone the tagtitle_zh:克隆标签code:git clone --branch ${tag} https://github.com/pgsty/oink.gitlang:bash- id:assetskind:pinnedtitle:Release assetstitle_zh:发布资产icon:fa-solid fa-box-openchecksums:| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa oink-0.4.0.tar.gz
A record takes the five top-level fields below; any other key warns and the
whole block is skipped.
version, string, defaultsite params.version
The current version. Missing from both the record and the site, it warns and the block is skipped
repo, owner/name, default—
GitHub repository; required once a pinned channel has a link or assets
tag, string, defaultv{version}
Release tag. URL-safe characters only
published, boolean, defaulttrue
false while the tagged release and its assets do not exist yet
channels, array, default—
The channels, in display order. Must not be empty
Each channel:
id, ^[a-z][a-z0-9-]*$, default—
Unique within the record; also the channel’s anchor
kind, rolling | pinned, default—
Whether the channel follows the latest release or one exact version, which decides whether version facts may be interpolated
title, localized string, default—
Channel name. Must resolve to a non-empty value
note, localized string, default—
One line of explanation under the channel name
icon, Font Awesome class pair, default—
For example fa-solid fa-bolt
url, http(s) URL or site path, default—
Download link. Interpolated on pinned channels only
steps[], title / code / lang, defaultlang: text
Code steps, rendered by OINK’s enhanced code block
checksums, sha*sum text, default—
Assets for this channel. pinned only; use this or checksums_src, not both
checksums_src, asset path, default—
Reads the checksum file as a Hugo asset
Two rules govern the text fields:
Localized fields resolve by suffix, from <field>_<exact language> to
<field>_<base language> to <field>. A zh-cn page tries title_zh_cn,
then title_zh, then title. camelCase variants are not accepted.
Only a pinned channel’s url and steps[].code interpolate ${version} and
${tag}. A rolling channel refuses interpolation, so a command meant to
install the latest release is never silently tied to one version. Titles and
notes never interpolate.
Verify
Build with diagnostics visible: hugo --printPathWarnings. A malformed hash
line, mixed algorithms, a missing base and a misspelled channel field each
produce a warning; read them, because each one means a row, a table or a
channel is missing from the page.
On the page, check that the card’s tag and date match the repository and
that every asset row opens a real download.
Check each hash against the real artifact yourself. The table only displays
the hashes you paste; it verifies nothing.
Confirm the Markdown output carries the full hashes:
Try the page with published: false first, and switch to true only once
the tag and assets exist. Check every language, and a subpath deployment if
you use one.
Related
Blog posts — where release notes live and how they are ordered
Code Blocks — code rendering and copying inside download steps
Configuration — params.version and the related site parameters
Upgrade — how a site keeps up with new OINK versions
3.8 - API reference pages
Render an OpenAPI specification as a browsable API reference with the bundled Swagger UI or Redoc, without a CDN.
Publish an API reference straight from the OpenAPI file your service already
has: save the file under static/ and add one shortcode to a page. Choose
Swagger UI when readers should try requests from the page, or Redoc when they
mainly read endpoint descriptions and schemas. Both runtimes ship with the
theme and load only on pages that use them, so the site needs no CDN, and
Swagger UI’s online validator is turned off. Remote specifications, and the
requests readers send to your API, still reach their own hosts.
Where the specification file goes
Put the specification under static/. Hugo publishes that folder unchanged at
the site root, so both shortcodes get a URL the browser can fetch:
where the specification lives
static/
openapi/
docs-demo.yaml#published as /openapi/docs-demo.yaml
content/
docs/
write/
openapi.md#this page
Do not keep the file beside the page. Neither shortcode resolves page
resources: a .yaml file in a page bundle is published only when a template
asks for it, and naming it in a shortcode does not, so the browser gets a 404.
Both shortcodes also accept a remote https://… specification. Every page
view then depends on that host and reveals the reader’s address and browser
details to it, so intranet sites and sites with a Content Security Policy
should serve a same-origin copy. Only http and https are accepted: any
other scheme, a protocol-relative //host or an empty value warns, and the
shortcode renders nothing.
To try the examples on your own site, save
docs-demo.yaml as static/openapi/docs-demo.yaml.
It describes a demonstration cluster-management API with no server behind it.
Swagger UI
swagger takes one named parameter, src: the specification’s URL from the
site root. The theme resolves it like any other site URL, so it stays correct
when the site is deployed under a subpath:
Source
{{< swagger src="/openapi/docs-demo.yaml" >}}
The page lists every operation as an expandable row with its request
parameters and response schemas. “Try it out” sends a real request to the
address in the specification’s servers list; the demonstration file’s
address does not answer.
Redoc
redoc takes exactly one positional parameter, the specification path. A
second parameter warns, and the shortcode renders nothing.
A path is relative to static/, with or without a leading slash, and the
shortcode turns it into an absolute URL based on baseURL: with
baseURL: https://example.com/preview/, both openapi/docs-demo.yaml and
/openapi/docs-demo.yaml become
https://example.com/preview/openapi/docs-demo.yaml. An http or https URL
is used as given.
Each redoc shortcode runs ReDoc 3.2.0 from the theme’s local files in a frame
of its own. The frame keeps its navigation in its own URL fragment, so it never
disturbs the article’s anchors or another reader on the same page. It uses
ReDoc’s light palette, scrolls independently, and has a plain link to the
specification below it. Telemetry is off and ReDoc’s two brand images are
inlined, so the reader requests nothing from a CDN; a remote specification,
and images the specification itself references, are still fetched from their
hosts. Opened directly, the frame accepts only same-origin specifications. If
your Content Security Policy restricts frames, allow
the reader with frame-src 'self'.
ReDoc reads OpenAPI, AsyncAPI and GraphQL descriptions. Put code samples in
the x-codeSamples extension; rename any x-code-samples left in an older
specification. A site that customized the Redoc shortcode or its styles before
OINK 1.6.0 should read Upgrade to 1.6.0.
The dedicated page shell
API references tend to be wide and long, so give them the swagger page type
and a wide page:
The swagger shell is the docs shell with one addition, a td-swagger class
on <body> that lets site CSS target API pages. The sidebar, table of
contents, breadcrumbs, pager and page end all behave as usual. swagger is in
the default params.ui.shell_types; keep it there if your site overrides the
list. Shells and page width are covered in
Layouts and page types.
Output
Only the HTML page loads the interactive widgets. Print, Markdown and RSS
replace each shortcode with a plain link to the specification; in Markdown it
reads [OpenAPI specification](/openapi/example.yaml), not an endpoint list.
A printed page or an agent reading the Markdown therefore sees no endpoints.
If those readers need the important ones, describe them in prose on the same
page, because text outside the shortcode appears in every output.
Limits
Both widgets have upstream accessibility limitations: Swagger UI renders unnamed server controls and scrollable regions without keyboard access, and Redoc’s operation descriptions fall below AA contrast ratios. If your site must meet strict accessibility requirements, document the key endpoints in Markdown prose as well.
Swagger UI and Redoc can share a page, but the page gets long and loads both runtimes. Choose one for a production site.
Several shortcodes on one page never collide: each container ID derives from the page address and the shortcode’s position.
There is no mock server. “Try it out” sends a real request to the address in servers.
Verify
Build with hugo --printPathWarnings and read the warnings.
Confirm the specification was published: ls public/openapi/docs-demo.yaml, or open http://localhost:1313/openapi/docs-demo.yaml.
Expand a few endpoints on the page and check that their schemas appear and that the browser console shows no 404 or cross-origin error.
Cut the machine off from the outside network while keeping the local preview server reachable, then reload. With local runtimes and a same-origin specification, the reference still appears.
AI-agent support — why a component that is interactive only in HTML needs prose beside it
Code Blocks — the lighter alternative of request / response examples instead of a whole UI
4 - Components
Pick the component that fits what you are writing and look up its shortest syntax, its form and whether it loads a script.
Components are what a documentation page needs beyond paragraphs: a warning
the reader must not skip, install commands for three platforms, a diagram, a
chart, a terminal recording. Most of them are ordinary Markdown with one
attribute line, so the source still reads cleanly on GitHub, and the theme
turns it into the richer version when Hugo builds the site. Pick one from the
table below; each component’s page opens with the shortest source and its
result, then the variations, then every parameter.
Component presentation shows the most common
ones side by side in each visual preset.
Cheatsheet
Form says how you write it: native is Markdown syntax plus an attribute
line, fence is a code fence with a language tag, shortcode is
{{</* … */>}}. Runtime says whether the reader’s browser downloads a script
for it: none, per page (only on pages that use it), or site switch
(off until you enable it in hugo.yml, then per page).
Changelog entries that stay headings in the table of contents
## v1.7 {.update date="2026-11-28"}
native
none
A few entries in the Runtime column depend on what is on the page:
A code block loads code-block.js only when some block on the page has a
copy or fold control. A file tree loads filetree.js only when it has a
comment column, which the reader can resize by dragging.
Images and galleries share one zoom dialog. It needs
params.ui.image_zoom: true and at least one image on the page that can be
zoomed.
Math loads the KaTeX stylesheet and fonts but no script, because the
formulas are already HTML and MathML when the page is built.
Draw.io loads only on pages with PNG or SVG images, and it downloads each
distinct image once to look for an editable copy.
Video and audio share media.js, loaded on any page with a local audio or
video player (the theme’s control row, with native controls left only
without JavaScript, and one audible player at a time) or a card whose
platform is in params.video_embeds. A map loads Leaflet only when params.map is
enabled (enable: true with valid tiles and attribution); otherwise it
stays a list of places.
No component loads a script in print, Markdown or RSS output. Each component
page says what those outputs contain when it differs from what you would
expect.
Two forms
Prefer the native form: a blockquote, list, table, image or fence, followed
by a {…} attribute line. It stays readable on GitHub and in any Markdown
editor, and the page’s Markdown output keeps your source instead of rendered
HTML.
Shortcodes cover what Markdown cannot express, such as tabs that hold prose,
parameter lists whose descriptions contain code blocks, cards with icons and
badges, and terminal recordings. They follow the same rules everywhere:
Write every shortcode as {{</* name */>}}. Only {{%/* steps */%}} uses
%, because its body is page-level Markdown with headings.
Child shortcodes (tab, card, field) work only inside their parent.
Parameters such as titles, labels and captions are plain text, not
Markdown. Only bodies are Markdown: the bodies of tab, card and field,
files pulled in by include, and the Book fig, tbl and eg bodies.
A wrong parameter never stops the build. Hugo prints a warning with the
file and line, and the component falls back to the behavior its page
documents or leaves the unsafe part out, so read the warnings before you
publish. See
When a value is wrong.
Site prerequisites
Components rely on three Goldmark settings. Hugo does not take markup
settings from a theme, so they must be in your site’s own configuration. OINK
Starter already has them; on a site you set up yourself, add:
hugo.yml
markup:goldmark:renderer:unsafe:true# keep HTML that content emitsparser:attribute:block:true# enable {…} attribute lineswrapStandAloneImageWithinParagraph:false# standalone images are not wrapped in <p>
renderer.unsafe: true keeps raw HTML in the rendered content. Without it,
Goldmark drops that HTML and markup inside component bodies disappears.
parser.attribute.block: true turns on attribute lines. Without it,
{.steps} and {caption="…"} show up as literal text.
parser.wrapStandAloneImageWithinParagraph: false stops Goldmark from
wrapping an image that stands alone in a <p>, which is what lets it become
a captioned figure with an attribute line.
A few components need more. Math written with $$, \[…\] or \(…\) needs
Goldmark’s passthrough extension. PlantUML, Markmap, Draw.io, the image zoom dialog,
in-page video players and maps each have a site switch, and Draw.io also needs
an editor address. Each component page shows its setting, and
Configuration has the complete markup
block.
4.1 - Callouts
Write notes, warnings, and collapsible asides with colors, icons, and titles. Use > [!NOTE] blockquotes without shortcodes.
A callout lifts out the one thing a reader must not miss: a prerequisite, a
destructive command, a version limit. It is an ordinary blockquote whose first
line is a [!TYPE] marker, the syntax GitHub and Obsidian use, so the same
source renders as an alert on GitHub and as a plain quote in any other Markdown
reader.
Use them sparingly. When every other paragraph sits in a box, readers stop
seeing the boxes, so if a sentence of prose does the job, write the sentence.
Shortest form
Source
> [!NOTE]
> Hugo Modules need Go on the machine; an offline archive does not.
Note
Hugo Modules need Go on the machine; an offline archive does not.
Without a title, the callout shows its type name in the page’s language:
“Note” in English, 「说明」 in Chinese.
Ten types
GitHub defines the first five types and OINK adds five more; each has its own
icon and color, and type names are case-insensitive. Choose the type by what
happens when the reader skips the box: NOTE and TIP are safe to skip,
IMPORTANT means the task fails without it, WARNING and CAUTION mean
something breaks or slows down, and DANGER marks what cannot be undone.
Source
> [!TIP]
> `hugo server -D` previews drafts.
> [!IMPORTANT]
> Enable Goldmark block attributes in `hugo.yml`, or component attribute lines render as plain text.
> [!WARNING]
> `hugo --cleanDestinationDir` empties `public/`.
> [!CAUTION]
> The first build after deleting `resources/_gen` is much slower.
> [!SUCCESS]
> All 312 pages built; the site is ready to deploy.
> [!DANGER]
> `rm -rf public/` before a deploy also deletes files you placed there by hand.
> [!QUESTION]
> Should the site have comments? See [enabling comments](/docs/admin/comments/).
> [!EXAMPLE]
> `pgsty.com` is a documentation site built from callouts and tables alone.
> [!QUOTE]
> Documentation is a love letter that you write to your future self.
Tip
hugo server -D previews drafts.
Important
Enable Goldmark block attributes in hugo.yml, or component attribute lines render as plain text.
Warning
hugo --cleanDestinationDir empties public/.
Caution
The first build after deleting resources/_gen is much slower.
Success
All 312 pages built; the site is ready to deploy.
Danger
rm -rf public/ before a deploy also deletes files you placed there by hand.
pgsty.com is a documentation site built from callouts and tables alone.
Quote
Documentation is a love letter that you write to your future self.
Custom title
Text after the marker on the same line becomes the title, and it may contain
inline code, bold text and links.
Source
> [!WARNING] Rewrites `public/`
> Check that `baseURL` points at the production domain before a production
> build, or every absolute link will be wrong.
Rewrites public/
Check that baseURL points at the production domain before a production
build, or every absolute link will be wrong.
Body content
The body is ordinary Markdown: lists, fenced code, tables, images, even
another callout. Every line starts with >, fence lines included.
Source
> [!TIP] Three commands to a live preview
>
> 1. Clone: `git clone https://github.com/pgsty/oink-starter my-docs`
> 2. Enter the directory and preview:
> ```bash
> cd my-docs && hugo server
> ```
> 3. Open <http://localhost:1313/>
>
> | Port | Purpose |
> | --- | --- |
> | 1313 | Hugo development server |
Put - after the type to render the callout closed, or + to render it open
with a toggle. Either way it is a native <details> element that works
without JavaScript. Fold what most readers can skip: full command output, an
alternative procedure, background reading.
Source
> [!NOTE]- Why is Go needed?
> Hugo downloads themes through Go's module system (`hugo mod get`). A submodule
> or an offline archive works without Go installed.
> [!TIP]+ Open by default, but the reader can close it
> The closed state is not remembered; a reload returns to the default.
Why is Go needed?
Hugo downloads themes through Go’s module system (hugo mod get). A submodule
or an offline archive works without Go installed.
Open by default, but the reader can close it
The closed state is not remembered; a reload returns to the default.
The neutral disclosure, DETAILS
[!DETAILS] is a disclosure with no color and no icon, closed unless you
write [!DETAILS]+. Use it when the content is neither a note nor a warning,
just long: a complete configuration file, a full log, or an
audio transcript placed right after a
player.
Source
> [!DETAILS] Full `hugo version` output
> ```text
> hugo v0.170.1+withdeploy darwin/arm64
> ```
Full hugo version output
hugo v0.170.1+withdeploy darwin/arm64
Custom icon
To replace the type’s icon, put {icon="fa-solid fa-…"} (one Font Awesome
class pair) on the line right after the blockquote, with no blank line between
them.
Source
> [!TIP] PostgreSQL 18 is supported
> Pigsty v4 installs PostgreSQL 18 by default.
{icon="fa-solid fa-database"}
PostgreSQL 18 is supported
Pigsty v4 installs PostgreSQL 18 by default.
Nesting
Add one > per level. One level is usually enough; deeper nesting is hard to
read.
Source
> [!WARNING] Back up before upgrading
> A theme version bump can change how a page renders.
>
> > [!TIP]- How to back up
> > `git tag pre-upgrade` is enough — rolling back is `git checkout pre-upgrade`.
Back up before upgrading
A theme version bump can change how a page renders.
How to back up
git tag pre-upgrade is enough — rolling back is git checkout pre-upgrade.
Unknown types and common slips
A misspelled type does not break the build or lose content. The block renders
as a plain blockquote with the marker still visible, so the typo is easy to
spot.
Source
> [!NOTICE] Not a valid type
> The marker stays on the page to tell you so.
[!NOTICE] Not a valid type
The marker stays on the page to tell you so.
Formatters such as Prettier cause the other two common slips:
They join the title line and the body. Keep an empty > line under the
title.
They move attribute lines such as {icon=…}. Wrap the callout in
<!-- prettier-ignore-start --> and <!-- prettier-ignore-end -->.
Output
Callouts load no script. Print and RSS show every callout expanded, and the
page’s Markdown output keeps the original blockquote, marker and title
included.
Parameter reference
The marker line > [!TYPE]± Title:
TYPE, enum, default—
NOTETIPIMPORTANTWARNINGCAUTIONSUCCESSDANGERQUESTIONEXAMPLEQUOTEDETAILS; case-insensitive; an unknown value renders as a plain blockquote
±, - / + / none, defaultnone
- collapses closed, + collapses open; bare DETAILS is closed
Title, inline Markdown, defaultthe localized type name
On the same line as the marker
The attribute line {…}, immediately after the blockquote:
icon, Font Awesome class pair, defaultthe type’s icon
For example fa-solid fa-database; DETAILS has no default icon
class, space-separated classes, default—
Validated class tokens for site CSS; data-* and aria-* pass through
Any other key, style included, is dropped with a build warning. Hugo strips
on* handlers before the theme sees them, so they are dropped silently.
Limits
The type sets the color; there is no color parameter. When no type fits,
take the closest one and let the title carry the meaning.
A reader’s open or closed choice is not remembered after a reload.
Inside a {.steps} item, indent every > line to the item’s text; inside a
{{%/* steps */%}} step, write it unindented. See
Steps.
Related
Social — > [!SOCIAL] callouts for offline quoted social posts
Writing pages — when to use a callout and when to use prose
4.2 - Code Blocks
Show commands, configuration and source code in a Markdown fence with a filename, exact copying, line numbers, highlighting, wrapping, folding and linkable lines.
Commands, configuration files and source code go in an ordinary Markdown
fence. Hugo’s built-in Chroma highlighter colors it while the site builds, so
the page ships highlighted HTML and the browser runs no highlighter. Attributes
on the fence’s opening line add what readers of technical docs rely on: a
filename above the code, a copy button that copies exactly the right text, line
numbers, folding for long files, and links to individual lines. Fences for
diagrams and data, such as mermaid, echarts and filetree, are separate
components with their own pages.
Every fence gets the full frame and a copy button, even without attributes; a
block without a title simply has no title bar. The copy button sits at the top
right and appears when the pointer is over the block or focus is inside it, and
on touch screens it is always visible. The language is not displayed, but site
CSS can read it from the block’s data-td-language attribute.
The language tag is a Chroma lexer name, and Chroma has a lexer for most
languages and file formats. A diff fence, for example, shows added and
removed lines in their own colors, with no extra component:
title adds a title bar above the code, usually the file’s name or path, so
readers know where the snippet belongs. It also becomes the block’s accessible
name.
filename is an alias for title. If a fence has both, the build warns and
uses filename.
Line numbers, start line and highlighting
lineNos="inline" puts line numbers in the code column, and lineNoStart
sets the first number, which helps when the snippet is an excerpt of a longer
file. hl_lines highlights the lines you want the reader to look at. It counts
the lines inside the fence from 1, whatever lineNoStart says.
lineNos="table" puts the numbers in a column of their own, so a reader who
selects the code by hand does not pick up the numbers. The copy button leaves
them out in both modes.
Source
```bash {title="deployment in three commands" lineNos="table"}
./configure -c rich
./install.yml
pig ext install pg_duckdb
```
Hugo’s other highlighting options, such as tabWidth for the number of
spaces a tab expands to, pass straight through to Chroma. style has no
effect by default: OINK highlights with CSS classes so that code colors follow
light and dark mode, and a Chroma style applies only after you switch to
inline styles with params.highlight_classes: false.
Wrapping long lines
Long lines scroll sideways by default. wrap=true wraps them on screen
instead, which suits long URLs and checksums; the source and the copied text
keep their original lines.
Wrapping does not combine with lineNos="table", because a wrapped line would
no longer line up with its number in the separate column. With both, the build
warns and turns wrapping off; use lineNos="inline" if you need both.
Folding long code
collapse=N shows the first N lines with a “Show all M lines” button under
them, where M is the block’s total line count, so a complete configuration file does not push the explanation off the
screen.
Folding only hides lines on screen. The page contains the whole file, so it
is complete without JavaScript, for screen readers and on paper. A block no
longer than N lines gets no button. Folding works together with wrapping and
never cuts a wrapped line in half.
What gets copied
The copy button copies the whole block, except for terminal sessions. In a
console or shell-session fence it copies only the commands: it keeps the
lines that start with a prompt, strips the prompt, and drops the output. The
block below copies two commands, without $ and without the output lines:
Source
```console
$ pig ext list duckdb
name version category
pg_duckdb 1.0.0 OLAP
$ pig ext install pg_duckdb
INFO installing pg_duckdb
```
$ pig ext list duckdb
name version category
pg_duckdb 1.0.0 OLAP
$ pig ext install pg_duckdb
INFO installing pg_duckdb
Write copy="all" to copy prompts and output as well. Other lexers such as
bash or sh cannot tell a prompt from a command or its output, so on them
copy="command" warns and copies everything. When a command continues over
several lines, start each continuation line with its prompt, usually >;
otherwise it counts as output and is left out.
A session block with no prompt at all cannot be copied: the button shows an
error icon and logs an error to the browser console, and the clipboard keeps
its previous content rather than receiving the whole block.
copy=false removes the button, for a counter-example that nobody should
paste:
Source
```yaml {title="counter-example: an invalid boolean" copy=false}
params:
ui:
image_zoom: sometimes # wrong: use true or false
```
counter-example: an invalid boolean
params:ui:image_zoom:sometimes # wrong: use true or false
params.ui.code_copy: false removes the button from every block that does
not set copy itself (see Configuration). The
button is an icon only; it changes icon and announces a localized status on
success or failure. Copied text keeps indentation, blank lines and Unicode,
leaves out line numbers, and ends with exactly one newline.
One-line commands
A single command the reader is meant to paste can be a compact command strip
with its copy button in a column of its own: add {class="td-code-command"}
to a one-line fence. A block with more than one line, line numbers or
collapse warns and keeps the regular frame. See
Component presentation for examples.
Line links and stable IDs
To link to “line 4” from your text, give the fence an id and set
anchorLineNos=true. Each line number then becomes a link to #<id>-<line>:
Source
```sql {id="ex-explain" title="explain.sql" lineNos="table" anchorLineNos=true}
EXPLAIN (ANALYZE, BUFFERS)
SELECT relname, n_live_tup
FROM pg_stat_user_tables
WHERE n_live_tup > 1000
ORDER BY n_live_tup DESC;
```
Jump to [line 4](#ex-explain-4).
Write the id yourself whenever you plan to share a link. Without one, the
theme generates an ID that is unique on the page but depends on the fence’s
position, so adding a fence above it changes the ID and breaks old links. An
id must not contain spaces or control characters, and must not repeat
another ID on the page. An empty or invalid id warns and is replaced by a
generated one; a duplicate id warns but is not renamed.
Numbered examples
In a book or a long manual, num and caption turn a fence into a numbered
example that xref can refer to and that appears in
the book’s list of examples. You write the number yourself; the theme never
counts. The anchor defaults to eg-<num>.
Source
```sql {num="4-1" caption="Bloat ratio per table" #eg-bloat}
SELECT schemaname, relname, n_dead_tup, n_live_tup
FROM pg_stat_user_tables
WHERE n_dead_tup > n_live_tup * 0.2;
```
See {{< xref eg="4-1" anchor="eg-bloat" >}}.
num and caption go together: a caption without a number, or a number
without a caption, warns and is dropped. A numbered example cannot also be a
tab, so num with tab warns and ignores tab. Numbering for figures, tables
and equations is covered in Publishing books.
A set of fences as tabs
Consecutive fences that each have a tab attribute become one tab set, which
suits the same command for different package managers. A group on the first
fence lets readers share a link to a tab, keeps groups with the same name in
sync, and remembers the reader’s choice.
Source
```bash {tab="Homebrew" group="oink-install" value="brew"}
brew install hugo
```
```bash {tab="APT" value="apt"}
sudo apt install hugo
```
Homebrew
brew install hugo
APT
sudo apt install hugo
Tabs has the group syntax, URL hashes,
synchronization and tabs that hold prose.
Common errors
A shortcode inside a fence still runs. A fence does not stop Hugo from
parsing shortcodes, so writing {{< tabs >}} in a code block executes
it. To show a shortcode as text, put a comment marker inside each delimiter:
{{</* tabs */>}}, or
{{%/* steps */%}} for the percent
form. Every shortcode shown on this page is written that way.
Fences inside fences need a longer outer fence: four backticks outside,
three inside, as in every “Source” block on this page. Add another backtick
when the inner block contains fences of its own.
Attributes go on the opening line, after the language. Tables and
images take their attribute line below the block, fences do not; a {…}
line under a fence shows up as text.
Fences in list items must be indented to the item’s text (three spaces
after 1.), or the fence ends the list.
Output
The copy and fold buttons appear only once the page script is running, and a
page with no copy or fold control does not load that script at all. Print
shows every block in full, without buttons and with its title bar, and long
blocks may break across pages. The page’s Markdown output keeps each fence as
written, attributes included.
Parameter reference
OINK’s attributes, inside the {…} after the language on the opening line:
title, non-empty string, defaultnone
The visible title bar (usually a filename) and the accessible name
filename, non-empty string, defaultnone
Alias of title; both together warn and use filename
copy, allcommandtruefalse, defaultcommand for session lexers, all otherwise
true is all; command is allowed only on console/shell-session
wrap, boolean, defaultfalse
Visual wrapping, source unchanged; mutually exclusive with table line numbers
collapse, positive integer, defaultnone
Lines shown initially; ignored when the block is shorter
label, non-empty string, defaultderived from the title
Accessible name, not displayed; mutually exclusive with aria-label
id, non-empty token, defaultgenerated
Stable block ID and line-anchor prefix; no whitespace
On the first fence of a set; enables hash / sync / persistence; requires tab
value, ^[a-z0-9][a-z0-9_-]*$, defaultnone
Required on every block of a grouped set; ungrouped it only names the panel; requires tab
num, [0-9A-Za-z.-]+, defaultnone
Numbered example (Book eg); must appear with caption
caption, plain text, defaultnone
The numbered example’s caption; must appear with num
class, class list, defaultnone
Appended to the .td-code root element; td-code-command makes a command strip
data-* / aria-* / role, string, defaultnone
Passed through to the root element
title, filename and label already give the block an accessible name and
role="group", so aria-label, aria-labelledby or role next to any of
them warns and is ignored; those three pass through only on a block with
neither a title nor a label. Unknown, unsafe and theme-reserved attributes
warn and are ignored, and the warning lists the allowed names.
The same line also takes Chroma’s options, which the theme hands to Hugo
unchanged:
lineNos, falseinlinetable, defaultfalse
Line-number style; table is mutually exclusive with wrap=true
lineNoStart, positive integer, default1
First displayed number; does not affect how hl_lines counts
hl_lines, lines and ranges, defaultnone
For example "2 4-5", counted over the source lines in the fence
anchorLineNos, boolean, defaultfalse
Line numbers become anchor links prefixed with the block’s id
tabWidth, positive integer, defaultHugo’s default
Spaces a tab expands to
Limits
Chroma is the only highlighter. There is no Shiki, Twoslash, in-browser
highlighting or runnable playground; for patches, use a diff fence.
copy="command" works only with the console and shell-session lexers;
anywhere else it warns and copies everything.
A generated ID is not a permanent link. Write id for any line or block you
link to from elsewhere.
mermaid, math, chem, markmap, plantuml, echarts, infographic,
checksums, filetree, gallery and map fences are not code blocks. Each
renders as its own component, without the code frame or copy button.
Related
Tabs — the full rules for assembling adjacent fences
Include — pull a real file from the repository in as a code block
Publishing books — numbered examples, cross references, the list of examples
Put equivalent alternatives such as package managers or config formats side by side, and let one reader choice follow them across every page.
Tabs put equivalent alternatives side by side, such as package managers,
operating systems, YAML / TOML / JSON, or an environment variable and its
configuration key, so each reader sees the one that applies to them. Do not use
them for ordered steps or unrelated content: a reader sees one panel at a time
and may never open the others.
There are two forms with the same runtime, markup and keyboard behavior. The
common one is a tab attribute on adjacent code fences (as well as filetree,
gallery and map data fences) or tables. When a panel needs prose, lists or
callouts, use the tabs/tab shortcodes.
Shortest form
Write two fences with tab, separated by nothing but a blank line.
Source
```bash {tab="Homebrew"}
brew install hugo
```
```bash {tab="Debian / Ubuntu"}
sudo apt install hugo
```
Homebrew
brew install hugo
Debian / Ubuntu
sudo apt install hugo
The page itself contains two complete code blocks, each titled with its label,
and the browser joins adjacent blocks into a tab set once the page loads. On
GitHub, on paper and without JavaScript, readers see both blocks one after the
other, so nothing is ever hidden from them.
Groups: links, sync and memory
Add group to the first block, and a value to every block of the set. The
set then gets a shareable URL hash #<group>-<value>, stays in step with other
sets of the same group, and remembers the reader’s choice.
tab is the label people read and value is the identifier in URLs and
storage, matching ^[a-z0-9][a-z0-9_-]*$, so you can reword a label without
breaking links. The pnpm panel above is #pkgmgr-pnpm: open this page with
that hash and it is selected.
Groups move together
The set below uses the same group="pkgmgr", so choosing a package manager in
either set switches the other. The choice is saved in localStorage under
td-tabs:v1:pkgmgr and applies to every pkgmgr set on every page of the
site: a reader who picks pnpm once sees pnpm everywhere.
This set has no yarn panel. When the group switches to a value a set lacks,
that set keeps its current panel, so a set always shows something. On load, a
set takes the first of these that it can use: the URL hash, the stored choice,
the shortcode’s default or the first block, the first tab. A hash selects a
panel without overwriting the reader’s stored choice.
Tables can be tabs too
The same attributes on table attribute lines join adjacent tables into a set.
A set needs at least two adjacent blocks of the same kind. A single block with
tab keeps the label as its title instead of growing a one-tab bar.
Source
```ini {tab="on its own"}
listen_addresses = '*'
```
on its own
listen_addresses='*'
Only blank lines may come between the blocks of a set. Anything else ends it:
a paragraph, heading or list, an HTML comment (often a stray
<!-- prettier-ignore-end -->), or a block that declares its own group,
which starts a new set.
Tabs around running text
When a panel needs paragraphs, lists, callouts or several blocks, use the
tabs/tab shortcodes. Each tab body is full Markdown.
Source
{{< tabs group="deploy" default="pages" label="Deployment target" >}}
{{< tab label="GitHub Pages" value="pages" >}}
The repository ships `.github/workflows/`; a push to `main` builds and publishes.
> [!NOTE]
> `baseURL` has to be the repository's Pages address.
{{< /tab >}}
{{< tab label="Cloudflare Pages" value="cloudflare" >}}
Connect the repository in the Cloudflare dashboard; the build command is:
```bash
hugo --gc --minify
```{{< /tab >}}
{{< /tabs >}}
GitHub Pages
The repository ships .github/workflows/; a push to main builds and publishes.
Note
baseURL has to be the repository’s Pages address.
Cloudflare Pages
Connect the repository in the Cloudflare dashboard; the build command is:
hugo --gc --minify
default picks the initial panel; it must match a child’s value and needs
group. Without group, the theme numbers the tabs tab1, tab2 … itself,
so a value is ignored with a warning, and the set switches locally without
touching the URL or storage.
The shortcode form checks the whole set at build time. The attribute form
checks each block’s own attributes at build time, but blocks only become a set
in the browser, so problems of the set as a whole, such as a later block
without value or two blocks with the same value, show up as warnings in the
browser console.
Output
Only pages that use tabs load tabs.js. Until it runs, and in print, RSS and
browsers without JavaScript, every panel is visible as a titled section with no
tab bar. In the Markdown output the fence form keeps its source fences,
{tab=} included, and each shortcode tab becomes its label in bold followed
by its body.
Parameter reference
Attributes on a fence info line or a table attribute line:
tab, non-empty string, defaultnone
The visible label; on a lone block it is simply that block’s title
group, ^[a-z][a-z0-9_-]*$, defaultnone
On the first block of a set only; enables the hash, in-page sync and persistence; requires tab
value, ^[a-z0-9][a-z0-9_-]*$, defaultnone
Required on every block of a grouped set; ungrouped it only names the panel; requires tab
The tabs shortcode:
group, ^[a-z][a-z0-9_-]*$, defaultnone
As above: hash, sync and persistence
default, a child’s value, defaultthe first child
The initially selected panel; requires group
label, plain text, defaultlocalized “Tabs”
Accessible name of the tab bar; not displayed
The tab shortcode:
label, plain text, required
The visible label
value, ^[a-z0-9][a-z0-9_-]*$, required
Forbidden without a group, where tab1, tab2 … are generated
In a group, a panel’s ID is <group>-<value>. When the same group appears
twice on one page, later sets get -2, -3 … suffixes and a deep link goes
to the first set; ungrouped sets get generated IDs. The storage key is
td-tabs:v1:<group>. A click or key press updates the hash with
replaceState and writes storage, while arriving with a hash only changes the
selection. Left and Right (mirrored on right-to-left pages), Home and End move
to a tab and select it, and focus stays on the tab.
Limits
Invalid input warns and falls back to something safe, and build warnings
name the source position. Unusable group, value or default settings
are dropped, stray content inside tabs is ignored, a repeated shortcode
value keeps both tabs, and a tabs without children renders nothing.
An attribute-form set in which some block lacks a usable value loses its
group and switches locally; the theme never invents a value for a group.
Adjacent blocks that repeat a value stay separate titled blocks.
A set holds only fences or only tables. Use the shortcodes to mix prose and
code.
Tabs are not a way to fold content away. To collapse long output, use
> [!DETAILS]; see Callouts.
group names are shared across the site, so picking pnpm on one page also
picks it in every pkgmgr set on other pages. Name groups by meaning, such
as pkgmgr or os, never tabs1.
Related
Code blocks — the rest of the fence attributes (title, copy, line numbers, folding)
Turn an ordinary Markdown table into a captioned table, a compatibility matrix, a field list, a numbered book table or a tab set, and give wide technical tables room to read.
Tables are ordinary GFM pipe tables, so they read the same on GitHub and in any
editor. OINK adds what long technical tables need: a wide table scrolls inside
its own box instead of stretching the page, and one attribute line under the
table turns it into a captioned table, a support matrix, a field list, a
numbered book table or one panel of a tab set.
GFM has no merged cells, sorting or filtering, and OINK does not add them. Data
that needs merged headers usually reads better as two tables or a matrix, and a
cell that needs paragraphs or a list belongs in a field list.
Shortest form
A table without an attribute line renders as an ordinary table. The delimiter
row sets each column’s alignment, and header cells become th scope="col".
A table wider than the reading column scrolls sideways inside its own region,
so the rest of the page keeps its width on a phone. Keyboard users reach the
region with Tab and scroll it with the arrow keys; screen readers announce it as
“Scrollable table” in the page’s language.
{caption="…"} adds a visible <caption> in plain text. It does not number
the table; for “Table 9-1” use num.
Source
| Setting | Value |
| --- | --- |
| Port | 5432 |
| Data directory | `/var/lib/pgsql/18/data` |
| License | PostgreSQL License |
{caption="PostgreSQL defaults on a fresh EL 9 node"}
PostgreSQL defaults on a fresh EL 9 node
Setting
Value
Port
5432
Data directory
/var/lib/pgsql/18/data
License
PostgreSQL License
Compatibility matrices
{.matrix} is for “what supports what” grids. The first column becomes a row
header (th scope="row"), and the header row and first column stay pinned while
the reader scrolls in either direction, so a cell deep in a large matrix still
shows its row and column. Cells are centered unless the delimiter row sets
another alignment. The ✅ and ❌ are ordinary characters you type; the theme
gives them no meaning.
Squeezed into the reading column, a table of configuration keys or environment
variables breaks identifiers in odd places and grows very tall rows. .wide
lets the table take its natural width (width: max-content) and scroll
sideways when that is wider than the page. Cells break only between words
(overflow-wrap: break-word, word-break: normal), and body cells have a soft
max-width: 40ch, so a long description wraps into a readable column instead
of one enormous line. A very long token can still wrap; the bound is not a
fixed column width.
Source
| Variable | Required | Default | Configuration key | Description |
| --- | --- | --- | --- | --- |
| `HG_PD_GRPC_HOST` | Yes | None | `grpc.host` | Advertised gRPC hostname/IP; use container hostnames within a container network. |
| `HG_PD_INITIAL_STORE_COUNT` | No | `1` | `pd.initial-store-count` | Minimum Store count needed for cluster availability. |
| `HG_PD_ACTUATOR_EXPOSURE` | No | `health,metrics,prometheus` | `management.endpoints.web.exposure.include` | Public Actuator endpoint allowlist; `*` is forbidden. |
{.wide .expand}
Variable
Required
Default
Configuration key
Description
HG_PD_GRPC_HOST
Yes
None
grpc.host
Advertised gRPC hostname/IP; use container hostnames within a container network.
HG_PD_INITIAL_STORE_COUNT
No
1
pd.initial-store-count
Minimum Store count needed for cluster availability.
HG_PD_ACTUATOR_EXPOSURE
No
health,metrics,prometheus
management.endpoints.web.exposure.include
Public Actuator endpoint allowlist; * is forbidden.
.wide and .full-width solve different problems and combine as
{.full-width .wide}. .full-width widens the box the table sits in, which
suits many short columns; .wide changes how the table inside sizes its
columns, which suits long identifiers. .wide applies on screen only: print
and RSS keep the ordinary layout, and it has no effect on .fields. The older
.td-table--wide class still works as a synonym.
Expand selected tables
.expand puts a small expand icon at the table’s top-right corner. It appears
on hover or keyboard focus on desktop and stays visible on touch screens. One
click opens the table in a dialog that fills the window, with the same
text size, links and text selection; Close or Escape puts it back at the same
reading position. On a narrow screen a wide table still scrolls sideways
inside the dialog. Most examples on this page carry .expand, so you can try
it on them.
Add it only to the few tables that need more room: there is no size threshold
and no site-wide switch, because an icon on every table is noise. .expand
works alone or with .wide, .full-width, .matrix, a caption, a number or
a tab. Several classes can be written either way, {.wide .expand} or
{class="wide expand"}.
Only pages with an .expand table load the small reader script. Without
JavaScript or native <dialog> support, the reader sees the complete table
inline and no dead button. Printing first returns an open table to the article.
A table whose headers, aria-labelledby or aria-describedby points at
something outside the table stays inline, because the dialog would cut those
references. If your site CSS styles tables through an article ancestor, check
how such a table looks inside the dialog.
Field lists
{.fields} renders the table as a definition list: the first column is the
name, the last is the description, and the columns between are metadata. It is
the form for configuration keys, command flags and API fields. See
Fields for everything it can do.
Source
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `offline_search` | boolean | `false` | Build the local search index |
| `page_width` | string | `normal` | Width of the reading column |
{.fields meta="type default"}
offline_search, boolean, defaultfalse
Build the local search index
page_width, string, defaultnormal
Width of the reading column
Numbered tables
Books and long manuals refer to tables by number. Add num, with an optional
#id and caption: the table is wrapped in a <figure> labeled “Table N.” in
the page’s language, xref can link to it, and it appears in the book’s list
of tables. You choose the numbers; the theme does not count. The id defaults
to tbl-<num>.
Source
| Isolation level | Dirty read | Non-repeatable read | Phantom read |
| --- | --- | --- | --- |
| Read committed | no | yes | yes |
| Repeatable read | no | no | yes |
| Serializable | no | no | no |
{#tbl-iso num="9-1" caption="Anomalies each PostgreSQL isolation level permits"}
See {{< xref tbl="9-1" anchor="tbl-iso" >}}.
Isolation level
Dirty read
Non-repeatable read
Phantom read
Read committed
no
yes
yes
Repeatable read
no
no
yes
Serializable
no
no
no
Table 9-1Anomalies each PostgreSQL isolation level permits
Adjacent tables with {tab="…"} become one tab set, by the same rules as
adjacent code fences. A group on the first table adds a shareable URL hash,
syncing and a remembered choice, and then every table needs a value. See
Tabs for the full rules. Even two short columns fill the panel. A wide table scrolls within it.
In HTML each table sits in a focusable <div class="td-table-scroll">;
.matrix and .full-width add modifier classes to that wrapper, while your
own classes stay on the <table>. Ordinary tables load no script. Print and
RSS show the complete static table, with no reader and no tab bar, and the
Markdown output keeps the table and its attribute line as written.
Parameter reference
The attribute line on the row below the table:
.full-width, marker, defaultnone
Leaves the reading column and uses the article’s full width
.wide, marker, defaultnone
Sizes the inner table to max-content; for long technical identifiers
.expand, marker, defaultnone
Adds a corner action that opens the table in a larger dialog
.matrix, marker, defaultnone
First column becomes a row header; header row and first column are pinned; other cells are centered
Any other key, style included, is dropped with a build warning. Hugo strips
on* handlers before the theme sees them, so they are dropped silently.
Limits
Some attributes exclude each other. .fields wins over .matrix,
.full-width, .expand and num, and num wins over tab; the loser is
dropped with a warning. group and value need tab, and meta needs
.fields.
The attribute line must touch the last row: after a blank line Goldmark
drops it without a warning and the table renders plain. Without
markup.goldmark.parser.attribute.block: true, one of the
site prerequisites, the braces show up
as text. Formatters such as Prettier move the line; wrap the table in
<!-- prettier-ignore-start --> and <!-- prettier-ignore-end -->.
No merged cells, sorting or filtering. Split a table with merged headers
into two tables, or make it a matrix.
Cells hold inline content only. For several paragraphs, a list or a code
block, use the fields/field shortcodes.
.matrix centers cells with CSS, so an alignment written in the delimiter
row wins.
Publishing books — numbered tables, cross references, the list of tables
Code blocks — where attributes go on the info line instead of the next line
4.5 - Fields
Document configuration keys, command flags and API fields as a field list that stays readable on a phone and gives every entry its own link.
A field list documents named settings: configuration keys, command-line flags,
API fields. Each name sits on its own line with small chips for its type,
whether it is required and its default, and the description runs underneath at
full width, so a long description never gets squeezed into a narrow table
column on a phone. Every entry also gets its own anchor, which you can paste
into an issue or a chat to point at one setting.
A field list suits reference material. When readers compare many rows across
the same columns, keep a plain table; when the content is a sequence of
actions, use Steps.
Shortest form
Write a pipe table with at least two columns and put {.fields} on the line
right after it. The first column is the name, the last column is the
description, and every column in between is metadata.
Source
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `offline_search` | boolean | `false` | Build the local search index and enable the command palette |
| `offline_search_max_results` | integer | `10` | Maximum number of search results |
| `page_width` | string | `normal` | Reading column width: `normal``wide``full` |
{.fields}
offline_search, Typeboolean, Defaultfalse
Build the local search index and enable the command palette
Each metadata cell is shown as “Header: value”. The theme does not read
meaning into header text, so Type here is only a label; to get the standard
chips, assign roles with meta as described in the next section. Cells accept
inline Markdown such as code, emphasis and links, and an empty metadata cell is
left out.
Semantic columns with meta=
meta gives each metadata column a role, in column order: type,
required, default, or - to keep the header as a plain label. With roles
assigned, the table renders the same chips as the shortcode form.
Source
| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `baseURL` | string | yes | | Site address, subpath included |
| `title` | string | yes | | Site name, shown in the navbar and the tab |
| `defaultContentLanguage` | string | | `en` | Default language; decides which language unprefixed paths belong to |
{.fields meta="type required default"}
baseURL, string, required
Site address, subpath included
title, string, required
Site name, shown in the navbar and the tab
defaultContentLanguage, string, defaulten
Default language; decides which language unprefixed paths belong to
Write exactly one role per metadata column, which is the column count minus
two. With too many or too few, the build warns and the table renders as if
meta were absent.
Any non-empty required cell means required, and it shows the English
required chip whether you wrote “yes”, “是” or “✔”. Leave optional rows
empty, because “no” and “否” count as required too.
type and default values without inline markup of their own are set as
code, matching the shortcode form.
The chips always appear in the order type, required, default,
whatever the column order; - columns follow in their own order.
Mix - with roles to keep a column under its own label:
Source
| Environment variable | Type | Read by | Description |
| --- | --- | --- | --- |
| `PGHOST` | string | libpq clients | Server host name, or the directory of a Unix socket |
| `PGDATA` | path | server tools | Data directory used by `initdb` and `pg_ctl` when `-D` is not given |
{.fields meta="type -"}
PGHOST, string, Read bylibpq clients
Server host name, or the directory of a Unix socket
PGDATA, path, Read byserver tools
Data directory used by initdb and pg_ctl when -D is not given
Labels and container IDs
caption puts a visible label above the list and also names it for screen
readers. id sets the ID of the outer container, so you can link to the whole
list or style it from site CSS.
Each entry gets a field-<name> anchor, and a link icon appears beside the
name on hover. page_width in the first list on this page, for example, is
#field-page_width. When a name occurs twice on one page,
the second anchor gets -2, the third -3 (unlike headings, which Goldmark
suffixes -1, -2).
To keep an anchor that other pages already link to, give the field
shortcode an explicit id, such as id="guc-work-mem"; an empty, duplicate
or unsafe value warns and falls back to the generated anchor.
Local search indexes each anchored entry, so
searching for a parameter name opens the page at that entry.
The shortcode form
A table cell cannot hold paragraphs, lists or code blocks. When a description
needs them, write the list with the fields and field shortcodes instead.
Source
{{< fields label="Common pig flags" >}}
{{< field name="--config" type="path" required=true >}}
Path to the configuration file. Relative paths resolve against the working
directory.
When `PIG_CONFIG` is also set, the command-line flag wins.
{{< /field >}}
{{< field name="--log-level" type="string" default="info" >}}
Log level, from low to high:
-`debug`: print every remote call
-`info`: the default
-`error`: output only on failure
{{< /field >}}
{{< field name="--dry-run" type="boolean" default=false >}}
Print what would happen and change nothing:
```bash
pig ext install pg_duckdb --dry-run
```{{< /field >}}
{{< /fields >}}
Common pig flags
--config, path, required
Path to the configuration file. Relative paths resolve against the working
directory.
When PIG_CONFIG is also set, the command-line flag wins.
--log-level, string, defaultinfo
Log level, from low to high:
debug: print every remote call
info: the default
error: output only on failure
--dry-run, boolean, defaultfalse
Print what would happen and change nothing:
pig ext install pg_duckdb --dry-run
Write required=true and default=false without quotes, because quoted they
are strings rather than booleans. default accepts any scalar and shows
default=0 and default="" as written, the empty string as ""; without
default, no default chip appears. Every field needs a non-empty body and
must sit directly inside fields.
Which form to use
Situation
Use
One-sentence descriptions that fit in a table cell
table + {.fields}
Descriptions with paragraphs, lists or code blocks
the fields/field shortcode
Readers comparing many rows across the same columns
Prefer the table form whenever it fits: GitHub still shows it as a readable
table, and the page’s Markdown output keeps it as one.
Output
Field lists load no script. Print and RSS show the complete list without entry
anchors, because a print view joins many pages into one document where the
anchors would collide. In the page’s Markdown output the table form stays the
source table, while the shortcode form becomes a bulleted list,
“name — type; required; default: value”, with each description indented
beneath its entry.
Parameter reference
The table attribute line, on the line right after the table:
.fields, marker, defaultnone
Required; renders the table as a field list
meta, role list, defaultnone
Space-separated typerequireddefault-; one per middle column; semantic roles cannot repeat
caption, plain text, defaultnone
Visible label and the list’s accessible name
id, identifier, defaultnone
ID of the outer container
class, class list, defaultnone
Passed through for site CSS
data-* / aria-*, string, defaultnone
Passed through
The fields shortcode:
label, non-empty string
Visible label; the same thing the table’s caption does
id, identifier
Container ID; no whitespace, quotes, <, > or &
class / data-* / aria-*, string
The same policy as the table attribute line
The field shortcode:
name, non-empty string, required
The field name
id, identifier
Replaces the generated field-<name> anchor; no whitespace, quotes, <, > or &, and unique among the fields on the page
type, non-empty string
Type label such as boolean, string[], duration
required, boolean
true shows the untranslated required chip; defaults to false
default, scalar
String / boolean / integer / float; false, 0 and "" all display
Limits
The first column must be non-empty and unique within the table; a row with
an empty or duplicate name warns and is skipped.
.fields cannot be combined with .matrix, .full-width, .expand or
num, and meta works only on a table that has .fields.
Table cells cannot hold block content; switch to the shortcode form for
paragraphs, lists and code blocks.
required and default stay in English in every language, because they
are API vocabulary rather than interface text.
There is no kind, since, deprecated or location metadata, no
per-field link and no nesting, and nothing is generated from TypeScript or
OpenAPI schemas.
Related
Tables — the rest of the attribute line and the exclusion rules
Configuration — the full site parameter table, itself a field list
Steps — ordered actions do not belong in a field list
4.6 - Steps
Add {.steps} to an ordered list for a numbered procedure. Use the steps shortcode when each step needs a table-of-contents heading.
Steps present a procedure as a numbered column of dots joined by a line, so a
reader following an installation or an upgrade can see at a glance which step
they are on and how many remain. Add a {.steps} line under an ordinary
ordered list; CSS draws the dots and the line, and no script loads. Use steps
only when the order matters. Options and related links belong in a plain list
or in cards.
The ordered list is the form to reach for first. Switch to the
{{% steps %}} shortcode when each step needs its own heading in the table
of contents; Which form to use compares the two.
Shortest form
Number every item 1. and let Markdown count, so you can add, remove or
reorder steps without renumbering, and the content indent is always three
spaces.
Source
1. Install Hugo
1. Clone OINK Starter
1. Start the local preview
{.steps}
Install Hugo
Clone OINK Starter
Start the local preview
Put {.steps} on the line right after the last item. With a blank line in
between, Goldmark drops it without a warning and the list renders as a plain
numbered list.
What goes in a step
A step can hold any block content: paragraphs, fenced code, callouts, tables,
nested lists and images. Indent it to the item’s content column, three spaces.
Source
1. Clone OINK Starter; it is the small project template for the theme.
```bash
git clone https://github.com/pgsty/oink-starter my-docs
cd my-docs
```
1. Start the local server.
```bash
hugo server
```
> [!NOTE]
> The first build fetches the theme through the Go module proxy, which needs
> Go on the machine.
1. Replace three things and it is your site.
| Where | Replace with |
| --- | --- |
| `title` in `hugo.yml` | your site name |
| `baseURL` in `hugo.yml` | your domain |
| `content/` | your content |
{.steps}
Clone OINK Starter; it is the small project template for the theme.
git clone https://github.com/pgsty/oink-starter my-docs
cd my-docs
Start the local server.
hugo server
Note
The first build fetches the theme through the Go module proxy, which needs
Go on the machine.
Replace three things and it is your site.
Where
Replace with
title in hugo.yml
your site name
baseURL in hugo.yml
your domain
content/
your content
Shortcodes written as {{< … >}}, such as tabs, cards and badges, work
inside a step too. The {{% … %}} form does not; see Limits.
Splitting one step per platform
When one step differs by platform, write adjacent {tab=} fences inside that
list item; they still combine into one set of tabs.
When prose interrupts a procedure, start the next group with its real step
number. Markdown writes that number as the list’s start, and the dots
continue from it; starts from 2 to 40 are supported.
Source
4. Configure `baseURL` and the deployment workflow.
1. Push to `main` and wait for GitHub Actions to finish.
{.steps}
Configure baseURL and the deployment workflow.
Push to main and wait for GitHub Actions to finish.
Steps with headings
A long procedure is easier to navigate when every step has a heading that
appears in the table of contents and can be linked to. Wrap the procedure in
{{% steps %}}: its body is ordinary page Markdown, not indented, and
each direct child heading starts a step. The three headings below are in this
page’s table of contents.
Source
{{% steps %}}
### Install the toolchain {#install-toolchain}
Install Hugo and Go; [Get started](/docs/start/) lists the versions.
### Run the server {#run-server}
{{< tabs group="oink-os" default="macos" >}}
{{< tab label="macOS" value="macos" >}}
`brew install hugo go`{{< /tab >}}
{{< tab label="Debian" value="debian" >}}
`sudo apt install hugo golang-go`{{< /tab >}}
{{< /tabs >}}
### Publish {#publish}
Push to `main`; the workflow the repository ships builds and publishes.
{{% /steps %}}
Install the toolchain
Install Hugo and Go; Get started lists the versions.
Run the server
macOS
brew install hugo go
Debian
sudo apt install hugo golang-go
Publish
Push to main; the workflow the repository ships builds and publishes.
steps is the theme’s only shortcode written with percent delimiters. That
form hands its body to Goldmark as page Markdown, which lets each step carry
headings that enter the TOC. The cost is that it cannot sit inside a
list item or inside another percent container, another steps included. Give
every step in one procedure the same heading level.
Which form to use
Situation
Use
A step is a sentence or two plus a command
ordered list + {.steps}
Each step needs a heading, a link and a place in the TOC
{{% steps %}}
The procedure itself has to nest inside another list item
ordered list + {.steps}
Optional presentation
For a short procedure, {.steps .td-steps-compact} and
steps variant="compact" tighten the spacing; numbering, nesting and heading
anchors work as before. The presentation page
shows both next to the regular form.
Output
Steps load no script, so they look the same with JavaScript off. Print keeps
the numbers, content and connecting line; the Markdown output keeps the source
as written, and RSS shows a plain list or titled sections.
Parameter reference
{.steps}, Whereline below the ordered list
Required; has no effect on an unordered list
{.steps .td-steps-compact}, Whereline below the ordered list
Compact spacing for a short procedure
1., Whereevery item
Let Markdown count; the content indent is always three spaces
4. (first item), Wherefirst item
Emits <ol start="4"> and continues from 4; supported for 2–40
{{% steps %}}, Wherearound a set of headings
Direct child headings (##–######) are the steps; the body is not indented
variant="compact", Whereon {{% steps %}}
Compact spacing; any other value warns and uses the regular layout
Limits
Do not put a {{% … %}} shortcode inside a list item: its multiline
output ends the list early. To put a {{% … %}} shortcode in a step, use
the shortcode form.
Formatters such as Prettier may separate {.steps} from its list. Wrap the
list in <!-- prettier-ignore-start --> and <!-- prettier-ignore-end -->.
{.steps} works only on ordered lists; a - list gets no numbers.
Steps do not collapse, expand or track progress; there is no “done” state.
Mark a feature, version or table cell with a short status label such as Beta or deprecated, in one of five semantic tones.
A badge is a small inline label that sits after a name and states its status
in a word or two: Beta, deprecated, v0.5, needs a server. You choose what the
status means, one of five tones, and the theme picks colors that keep their
contrast in light and dark mode. When the status needs a reason, a procedure
or a deadline, write a sentence or a callout
instead.
Shortest form
Source
{{< badge text="Beta" tone="warning" >}}
Beta
text is the only required parameter, and it must not be empty.
Without tone a badge is neutral. Any value other than these five warns
and falls back to neutral, and there is no way to set a custom color.
Inside a sentence
A badge follows the name it describes, on the same line:
Source
Logical replication {{< badge text="off by default" tone="neutral" >}} needs
`wal_level = logical`. The `pg_duckdb` extension {{< badge text="opt-in" tone="info" >}}
is installed separately, and the backup repository {{< badge text="needs a server" tone="warning" >}}
must point at an object store before the first backup runs.
Logical replication off by default needs
wal_level = logical. The pg_duckdb extension opt-in
is installed separately, and the backup repository needs a server
must point at an object store before the first backup runs.
Next to a heading
Do not put a badge, or any other shortcode, in a heading. Hugo builds the
table of contents before it expands shortcodes, so the heading looks right
but its table-of-contents entry shows an internal Hugo placeholder. Put the
badge at the start of the first paragraph instead:
Source
### OpenAPI pages {#openapi-example}
{{< badge text="new in 0.5" tone="success" >}} This section covers…
OpenAPI pages
new in 0.5 The badge sits right under the
heading, the table of contents stays clean, and a shared link to the heading
does not carry the badge text.
In table cells
In a comparison table, a column of badges is quicker to scan than a column of
“yes” and “no”:
1. Install Hugo {{< badge text="0.170+" tone="info" >}}
1. Create a site from OINK Starter and change `baseURL` in `hugo.yaml`1.`hugo server` to preview {{< badge text="port 1313" tone="neutral" >}}
{.steps}
Install Hugo 0.170+
Create a site from OINK Starter and change baseURL in hugo.yaml
hugo server to preview port 1313
On cards
A card has a badge parameter of its own, plain text shown beside the title,
and its body can hold badge shortcodes as well:
Source
{{< cards >}}
{{< card title="Hugo Module" icon="fa-brands fa-golang" badge="recommended" >}}
One `hugo mod get` and you are done {{< badge text="needs Go" tone="info" >}}
{{< /card >}}
{{< card title="Offline archive" icon="fa-solid fa-box-archive" >}}
Builds on a machine with no network {{< badge text="manual upgrades" tone="warning" >}}
{{< /card >}}
{{< /cards >}}
Hugo Modulerecommended
One hugo mod get and you are done needs Go
Offline archive
Builds on a machine with no network manual upgrades
Clickable badges
link turns the badge into a link. It accepts a site path, a relative path,
an http(s): URL or a mailto: address:
Source
Current version {{< badge text="v0.5" tone="info" link="/blog/" >}};
for the upgrade steps see {{< badge text="Upgrading" tone="neutral" link="/docs/admin/upgrade/" >}}.
Current version v0.5;
for the upgrade steps see Upgrading.
An invalid link warns and is dropped, leaving a plain badge.
Output
Badges load no script, and print and RSS show them as they appear on the
page. A badge exists only as a shortcode, with no native Markdown form, so the
page’s Markdown output turns it into bold text: **Beta**, or [**Beta**](/…)
when it has a link.
Parameter reference
text, plain text, default—
Required, non-empty. What the reader sees
tone, enum, defaultneutral
neutralinfosuccesswarningdanger
link, URL, default—
Turns the badge into a link
Badges take named parameters only; there is no icon, class, color,
outline or size. Mistakes warn and fall back: an unknown parameter is
ignored, a missing or empty text renders nothing, an unknown tone becomes
neutral, and an unsafe link is dropped.
Limits
The color only reinforces the text, so the text must state the status on
its own. {{< badge text="🔴" >}} tells a screen reader nothing.
There is no icon parameter. For an icon, use cards
or a callout.
Keep the text to a few words. A badge does not wrap, so longer text belongs
in the sentence.
Use at most three badges in one place; a row of them buries the name they
describe.
Use kbd with one key name per parameter to display a semantic key sequence. Instructions remain readable in print and Markdown.
Use keys to show shortcuts and chords separately from prose. Supply one positional parameter per key.
The theme draws keycaps, adds separators, and gives screen readers a readable sequence.
Use inline code for command names, flags, and text to type. They are not physical keys.
Shortest form
Source
Press {{< kbd "Ctrl" "K" >}} to open the command palette.
Press Ctrl+ with K to open the command palette.
Quote each positional parameter and use one parameter per key.
Missing, empty, or named parameters warn. Ordinary previews do not render invalid keys. Review the warning and rendered fallback before publication.
A single key
Each parameter represents one key. Write symbol keys as displayed on the keyboard.
Source
{{< kbd "Escape" >}} closes a dialog;
{{< kbd "/" >}} jumps to search;
{{< kbd "t" >}} cycles visual styles;
{{< kbd "y" >}} cycles light, dark, and system;
{{< kbd "x" >}} cycles through languages.
Escape closes a dialog;
/ jumps to search;
t cycles visual styles;
y cycles light, dark, and system;
x cycles through languages.
Chords
Multiple parameters display in order, separated by +.
Assistive technology receives a localized connector instead of the visible plus sign.
Source
{{< kbd "⌘" "Shift" "P" >}} and {{< kbd "Ctrl" "Shift" "P" >}} are the same action.
For a literal plus, treat it as a key of its own: {{< kbd "Ctrl" "+" >}} zooms the page in.
⌘+ with Shift+ with P and Ctrl+ with Shift+ with P are the same action.
For a literal plus, treat it as a key of its own: Ctrl+ with + zooms the page in.
Platform differences
Use the reader’s keyboard labels: ⌘ on macOS and Ctrl on Windows and Linux.
Never combine platform labels in one sequence. Labels such as Ctrl/⌘ cannot be read aloud correctly.
Name the platform in the sentence or use tabs.
Source
On macOS press {{< kbd "⌘" "K" >}}; on Windows and Linux, {{< kbd "Ctrl" "K" >}}.
On macOS press ⌘+ with K; on Windows and Linux, Ctrl+ with K.
Shortcut tables
Keys are common in cheatsheets. This table shows some global keys that the site supports:
Source
| Key | Action |
| --- | --- |
| {{< kbd "Ctrl" "K" >}} | Open the command palette ({{< kbd "⌘" "K" >}} on macOS) |
| {{< kbd "/" >}} | The palette's full search state |
| {{< kbd "t" >}} | Cycle visual styles |
| {{< kbd "y" >}} | Cycle light, dark, and system |
| {{< kbd "q" >}} / {{< kbd "e" >}} | Previous / next page |
| {{< kbd "w" >}} {{< kbd "s" >}} {{< kbd "a" >}} {{< kbd "d" >}} | Move, collapse and expand in the sidebar tree |
| {{< kbd "Escape" >}} | Leave the sidebar tree for the article |
1. Press {{< kbd "Ctrl" "K" >}} to open the command palette
1. Type `>` for the command-only state, or type a keyword to search
1. Select with {{< kbd "↑" >}} {{< kbd "↓" >}} and press {{< kbd "Enter" >}} to go
1. {{< kbd "Escape" >}} closes it and focus returns where it was
{.steps}
Press Ctrl+ with K to open the command palette
Type > for the command-only state, or type a keyword to search
Select with ↑↓ and press Enter to go
Escape closes it and focus returns where it was
Raw <kbd> tags
Raw <kbd> tags get the same styles, and GitHub also displays them.
With raw tags, you maintain separators and accessible sequences yourself. Either form works for single keys. Use the shortcode for chords.
Source
Press <kbd>F5</kbd> to reload; in an editor, <kbd>Ctrl</kbd>+<kbd>S</kbd> saves.
Press F5 to reload. In an editor, Ctrl+S saves.
Output
HTML:<span class="td-kbd-sequence"> around one <kbd> per key; the visible + is hidden from screen readers, which get a localized connector.
Print: same as HTML, static.
Markdown: plain text: Ctrl + K, ⌘ + Shift + P.
RSS: same as print.
The instruction remains readable without CSS or JavaScript.
Parameter reference
Positional 1..n, string, default—
At least one; each must be non-empty and quoted; order is display order
Only positional parameters are supported. There is no separator, label, platform, class, or size parameter.
Hugo cannot combine positional and named parameters in one shortcode call.
Limits
Each sequence represents keys pressed together. For consecutive keys, use two kbd calls and describe the order:
press Escape, then Enter.
There is no platform detection. The page never replaces Ctrl with ⌘ based on the visitor’s operating system.
There is no key mapping or recording. Menu paths, gestures, and gamepads are outside the scope.
Quote every key: unquoted words happen to work, but an unquoted number such as 1 is not a string; it warns and is skipped.
Do not use keys for commands. hugo server is inline code; Ctrl is a key.
Reuse one source across pages with include for shared fragments and files, param for site and page values, and comment for notes that never publish.
When the same installation steps appear on three pages, or the current version
number on thirty, every copy is a chance for the pages to drift apart. These
three shortcodes keep one source instead: include inserts the content of
another file, param prints a page or site parameter, and comment holds a
note for authors that no output ever shows. Content that only one page uses
belongs on that page.
Shortest form
include has one required parameter, file:
Source
{{< include file="parts/install-oink.md" >}}
The included file is ordinary Markdown, kept under assets/:
assets/parts/install-oink.md
Installing OINK into an existing Hugo site takes three commands:
```sh
hugo mod init github.com/you/your-site
hugo mod get github.com/pgsty/oink
hugo server
```> [!NOTE]
> `hugo mod get` needs Go on the machine; an offline archive or a submodule does not.
The current release is {{< param version >}}.
It renders exactly as if you had written it here, copy button and callout
included:
Installing OINK into an existing Hugo site takes three commands:
hugo mod init github.com/you/your-site
hugo mod get github.com/pgsty/oink
hugo server
Note
hugo mod get needs Go on the machine; an offline archive or a submodule does not.
The current release is v1.8.0.
An included file is not a page: it has no URL, no sidebar entry and no
translation of its own.
Where the file comes from
file is looked up in this order, and the first match wins:
A page resource — a file in this page’s bundle, written as file="config.yaml".
A global resource under assets/ — written as file="snippets/dsn.txt".
A file under content/ — a leading / starts at the content root, otherwise relative to the page’s directory, written as file="notes/caveat.md" or file="/shared/notice.md".
Include never reads outside content/ and assets/. A path containing ..,
or one that matches nothing, warns and includes nothing.
Keep Markdown fragments under assets/ or content/, where the name you
write is exactly the file you get. In a page bundle (step 1), Hugo files
language-suffixed resources such as notice.zh.md under the name without the
suffix, and asking the bundle for notice.md returns rendered HTML rather than
source, which then leaks into the page’s Markdown output as
<div class="td-code"> markup. Non-Markdown files such as .yaml, .sh or
.txt are not affected.
Including code files
code=true shows the file as a code block, and lang= picks its
highlighting. Including a real configuration file from the repository keeps
the documentation in step with the file.
Source
{{< include file="parts/module.yml" code=true lang="yaml" >}}
module:imports:- path:github.com/pgsty/oink
The block gets the same highlighting, line numbers and copy button as a code
fence. Fence attributes such as title=, collapse or hl_lines= cannot be
passed through include; when you need them, write an ordinary
code block.
What a fragment can contain
A fragment is ordinary Markdown rendered in the context of the page that
includes it, so callouts, tables, lists, images, steps and shortcodes all
work. That is why the last line of the example above shows this site’s current
release: its {{< param version >}} expands on this page.
When two pages include the same fragment, each renders it separately with its
own heading anchors and code-block IDs, so nothing collides. Good fragments are
the things that must change everywhere at once: installation commands,
connection strings, support matrices, legal notices.
Printing a site parameter
param prints one parameter, looking in the page’s front matter first and then
in the site configuration, the same lookup as Hugo’s .Param.
Source
This site publishes {{< param version >}}, copyright from {{< param copyright.from_year >}},
and this page's front matter says `pigsty_pg_major: 18`, which reads back as {{< param pigsty_pg_major >}}.
This site publishes v1.8.0, copyright from 2026,
and this page’s front matter says pigsty_pg_major: 18, which reads back as 18.
Join nested keys with .: copyright.from_year reads
params.copyright.from_year. A missing parameter, or one whose value is a map
or a list, warns and prints nothing.
Parameters inside commands, tables and links
param prints escaped plain text, so it also works inside code fences, table
cells and link targets, which is where version numbers usually live:
Source
```sh
hugo mod get github.com/pgsty/oink@{{< param tdVersion.latest >}}```| Item | Value |
| --- | --- |
| Current version | {{< param version >}} |
| Visual preset | {{< param ui.preset >}} |
[Release notes](https://github.com/pgsty/oink/releases/tag/{{< param tdVersion.latest >}})
Use comment for a to-do or a note to the next author. Its body is dropped
from every output: HTML, print, Markdown and RSS. An HTML comment would not do,
because it stays in the page source and reaches llms.txt.
Source
Since PostgreSQL 18, `pg_stat_io` breaks out WAL statistics.
{{< comment >}}
TODO: after v0.5 ships, bump the version above to 19 and add a pg_stat_io screenshot.
This text reaches no output at all, llms.txt included.
{{< /comment >}}
Verify the dashboards on a test database before upgrading.
Since PostgreSQL 18, pg_stat_io breaks out WAL statistics.
Verify the dashboards on a test database before upgrading.
There is a comment between these two paragraphs, and not even the page source
shows it.
Output
None of the three shortcodes loads a script, and print and RSS show the same
content as the web page. The page’s Markdown output keeps sources rather than
rendered HTML: an included fragment appears as written, with shortcodes such
as {{< param version >}} still unexpanded, include code=true becomes a
fenced code block, param becomes its value, and comment leaves nothing.
Parameter reference
include (named parameters only):
file, path (required), default—
Resolution order in Where the file comes from; a .., missing file, or empty value warns and emits nothing
code, boolean, defaultfalse
true renders as a code block; quoted code="true" warns and includes ordinary content
lang, string, default—
Code language; without code=true it warns and is ignored
Any other parameter name warns, with the file and line, and is ignored.
param (one positional parameter):
parameter name, string (required), default—
Nested keys join with .; page front matter first, then site params; missing or non-scalar values warn and print nothing
comment takes no parameters. It is a paired shortcode, and everything
between {{< comment >}} and {{< /comment >}} is discarded.
Limits
include is not a template: it cannot pass variables to a fragment, include
one conditionally, or add fence attributes such as title= or collapse to
an included code block. For per-platform variants, write two fragments and
put them in tabs.
include has no language fallback and reads exactly the path you write. A
fragment can serve every language, or you can keep one per language, as this
page does with install-oink.md and install-oink.zh.md, and point each
translation at its own.
param prints scalars only. Keep structured data such as version matrices
or download lists in data/ and render it with the matching component.
comment discards its content on every build. To take a whole page offline
for a while, set draft: true.
If a page needs ten fragments, readers are better served by ten links than
by one page assembled from includes.
Related
Code blocks — every fence attribute, and the pipeline include code=true reuses
Front matter — page parameters, which win over site configuration
4.10 - Mermaid
Use a mermaid fence for flowcharts, sequence diagrams, Gantt charts, class diagrams, and state diagrams. Bundled Mermaid follows the color scheme; source diffs show changes.
A mermaid fence turns a few lines of text into a flowchart, sequence
diagram, Gantt chart, class or ER diagram, or state diagram. Because the
diagram lives in the page as text, a change to it shows up in review as a
readable diff and site search finds the words in it, which a screenshot cannot
offer. The Mermaid engine ships with the theme and runs in the reader’s
browser, so no external service sees your diagrams. When a picture needs
pixel-level control, draw it as SVG and add it as an
image.
Shortest form
Source
```mermaid
flowchart LR
app["Application"] --> pool["PgBouncer"]
pool --> primary[("Primary")]
primary -->|streaming replication| replica[("Replica")]
```
flowchart LR
app["Application"] --> pool["PgBouncer"]
pool --> primary[("Primary")]
primary -->|streaming replication| replica[("Replica")]
There is nothing to turn on: name the fence mermaid. Only pages that contain
such a fence load the Mermaid runtime, and they load it once however many
diagrams they hold.
Sequence diagrams
sequenceDiagram shows messages passing between participants over time, which
suits request paths, handshakes and retries.
Source
```mermaid
sequenceDiagram
autonumber
participant App as Application
participant Pool as PgBouncer
participant DB as PostgreSQL
App->>Pool: BEGIN
Pool->>DB: borrow a server connection
App->>Pool: UPDATE accounts
Pool->>DB: forward the statement
DB-->>App: UPDATE 1
App->>Pool: COMMIT
Pool->>DB: COMMIT
Note over Pool,DB: transaction pooling returns the connection after COMMIT
```
sequenceDiagram
autonumber
participant App as Application
participant Pool as PgBouncer
participant DB as PostgreSQL
App->>Pool: BEGIN
Pool->>DB: borrow a server connection
App->>Pool: UPDATE accounts
Pool->>DB: forward the statement
DB-->>App: UPDATE 1
App->>Pool: COMMIT
Pool->>DB: COMMIT
Note over Pool,DB: transaction pooling returns the connection after COMMIT
Gantt charts
gantt draws intervals on a time axis. This chart shows the five years of
community support each PostgreSQL major version receives from its release
date; 1825d is five years.
Source
```mermaid
gantt
title Five-year community support per PostgreSQL major version
dateFormat YYYY-MM-DD
axisFormat %Y
section PG 15
released 2022-10-13 :2022-10-13, 1825d
section PG 16
released 2023-09-14 :2023-09-14, 1825d
section PG 17
released 2024-09-26 :2024-09-26, 1825d
section PG 18
released 2025-09-25 :active, 2025-09-25, 1825d
```
gantt
title Five-year community support per PostgreSQL major version
dateFormat YYYY-MM-DD
axisFormat %Y
section PG 15
released 2022-10-13 :2022-10-13, 1825d
section PG 16
released 2023-09-14 :2023-09-14, 1825d
section PG 17
released 2024-09-26 :2024-09-26, 1825d
section PG 18
released 2025-09-25 :active, 2025-09-25, 1825d
Class and ER diagrams
Use classDiagram for types, their members and how they relate, and
erDiagram for entities and cardinality; both explain a data model faster
than a paragraph can.
Source
```mermaid
classDiagram
class Cluster {
+string name
+int port
+failover()
}
class Instance {
+string host
+string role
+promote()
}
class Database {
+string name
+string owner
+backup()
}
Cluster "1" --> "1..*" Instance : runs on
Cluster "1" --> "0..*" Database : hosts
```
classDiagram
class Cluster {
+string name
+int port
+failover()
}
class Instance {
+string host
+string role
+promote()
}
class Database {
+string name
+string owner
+backup()
}
Cluster "1" --> "1..*" Instance : runs on
Cluster "1" --> "0..*" Database : hosts
Source
```mermaid
erDiagram
pg_database ||--o{ pg_namespace : "contains schemas"
pg_namespace ||--o{ pg_class : "contains relations"
pg_class ||--o{ pg_attribute : "has columns"
pg_class ||--o{ pg_index : "is indexed by"
pg_class {
oid oid PK
name relname
char relkind
}
pg_attribute {
oid attrelid FK
name attname
smallint attnum
}
```
erDiagram
pg_database ||--o{ pg_namespace : "contains schemas"
pg_namespace ||--o{ pg_class : "contains relations"
pg_class ||--o{ pg_attribute : "has columns"
pg_class ||--o{ pg_index : "is indexed by"
pg_class {
oid oid PK
name relname
char relkind
}
pg_attribute {
oid attrelid FK
name attname
smallint attnum
}
State diagrams
stateDiagram-v2 shows states and the events that move between them, here the
roles a PostgreSQL instance passes through in a high-availability cluster.
Source
```mermaid
stateDiagram-v2
[*] --> Provisioning
Provisioning --> Replica : base backup restored
Replica --> Primary : promoted after failover
Primary --> Replica : rejoined with pg_rewind
Replica --> Lagging : lag above 1 GB
Lagging --> Replica : caught up
Replica --> [*] : decommissioned
```
stateDiagram-v2
[*] --> Provisioning
Provisioning --> Replica : base backup restored
Replica --> Primary : promoted after failover
Primary --> Replica : rejoined with pg_rewind
Replica --> Lagging : lag above 1 GB
Lagging --> Replica : caught up
Replica --> [*] : decommissioned
Per-diagram title and configuration
Start the fence body with Mermaid’s own YAML header (it belongs to the diagram,
not to Hugo’s front matter). title captions the diagram, and config
overrides Mermaid settings for this diagram alone. Leave config.theme out:
a diagram that sets it no longer follows the reader’s light or dark mode.
Source
```mermaid
---
title: Choosing a restore source
config:
flowchart:
curve: linear
---
flowchart TD
Loss[Data lost] --> When{Restore to when?}
When -->|latest state| Promote[Promote a replica]
When -->|a point in time| PITR[Base backup plus WAL replay]
When -->|one table| Dump[Restore that table from pg_dump]
```
---
title: Choosing a restore source
config:
flowchart:
curve: linear
---
flowchart TD
Loss[Data lost] --> When{Restore to when?}
When -->|latest state| Promote[Promote a replica]
When -->|a point in time| PITR[Base backup plus WAL replay]
When -->|one table| Dump[Restore that table from pg_dump]
Light and dark
Diagrams follow the reader’s color scheme: dark mode draws them with Mermaid’s
dark theme, light mode with the theme your site configures. Switching
redraws them in place without a reload, and each diagram keeps its height
while it redraws, so the text around it does not jump.
Set site-wide defaults under params.mermaid in lowercase; the theme matches
each key back to Mermaid’s own casing.
The tab attribute that groups adjacent code fences into tabs does not apply
to mermaid fences. To let readers switch between two diagrams, put them in
the tabs shortcode.
A step of the {{% steps %}} shortcode is ordinary page Markdown, so it can
hold a mermaid fence too; see Steps.
Enlarging a diagram
Each diagram has a corner button that opens it in a viewer, the same one local
PlantUML diagrams use. The viewer reuses the
drawing already on the page instead of rendering it again. Drag or use the
arrow keys to pan; use the wheel, a pinch, + or - to zoom; choose Fit to
window or press 0 to see the whole diagram; press Esc to close it and
return focus to the button. A very wide diagram opens at its natural size so
its labels stay readable, controls keep a touch-friendly size on phones, a
color-scheme change keeps your place, and nothing animates when the reader
prefers reduced motion.
Source shows the original text and Copy code copies it with arrows,
quotes, ampersands and non-Latin text intact. Download SVG saves a styled,
self-contained image; a diagram that depends on external images or styles
cannot be exported, and a failed copy or export says so. The source disclosure
under each diagram can be opened and copied as well.
Loading and output
A diagram renders once it is visible and within 320px of the viewport, so a
long page does not pay for diagrams the reader never reaches. Diagrams share
one engine and render one at a time. A diagram in a hidden tab, a closed
disclosure or a zero-width container waits until it is shown, and browsers
without IntersectionObserver fall back to scroll and resize checks. Pages
without diagrams load neither the engine nor the viewer.
When JavaScript is off, the engine is blocked or the diagram has a syntax
error, the reader sees the source instead. Printing a page from the browser
scales finished light-mode diagrams to the paper; dark-mode and not yet
rendered diagrams print as black-on-white source. To print pictures
throughout, switch to light mode and scroll through the diagrams you need,
opening any tabs or disclosures that hold them, before you print. Printing
leaves the reader’s appearance setting untouched. The site’s Print view, the
Markdown output and RSS always carry the source.
Parameter reference
Site parameters (hugo.yml):
params.mermaid, map, defaultunset
The whole map is passed to Mermaid’s initialize(); write keys in lowercase and the theme matches them back to Mermaid’s casing; keys absent from Mermaid’s default config are dropped silently
params.mermaid.theme, string, defaultdefault
The light-mode theme; dark mode always uses dark. Unless set, layout: dagre and look: classic are pinned as well
Settings for one diagram (title, config) go in the YAML header at the
start of the fence body; they are Mermaid keys, not theme parameters.
Fence attributes accept only class, data-* and aria-*, which land on the
diagram’s <figure> for site CSS. Any other key, such as height or align,
warns and is ignored: the diagram’s own content and the column width set its
size, and it is always centered.
Limits
A diagram is inline SVG rather than an <img>, so {#id num=} numbering
does not apply. To number one, export it as an image and use
image numbering.
To change a diagram’s width, change the diagram itself (flowchart direction,
class-diagram layout) or style its class in site CSS.
Hugo does not parse Mermaid, so a syntax error does not fail the build. The
page shows an alert and the source instead of the diagram, so open each
changed diagram in a browser before you publish.
Print, Markdown and RSS carry source rather than pictures, so state the
conclusion in prose as well as in the diagram.
Related
PlantUML — UML diagrams, rendered locally or by a server you run
Render sequence, class, component, activity and use-case diagrams in the browser with bundled assets and no rendering service.
PlantUML is the text format many teams already use for UML: sequence, class,
component, activity and use-case diagrams. A plantuml fence renders it in
one of two ways, and you choose by what the diagrams need:
Local mode, the default, renders in the reader’s browser with two
scripts that ship with the theme. It needs no Java, Graphviz, npm package,
CDN or rendering service, and the diagram source never leaves the browser.
Server mode sends each diagram to a PlantUML server you run, which you
need only for features the browser bundle lacks, such as !include or the C4
library. It requires an endpoint that you configure explicitly; OINK names
none.
Shortest form
PlantUML is off by default. Turn it on without an endpoint to get local mode:
hugo.yml
params:plantuml:true
plantuml: { enable: true } is equivalent. Pages without a plantuml fence
load neither engine script. Then write the diagram in a fence:
Source
```plantuml
@startuml
actor Operator
participant Patroni
database PostgreSQL
Operator -> Patroni : switch over to replica-2
Patroni -> PostgreSQL : demote the old primary
Patroni -> PostgreSQL : promote replica-2
Patroni --> Operator : switchover complete
@enduml
```
@startuml
actor Operator
participant Patroni
database PostgreSQL
Operator -> Patroni : switch over to replica-2
Patroni -> PostgreSQL : demote the old primary
Patroni -> PostgreSQL : promote replica-2
Patroni --> Operator : switchover complete
@enduml
The fence may leave out @startuml and @enduml; local mode adds them.
Class diagram
Declare classes with their fields, then the relationships and their
cardinalities.
@startuml
class Publication {
+ pubname : name
+ puballtables : bool
+ pubinsert / pubupdate / pubdelete : bool
}
class Subscription {
+ subname : name
+ subconninfo : text
+ subslotname : name
}
class ReplicationSlot {
+ slot_name : name
+ plugin : name
+ confirmed_flush_lsn : pg_lsn
}
Publication "1" -- "0..*" Subscription : subscribed by
Subscription "1" -- "1" ReplicationSlot : bound to
@enduml
Component diagram
Packages group components, and arrows show which one depends on which.
@startuml
package "Monitoring node" {
[Grafana] as grafana
[Prometheus] as prom
[Alertmanager] as alert
}
package "Database node" {
[node_exporter] as node
[pg_exporter] as pgexp
[PostgreSQL] as pg
}
pg --> pgexp : query the statistics views
node --> prom : /metrics
pgexp --> prom : /metrics
prom --> alert : rule fired
grafana --> prom : PromQL
@enduml
Activity diagram
Decisions and branches lay out a workflow, such as a backup verification job.
@startuml
start
:take a base backup;
:restore it on a scratch host;
if (restore succeeded?) then (yes)
:run the smoke queries;
else (no)
:page the on-call engineer;
stop
endif
if (row counts match?) then (yes)
:mark the backup verified;
stop
else (no)
:open an incident;
stop
endif
@enduml
Use-case diagram
Actors and use cases show what each kind of user can do with a system.
@startuml
left to right direction
actor Reader as reader
actor Author as author
actor Maintainer as maintainer
rectangle "Documentation site" {
reader --> (full-text search)
reader --> (switch language)
reader --> (export the print view)
author --> (add a page)
author --> (preview locally)
maintainer --> (upgrade the theme)
maintainer --> (publish)
}
@enduml
Dark mode
In local mode, diagrams follow the reader’s light or dark mode, and any
skinparam settings you write still apply. A mode change discards renders
that are no longer current, and an open viewer keeps its zoom and position.
Enlarge, source and download
In local mode each diagram has a corner button that opens
the same viewer as Mermaid: drag or use the
arrow keys to pan; use the wheel, a pinch, + or - to zoom; choose Fit to
window or press 0 to see it all; and press Esc to close it and return
focus to the button. The viewer reuses the image already on the page instead
of rendering again.
Source and Copy code keep arrows, quotes, ampersands and non-Latin
text intact. Download SVG saves a styled, self-contained file; a diagram
that depends on external resources cannot be exported, and a failure shows a
message in the toolbar. The source disclosure under each diagram can be opened
and copied too. Server mode shows the image your server returns, without the
viewer.
Optional rendering service
Switch to server mode when your diagrams need what the browser bundle lacks
(see Limits) and you run a PlantUML server:
A nonempty svg_image_url selects server mode; delete it, or leave it empty,
to return to local mode. The theme appends each encoded diagram to this URL,
so it must end with the path separator your server expects, usually /. It
must be an HTTP(S) URL with a host, or a same-site path. An invalid endpoint
warns and turns PlantUML rendering off instead of silently switching to local
mode.
Server mode sends each diagram’s encoded source to that endpoint, so use a
server you trust with the content. svg: true inlines the returned SVG
instead of showing an image. Local mode ignores svg and always shows the
diagram as an image, so links and markup inside it never enter the page.
Loading and output
In local mode, the two engine scripts load once per page, when the first
diagram comes within 320px of the viewport. A diagram in a hidden tab, a
closed disclosure or a zero-width container waits until it is shown, and
browsers without IntersectionObserver fall back to scroll and resize checks.
Mermaid and PlantUML diagrams render one at a time on the main thread.
When JavaScript is off, the engine fails to download, or a diagram uses
unsupported input or fails to render, the source stays readable, and the
other diagrams on the page still render. Printing from the browser keeps
rendered diagrams, scaled to the paper, and prints source for those not yet
rendered; it cannot wait for the engines, so scroll through the diagrams you
need, opening any tabs or disclosures that hold them, before you print. The
site’s Print view, the Markdown output and RSS carry the original source and
make no rendering request.
Server endpoint; a nonempty value selects server mode
params.plantuml.svg, boolean, defaultfalse
Server mode only: inline SVG instead of an image
The fence takes none of the code-block attributes (title, copy, line numbers,
numbering, zoom); they warn and are ignored.
Limits
The browser bundle contains the core engine and Graphviz layout only, so
!include, !includeurl, external themes, C4, AWS and the other optional
sprite libraries are not available. A diagram that uses them stays as
source. Make it self-contained, use a pre-rendered
image, or switch to server mode.
The engine is @plantuml/core 1.2026.10 with Viz.js 3.31.0. The two scripts
total about 4.6 MB, or 1.5 MB gzipped; they load only when a diagram
approaches the viewport, and normal HTTP caching applies.
Local rendering uses JavaScript and WebAssembly. A site with a strict
Content Security Policy must allow its own scripts, wasm-unsafe-eval for
WebAssembly compilation, and blob: images; when any of these is blocked,
diagrams stay as source.
Large diagrams cost the reader’s CPU and memory, and rendering runs on the
main thread rather than in a worker. If the engine hits a timeout it cannot
cancel, the remaining PlantUML diagrams on the page stay as source until the
page is reloaded.
Diagrams are images, so links inside them are not clickable, and they cannot
be numbered.
Publish a Draw.io export as an ordinary image that readers can open in the Draw.io editor, change and download.
A diagram exported from Draw.io can carry its own source. Put such an export
in a page as an ordinary Markdown image and the theme adds an edit button that
opens it in the Draw.io editor, so a reader or a teammate can change the
diagram and download the result instead of redrawing it from a screenshot.
There is no fence or shortcode: the only requirement is that you tick
“Include a copy of my diagram” when you export the SVG or PNG. A diagram that
only needs to be looked at is an ordinary image.
Shortest form
The edit button appears once the site sets params.drawio.enable: true and
an editor address in params.drawio.drawio_server, as shown under
The editor address. Until then, every diagram is shown as a plain
image.
Write the diagram like any image. The .drawio.svg name is a convention that
helps you find the editable files; the theme does not look at the name.
Source

{width="620" height="140"}
A pencil button appears at the bottom right of the diagram when the pointer is
over it or keyboard focus reaches it; on touch screens and in forced-colors
mode it is always visible. The button opens the configured editor over the
whole page. When image zoom is also on, Edit
and Zoom are two separate buttons, and Edit never opens the zoom dialog.
How the copy is detected
What decides is the content of the file: an export with an embedded Draw.io
copy gets the button, and any other image does not. This hand-drawn SVG uses
the same syntax and attribute line as the diagram above, but it carries no
copy, so it has no button:
Source

{width="620" height="140"}
With a caption
A Draw.io diagram is rendered by the ordinary image hook, so every
image attribute applies. Add caption for a
captioned figure; the edit button stays on the image.
Source

{caption="Content, configuration and theme templates flow into Hugo and out as public/" width="620" height="140"}
Content, configuration and theme templates flow into Hugo and out as public/
As a numbered figure
Add {#id num=…} to make it a numbered figure that xref can refer to and
that appears in the list of figures:
Source

{#fig_pipeline num="1-1" caption="From content to a static site" width="620" height="140"}
Figure 1-1From content to a static site
Publishing books has the complete numbering and
cross-reference rules.
SVG or PNG
Both work. A PNG export keeps the editable copy in a text chunk of the image,
and the button appears the same way:
Source

{width="620" height="140"}
Prefer SVG for documentation: it stays sharp at any size, its labels are real
text that search and screen readers can read, and its diffs are readable in
review. Choose PNG for a very complex diagram or for a platform without SVG
support. Hugo’s image processing works only on PNG; processing an SVG warns
and keeps the original file.
What the button does
Edit hands the diagram to the editor and gives the reader a file back;
nothing on the site changes.
The editor opens over the page
A full-screen dialog opens with the Draw.io editor inside it and a Close
button in the reader’s language. Keyboard focus stays inside the dialog.
Close it with that button, by clicking the background, or with Escape while
focus is outside the editor, which handles its own keys. Focus then returns to
the Edit button.
The diagram goes straight to the editor
When the editor is ready, the reader’s browser hands it the image together
with its embedded copy. The diagram does not pass through your web server.
Saving downloads a new file
Save in the editor, and the browser downloads the diagram in its original
format, SVG or PNG, under the original file name. Nothing is written back to
the site: to publish the change, replace the file in content/ with the
download and commit it.
The button lets readers take a diagram away and change it; it is not an
online editor for the site.
enable: true without drawio_server warns and leaves editing off. The
theme never picks a public service for you.
The address must be an http(s) URL or a local path; a local path follows
the deployment subpath in baseURL. Whitespace, control characters,
backslashes, protocol-relative URLs (//host/) and other schemes warn and
turn editing off.
Query parameters and a fragment in the address, such as ?lang=en, are
kept, and the theme adds Draw.io’s embed-mode parameters (embed=1,
proto=json and others).
When diagrams must not leave your organization, run a
self-hosted editor and point the
address at it.
The public editor https://embed.diagrams.net/ works too, but the reader’s
diagram is then opened in a third-party page.
The diagram appears as an ordinary image in print, RSS and the page’s
Markdown output; only the HTML page gets the edit button.
Parameter reference
Draw.io has no parameters of its own on the page. The attribute line is the
one from Images: caption, width, height,
link, #id, num, command and options.
Site parameters (hugo.yml):
params.drawio.enable, bool, defaultfalse
With it off no script loads and an image is just an image
params.drawio.drawio_server, string, defaultnone
The editor address; required when enable: true
Limits
The edit check runs only on pages with PNG or SVG images, and it reads each
distinct image address once to look for an embedded copy.
An export made without “Include a copy of my diagram” has no copy, so it
gets no button.
Editing needs the editor to be reachable. Offline, diagrams display
normally but the editor cannot load.
Saving only downloads a file; replacing it in the repository and committing
is up to you.
An exported SVG has fixed colors that do not follow light and dark mode.
Use none fills and neutral gray lines and text, as the diagrams on this
page do, so that the diagram reads well in both.
Related
Images — captions, numbering, sizing and zoom in full
PlantUML — UML diagrams; see its rendering modes and version requirements
Mermaid — diagrams from text with no server at all
Configuration — the full definition of params.drawio.*
4.13 - ECharts
Draw bar, line and pie charts by writing ECharts options as YAML or JSON in an echarts fence, with colors that follow light and dark mode.
An echarts fence draws a chart with axes, series and a legend: table sizes,
release timelines, the share of each category in a total. You describe the
chart as an ECharts option object in YAML or JSON, so the fence holds data,
not code, and the numbers sit in your Markdown where a diff shows every change.
Hugo checks the options while it builds, the theme’s bundled copy of ECharts
draws the chart in the reader’s browser, and the colors follow light and dark
mode. There is nothing to configure, and pages without a chart load nothing.
For relationships and flows, use Mermaid; for
order and hierarchy, use Infographic.
Shortest form
A bar chart needs xAxis, yAxis and series. This one shows the size of six
tables in an application database:
YAML and JSON both work; YAML is shorter because it needs no quotes or
commas. If the options do not parse, or parse to a list instead of a mapping,
the build warns with the source line and the page shows your source instead
of an empty chart.
Multiple line series
series is a list, with one entry per line, and legend lets readers hide a
line by clicking its name. This chart shows when each PostgreSQL major version
was released and when the community’s five-year support ends:
Source
```echarts {height="360px"}
tooltip:
trigger: axis
legend:
data: [Released, End of support]
grid:
left: 56
right: 24
top: 48
bottom: 40
xAxis:
type: category
name: major version
data: ["9.6", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
yAxis:
type: value
min: 2015
max: 2031
name: year
series:
- name: Released
type: line
smooth: false
data: [2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025]
- name: End of support
type: line
lineStyle:
type: dashed
data: [2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030]
```
tooltip:
trigger: axis
legend:
data: [Released, End of support]
grid:
left: 56
right: 24
top: 48
bottom: 40
xAxis:
type: category
name: major version
data: ["9.6", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
yAxis:
type: value
min: 2015
max: 2031
name: year
series:
- name: Released
type: line
smooth: false
data: [2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025]
- name: End of support
type: line
lineStyle:
type: dashed
data: [2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030]
The version numbers are quoted because YAML reads a bare 10 or 9.6 as a
number, and labels on a category axis must be strings.
Pie and doughnut charts
Give radius two values to cut a hole in a pie and get a doughnut. This one
groups OINK’s 29 shortcodes by purpose:
{b}, {c} and {d} are ECharts placeholders for the name, the value and
the percentage. A formatter string with placeholders covers most labels and
tooltips without a function.
Height and full width
height defaults to 400px and accepts px, rem, em, vh, vw and %.
full=true lets the chart leave the reading column and use the whole content
area, which gives many data points or long labels room:
An invalid height such as 360 or 36pt warns and uses 400px.
Light and dark
Without theme, a chart takes the reader’s current color scheme and redraws
in place when the reader switches, without a reload; it also resizes with its
container. Switch this page to dark mode to watch the charts above change
their background and text.
A fixed theme keeps the same colors in both modes:
Source
```echarts {height="240px" theme="dark"}
xAxis:
type: category
data: [replica-1, replica-2, replica-3, replica-4]
yAxis:
type: value
name: lag (ms)
series:
- type: bar
data: [12, 8, 15, 9]
```
xAxis:
type: category
data: [replica-1, replica-2, replica-3, replica-4]
yAxis:
type: value
name: lag (ms)
series:
- type: bar
data: [12, 8, 15, 9]
dark is the only theme built into ECharts. Leave theme out unless your
brand requires fixed colors, so that charts match the rest of the page.
For a theme of your own, define it on window.OinkEchartsThemes under the name
the fence uses. ECharts loads only when the first chart comes on screen, so a
site script has no moment to call echarts.registerTheme() itself; instead
each chart registers every theme it finds there before it draws:
A theme is a plain object in ECharts’ theme format, such as the JSON its theme
builder exports. To offer it on every page, put the script in
layouts/_partials/hooks/body-end.html instead of a page. A name defined
nowhere draws with ECharts’ default colors and no warning, and an entry named
dark replaces the palette that charts without theme use in dark mode.
Callbacks with $fn:
A fence holds data and cannot contain JavaScript. When an option needs a
function, such as a tooltip that computes a share or a color that depends on
the value, write the string "$fn:name" in the options and register a
function under that name on window.OinkEchartsFunctions:
Hover over a bar to see the sentence the function builds. A name that is not
registered becomes undefined, and the chart draws as if the option were
missing, with no warning at build time or in the browser, so keep the script
next to the fence where both change together. The script is your site’s own
code: review it like any other, and on a site with a Content Security Policy
allow it as described under Deploy. Use a function
only when a formatter string with {b}, {c} and {d} cannot do the job.
Where the data lives
Hugo does not expand shortcodes, front matter values or data/ files inside a
fence, so the numbers are written in the fence itself. Two charts cannot share
one dataset this way, but each chart travels with its data and a diff shows
exactly which number changed.
Data that changes often, such as version matrices or download lists, should
not be a chart. Use a table, or the data/-driven
components of a release page.
Output
Print and RSS show the fence’s option source instead of a chart, and the
page’s Markdown output keeps the fence as written. Say what the chart shows in
the surrounding prose, so that those readers get the conclusion too.
Parameter reference
The fence attribute line (```echarts {…}):
height, CSS length, default400px
A non-negative number plus pxrememvhvw%; anything else warns and uses the default
theme, string, defaultunset
Pin an ECharts theme and stop following the site’s color scheme; dark is built in, other names come from window.OinkEchartsThemes
full, bool, defaultfalse
true drops the reading-column limit and fills the content area; a value other than true or false warns and uses false
class, space-separated classes, default—
Passed through to the container for site CSS
Unknown attributes warn and are ignored; Hugo takes style as a highlighting
option and strips on*, so both are ignored without a warning. An empty
fence warns and renders nothing. The option keys themselves belong to ECharts
and are listed in its option manual.
ECharts has no site-level setting in hugo.yml.
Limits
A fence cannot contain JavaScript; functions go through $fn: and themes
through window.OinkEchartsThemes, and a name that is not registered fails
silently.
A fence cannot read data/, front matter or shortcodes; the numbers must be
in the fence.
Quote category values such as 10, 9.6, on and yes, which YAML would
otherwise turn into numbers or booleans.
Do not rely on color alone to tell series apart. Vary the line style or
marker shape as well, and check the legend’s contrast in both color schemes.
Code blocks — the general rules for fence attribute lines
4.14 - Infographic
Turn a title and a short list of items into a flow, timeline, funnel, grid or hierarchy graphic with an infographic fence and an AntV template.
An infographic turns a short list into a picture of its structure: three
steps in a row, five years on a timeline, stages that narrow like a funnel, a
two-level hierarchy. You write the title and the items as plain data in an
infographic fence, name one of the AntV templates on the first line, and the
browser draws it; on GitHub the fence stays readable as text.
Reach for an infographic when the shape of the information is the message.
When readers need axes and exact numbers, use ECharts;
for a flow with conditions and branches, use Mermaid.
Shortest form
The first line is infographic <template>, followed by a data block with a
title and an items list in which every item has at least a label.
Source
```infographic
infographic list-row-simple-horizontal-arrow
data
title Upgrading to a new PostgreSQL major version
items
- label Back up
desc Take a base backup and prove it restores
- label Upgrade
desc Run pg_upgrade on a replica first
- label Switch over
desc Promote the upgraded node, retire the old one
```
infographic list-row-simple-horizontal-arrow
data
title Upgrading to a new PostgreSQL major version
items
- label Back up
desc Take a base backup and prove it restores
- label Upgrade
desc Run pg_upgrade on a replica first
- label Switch over
desc Promote the upgraded node, retire the old one
Indentation defines the structure, two spaces per level. Keep labels to a word
or two and put the explanation in desc, because long labels get squeezed or
cut off on a phone.
Timelines
The sequence-timeline-* templates place items along a time axis: label is
the point in time and desc the event.
Source
```infographic {height="420px"}
infographic sequence-timeline-simple
data
title The last five PostgreSQL major versions
items
- label 2021
desc 14: another round of parallel query and logical replication work
- label 2022
desc 15: the MERGE statement
- label 2023
desc 16: logical replication from a standby
- label 2024
desc 17: incremental backup and JSON_TABLE
- label 2025
desc 18: the asynchronous IO subsystem
```
infographic sequence-timeline-simple
data
title The last five PostgreSQL major versions
items
- label 2021
desc 14: another round of parallel query and logical replication work
- label 2022
desc 15: the MERGE statement
- label 2023
desc 16: logical replication from a standby
- label 2024
desc 17: incremental backup and JSON_TABLE
- label 2025
desc 18: the asynchronous IO subsystem
Funnels
sequence-funnel-simple draws stages that narrow, such as the path from a
first visit to production use.
Source
```infographic {height="420px"}
infographic sequence-funnel-simple
data
title From first visit to production
items
- label Visited
desc Landed on any page of the site
- label Read Get started
desc Opened the tutorial
- label Installed
desc Ran the installer on a test machine
- label First cluster
desc Created a cluster and connected to it
- label In production
desc Serves real traffic
```
infographic sequence-funnel-simple
data
title From first visit to production
items
- label Visited
desc Landed on any page of the site
- label Read Get started
desc Opened the tutorial
- label Installed
desc Ran the installer on a test machine
- label First cluster
desc Created a cluster and connected to it
- label In production
desc Serves real traffic
Grid cards
When the items have no order, list-grid-* lays them out as a grid of cards
instead of a sequence. A desc under data adds a subtitle.
Source
```infographic {height="380px"}
infographic list-grid-compact-card
data
title Four ways to install
desc Pick the one that matches how you already run servers
items
- label Packages
desc RPM and DEB from the project repository
- label Containers
desc One image per major version
- label Ansible
desc Playbooks that build whole clusters
- label Source
desc Build with your own flags
```
infographic list-grid-compact-card
data
title Four ways to install
desc Pick the one that matches how you already run servers
items
- label Packages
desc RPM and DEB from the project repository
- label Containers
desc One image per major version
- label Ansible
desc Playbooks that build whole clusters
- label Source
desc Build with your own flags
Items with values
Templates that show proportions, such as pies, doughnuts and progress
displays, read a value on each item.
Source
```infographic {height="400px"}
infographic chart-pie-donut-plain-text
data
title Where a 200 GB database's disk goes
items
- label Tables
value 120
- label Indexes
value 50
- label WAL
value 20
- label Temporary files
value 10
```
infographic chart-pie-donut-plain-text
data
title Where a 200 GB database's disk goes
items
- label Tables
value 120
- label Indexes
value 50
- label WAL
value 20
- label Temporary files
value 10
Hierarchy and hand-drawn style
Nest items with children, and a hierarchy-mindmap-* template draws two
levels of structure. A top-level theme block changes the look of the whole
graphic; its type is light, dark or hand-drawn.
Source
```infographic {height="320px"}
infographic hierarchy-mindmap-level-gradient-compact-card
theme
type hand-drawn
data
root
label Hugo site
children
- label content
desc pages
children
- label docs
desc documentation
- label blog
desc articles
- label assets
desc build inputs
children
- label css
desc site styles
- label images
desc processed images
- label parts
desc shared fragments
```
infographic hierarchy-mindmap-level-gradient-compact-card
theme
type hand-drawn
data
root
label Hugo site
children
- label content
desc pages
children
- label docs
desc documentation
- label blog
desc articles
- label assets
desc build inputs
children
- label css
desc site styles
- label images
desc processed images
- label parts
desc shared fragments
Each graphic sits on its own canvas, which does not follow the site’s light or
dark mode. The default and hand-drawn styles use a white canvas, a background
you set in the DSL wins, and a type dark graphic stays dark even on a light
page. Switching the site’s mode leaves the graphic exactly as drawn, so if you
set a transparent background or your own text colors, check the contrast in
both modes.
Picking a template
Template names read structure-variant, and each structure comes in several
visual variants. The common families:
Structure prefix
What it expresses
Example
list-row-*list-column-*
Items in a row or a column
list-row-simple-horizontal-arrow
list-grid-*
A grid, no order between items
list-grid-compact-cardlist-grid-badge-card
list-pyramid-*sequence-funnel-*
Narrowing stages
sequence-funnel-simple
sequence-timeline-*sequence-roadmap-vertical-*
Timelines and roadmaps
sequence-timeline-simple
sequence-steps-*sequence-snake-steps-*
Ordered steps
sequence-steps-simple
compare-binary-horizontal-*compare-quadrant-*
Binary comparison and quadrants
compare-binary-horizontal-simple-vs
hierarchy-mindmap-*hierarchy-structure-*
Hierarchy, with children
hierarchy-mindmap-level-gradient-compact-card
chart-pie-*chart-bar-*chart-column-*
Illustrative charts, with value
chart-pie-donut-plain-text
relation-network-*relation-dagre-flow
Networks and flows, with relations
relation-dagre-flow
Pick the simplest form that shows the relationship. The
AntV Infographic gallery shows every
template; the names match the version bundled with the theme.
Output
On the web the theme’s bundled AntV runtime draws the graphic as SVG when the
reader scrolls near it, so a page with several graphics stays fast. Print and
RSS draw nothing and show the DSL source in a <pre> block instead, so state
the conclusion in the surrounding prose; the page’s Markdown output keeps the
fence as written.
Parameter reference
The fence attribute line (```infographic {…}):
height, auto or a CSS length, defaultauto
A non-negative number plus pxrememvhvw%; anything else warns and uses auto
full, bool, defaultfalse
true drops the reading-column limit
class, space-separated classes, default—
Passed through to the container
Unknown attributes warn and are ignored; Hugo takes style as a highlighting
option and strips on*, so both are ignored without a warning. An empty fence
warns and renders nothing.
The top-level DSL keys, defined by AntV:
infographic / template
The template name, on the first line
data
title, desc, items (or sequences, compares, nodes, values, relations, root, depending on the structure), order
theme
type (light / dark / hand-drawn), palette, colorPrimary, stylize …
width / height
Canvas size at the DSL level; usually left to the fence’s height
design
Per-part tuning; rarely needed
Each entry under items accepts label, desc, value, icon, children,
group and id. The AntV Infographic documentation
defines the full DSL; the theme’s VENDOR.json records the bundled version and
its checksum.
Limits
A misspelled template name does not fail the build, because Hugo checks only
the fence attributes and the DSL is parsed in the browser. The graphic area
shows an error line instead, so look at the page after changing a template.
SVG carries no semantic structure, and screen readers may not read the items
in visual order. When a heading, a list or a table can say the same thing,
prefer it.
Long labels are squeezed or cut off on narrow screens; check the page at
phone width after editing.
Use a markmap fence for an expandable mind map with zoom controls. Its source remains a readable Markdown outline.
A mind map shows the shape of a topic at a glance: what a guide covers, how a
system breaks down, which checks belong together. A markmap fence draws one
from an ordinary Markdown outline, so the source stays a readable list on
GitHub, in print and in feeds, while readers on the site can fold branches,
zoom and pan. When the relationships have a direction or a condition (this
calls that, retry if it fails), draw a Mermaid
flowchart instead.
Shortest form
Markmap is off by default, so turn it on in the site configuration. Until you
do, the fence stays a plain code block and no map script loads.
hugo.yml
params:markmap:true
Then write the outline in a markmap fence:
Source
```markmap
# Backup strategy
## Physical backups
- full and incremental with pgBackRest
- continuous WAL archiving
## Logical backups
- pg_dump per database
- restore into a scratch instance
## Verification
- weekly restore drill
- checksum every backup
```
# Backup strategy
## Physical backups
- full and incremental with pgBackRest
- continuous WAL archiving
## Logical backups
- pg_dump per database
- restore into a scratch instance
## Verification
- weekly restore drill
- checksum every backup
The first heading is the root, and the other headings and list items hang
below it by level. Click the dot on a node to fold or unfold its branch, scroll
to zoom, and drag to pan. The map refits itself whenever the column changes
width until you drag or zoom; after that it keeps your position, and the
bottom-right icon controls let you Fit to window (showing the whole outline
again and resuming automatic refitting) or Download SVG. Both controls work
from the keyboard and are hidden in print.
Depth
Use as many heading and list levels as the topic needs; the map lays them out
and scales the tree to fit.
Source
```markmap
# Operations handbook
## Install
### Requirements
### Single node
### Three-node cluster
## Configure
### Connection pooling
### Memory and WAL
### Access control
## Monitor
### Dashboards
### Alert rules
## Back up and restore
### Full and incremental backups
### Point-in-time recovery
### Restore drills
## Upgrade
### Minor versions
### Major versions with pg_upgrade
```
# Operations handbook
## Install
### Requirements
### Single node
### Three-node cluster
## Configure
### Connection pooling
### Memory and WAL
### Access control
## Monitor
### Dashboards
### Alert rules
## Back up and restore
### Full and incremental backups
### Point-in-time recovery
### Restore drills
## Upgrade
### Minor versions
### Major versions with pg_upgrade
Links, code and emphasis
Node text accepts inline Markdown: links are clickable and keep their text as
the accessible name, inline code is monospaced, and bold and italic work as
usual.
Source
```markmap
# Everyday commands
## Preview
- `hugo server` — open [localhost:1313](http://localhost:1313/)
- `hugo server -D` — **including drafts**
## Build
- `hugo --printPathWarnings`
- `hugo --gc --minify` — for publishing
## Theme
- `hugo mod get -u github.com/pgsty/oink`
- [theme repository](https://github.com/pgsty/oink)
- [site source](https://github.com/pgsty/oink.pgsty.com)
```
# Everyday commands
## Preview
- `hugo server` — open [localhost:1313](http://localhost:1313/)
- `hugo server -D` — **including drafts**
## Build
- `hugo --printPathWarnings`
- `hugo --gc --minify` — for publishing
## Theme
- `hugo mod get -u github.com/pgsty/oink`
- [theme repository](https://github.com/pgsty/oink)
- [site source](https://github.com/pgsty/oink.pgsty.com)
A paragraph, table or fenced code block under a heading or list item becomes
that node’s note. The node shows a marker; clicking it, or pressing Enter or
Space after tabbing to it, opens the note, and Escape closes it and returns
focus to the marker.
Mathematics in nodes
Write $…$ in a node for a formula. Maps typeset these with MathJax, which
ships with the theme and loads only for maps that contain math; formulas in
ordinary page text still use KaTeX.
Source
```markmap
# PostgreSQL metrics worth watching
## Cache hit ratio
- $\frac{blks\_hit}{blks\_hit + blks\_read}$
- below 0.99, look at shared_buffers
## Replication lag
- $lsn_{primary} - lsn_{replica}$
## Transaction throughput
- $TPS = \frac{\Delta xact\_commit}{\Delta t}$
```
# PostgreSQL metrics worth watching
## Cache hit ratio
- $\frac{blks\_hit}{blks\_hit + blks\_read}$
- below 0.99, look at shared_buffers
## Replication lag
- $lsn_{primary} - lsn_{replica}$
## Transaction throughput
- $TPS = \frac{\Delta xact\_commit}{\Delta t}$
Controlling the initial depth
A large map is easier to read when it opens folded. Start the fence body with a
Markmap YAML header (it belongs to the map, not to Hugo’s front matter):
foldLevel: 1 shows the root and its direct branches and folds everything
deeper, so readers open only the branches they care about. colorDepth sets
the level from which each branch keeps a single color.
Source
```markmap
---
markmap:
foldLevel: 1
colorDepth: 2
---
# Incident runbook
## Primary is down
### Confirm from two monitors
### Promote the replica
### Repoint the connection pooler
## Replication lag
### Look for long-running queries
### Check network throughput
## Disk almost full
### Remove expired WAL archives
### Extend the volume
## Slow queries
### Read pg_stat_statements
### Look for missing indexes
```
---
markmap:
foldLevel: 1
colorDepth: 2
---
# Incident runbook
## Primary is down
### Confirm from two monitors
### Promote the replica
### Repoint the connection pooler
## Replication lag
### Look for long-running queries
### Check network throughput
## Disk almost full
### Remove expired WAL archives
### Extend the volume
## Slow queries
### Read pg_stat_statements
### Look for missing indexes
Folded into a disclosure
Every map is 300 pixels tall, so a few in a row push the prose apart. Put a
large overview that only some readers need in a > [!DETAILS] disclosure;
every line inside it, fence lines included, starts with >.
Source
> [!DETAILS] Everything the monitoring stack collects
> ```markmap
> # Metrics
> ## Host
> - CPU, memory and disk
> - network throughput
> ## PostgreSQL
> - connections and locks
> - replication lag
> - cache hit ratio
> ## Connection pooler
> - client and server connections
> - wait time
> ## Backups
> - last successful backup
> - WAL archive delay
> ```
Everything the monitoring stack collects
# Metrics
## Host
- CPU, memory and disk
- network throughput
## PostgreSQL
- connections and locks
- replication lag
- cache hit ratio
## Connection pooler
- client and server connections
- wait time
## Backups
- last successful backup
- WAL archive delay
Output
A map is drawn when the reader scrolls near it; until then, and wherever
JavaScript is off or the engine fails to load, the page shows the outline
source, so the whole hierarchy stays readable. Print, the Markdown output and
RSS always carry the outline as written.
Parameter reference
Site parameter (hugo.yml):
params.markmap, bool, defaultfalse
With it off, the fence stays a code block and no runtime loads
Options for a single map, such as foldLevel, colorDepth and wrapWidth,
go in the markmap: YAML header at the start of the fence body. They are
Markmap 1 options; the Markmap documentation
lists them all. Fence attributes do not change the map: its width fills the
reading column and its height is fixed at 300px.
Limits
The 300px height comes from one theme rule, .markmap > svg, and a fence
cannot change it. For a deep outline, fold it with foldLevel or split it
into two maps. The map is inline SVG, so {#id num=} numbering and image
zoom do not apply.
Node text follows the site’s text color, but the branch lines keep Markmap’s
own palette. If your site changes colors, check maps in both light and dark
mode.
Characters such as >, & and quotes display as written. HTML tags in a
node are dropped, except image tags and Markmap’s magic comments.
If a map, a note or its math fails to load, that map falls back to its
outline source and the other maps on the page keep working.
Older option names
If a map’s YAML header uses one of the option names on the left, rename it. The
old name is ignored and the build warns about it.
Older option
Current option
initialExpandLevel: N
foldLevel: N-1 for a positive N; delete it if N is -1
maxWidth
wrapWidth
spacingHorizontal
levelGap
spacingVertical
siblingGap
colorFreezeLevel
colorDepth
foldLevel counts the root as depth 0, which is why the value drops by one.
paddingX, lineWidth, extraJs, extraCss, embedAssets, htmlParser
and activeNode no longer exist; delete them, because a map cannot inject its
own scripts or styles.
Draw an annotated directory tree in a filetree fence, with aligned comments, per-entry icons and collapsible directories.
A file tree explains a directory layout one entry at a time: where the
configuration lives, which directory holds data, what a reader may delete. You
write it in a filetree fence, where indentation sets the depth, a trailing
/ marks a directory and the text after # is a comment. The theme lines the
comments up in their own column and turns directories into folders that
readers can open and close.
A file tree shows the part of a layout that matters and says why. When readers
need to copy the exact listing, use an ordinary code block
instead.
The bullets (-, * or +) are optional and change nothing. An entry with
children is a directory; an entry without children is a directory only when
its name ends in /.
Adding comments
Everything after the first # that follows whitespace is a comment, shown in
an aligned column on the right. Comments are plain text, so Markdown in them
shows literally; write \# for a literal hash.
Source
```filetree
- content/ # every page, both languages in one directory
- docs/ # the documentation tree you are reading
- blog/ # release notes and articles
- assets/css/ # the site's own CSS, loaded after the theme's
- layouts/ # site-level template overrides, the fewer the better
- static/images/ # images that need no build-time processing
- hugo.yml # site configuration: languages, menus, params.ui
```
content/#every page, both languages in one directory
docs/#the documentation tree you are reading
blog/#release notes and articles
assets/css/#the site's own CSS, loaded after the theme's
layouts/#site-level template overrides, the fewer the better
static/images/#images that need no build-time processing
You do not need to align the # signs in the source: the theme starts the
comment column after the widest name, so every comment lines up anyway. The
comment column takes between three tenths and half of the panel. Readers can
drag the dashed splitter between the columns, or focus it with Tab
and move it with the arrow keys, Home and End jumping to
the limits. The splitter is the tree’s only script, so a tree without comments
loads no JavaScript.
A long name or comment is cut off with an ellipsis inside its column, and
hovering shows the full text:
Source
```filetree {title="truncation in both columns"}
- runbooks/
- a-deliberately-long-runbook-filename-for-a-failover-drill.md # an equally overlong comment, kept on one line so it has to be clipped inside the comment column
- restart.md # short
```
truncation in both columns
runbooks/
a-deliberately-long-runbook-filename-for-a-failover-drill.md#an equally overlong comment, kept on one line so it has to be clipped inside the comment column
restart.md#short
On screens narrower than the sm breakpoint the tree becomes a single column:
each comment moves under its name and shows in full, and the splitter is
hidden.
Wrap long comments
When the comments are the point of the tree and must be read in full, add
wrap=true to the fence. Comments then wrap inside their column, even unbroken
identifiers, and rows grow to fit; names keep their ellipsis. Everything else
works as before: folding, the splitter, the narrow-screen layout and print.
Source
```filetree {title="Complete storage comments" wrap=true}
- storage/
- metadata/ # Schema definitions: property keys, vertex and edge labels, indexes, and counters.
- graph/ # Graph data: vertices, edges, index tables, and OLAP analysis data.
```
Complete storage comments
storage/
metadata/#Schema definitions: property keys, vertex and edge labels, indexes, and counters.
graph/#Graph data: vertices, edges, index tables, and OLAP analysis data.
Title bars
{title="…"} on the fence adds a title bar above the tree, which helps when
the reader needs to know which machine or repository the tree describes.
Source
```filetree {title="pgBackRest repository on the backup host"}
- /pg/backup/
- archive/ # WAL segments, needed for point-in-time recovery
- backup/ # full, differential and incremental backups
- /etc/pgbackrest/
- pgbackrest.conf # stanza, retention and repository settings
```
pgBackRest repository on the backup host
/pg/backup/
archive/#WAL segments, needed for point-in-time recovery
backup/#full, differential and incremental backups
/etc/pgbackrest/
pgbackrest.conf#stanza, retention and repository settings
Indentation and depth
Indentation sets the depth. Two spaces, four spaces and tabs (counted as four
columns) all work and may even be mixed in one tree, as long as every level you
return to was opened earlier. That makes it easy to paste the output of the
tree command as it is, root line and summary included; the summary line is
dropped.
A line that returns to a level that was never opened warns, naming its line in
the fence, and is skipped.
Folding and explicit types
Directories with children start open; {open=false} at the end of a line
starts one closed, which keeps a large tree focused on the part you are
explaining. Directories are native <details> elements, so they open and close
with the keyboard and need no JavaScript. When the name alone does not reveal
the type, {type=dir} or {type=file} sets it.
The theme picks each icon from the name. Directory icons follow the open or
closed state. Files match first on the full name (LICENSE, Makefile,
go.mod, package.json, .gitignore …), then on the extension (md yml toml json sh py go js sql css png svg pdf zip …), and anything else gets a generic
file icon.
{icon=…} replaces the icon with one Font Awesome class pair. {tone=…}
colors the icon with the badge vocabulary: neutral,
info, success, warning, danger.
/var/lib/pgsql/18/data/#0700 postgres:postgres · data directory
postgresql.conf#0600 postgres:postgres
/usr/bin/pig#0755 root:root · command-line tool
tone colors the icon and never the text, so put the meaning in the name or
the comment; readers who cannot tell the colors apart still get it there.
Linked entries
Write an entry as [name](link) to make it a link, for example to the page
that documents that file. Site paths, relative paths and http(s): URLs are
accepted, and they pass the same URL checks as links in other components.
When the layout differs by platform, give each fence tab= (and group= /
value=); adjacent fences then become one tab set,
which can mix trees and code fences.
Print shows every directory expanded, with comments wrapped instead of cut off
and no splitter. The page’s Markdown output keeps the filetree fence as you
wrote it, and RSS shows that same source in a <pre> block.
Parameter reference
Fence attributes, after ```filetree:
title, plain text, default—
Title bar above the tree; omitted when absent; must not be empty
wrap, boolean, defaultfalse
Wrap long comments and grow rows; names keep the ellipsis; an invalid value warns and uses false
tab, plain text, default—
Makes this tree one panel of a tab set
group / value, string, default—
Tab group and sync value; must appear with tab
class, class list, default—
Passed through for site CSS
Entry attributes, in the {…} at the end of a line:
icon, Font Awesome class pair, defaultmatched by name / extension
For example fa-solid fa-lock; a malformed value warns and uses the default icon
tone, enum, defaultneutral
neutralinfosuccesswarningdanger; colors the icon only
open, boolean, defaulttrue
Directories only; false starts it closed
type, enum, defaultinferred
dir or file, overriding the inference
The line syntax:
Indentation
Two spaces / four spaces / tabs / the │ ├── └── drawing from tree
- name
The bullet is optional; -, * and + are equivalent
name/
A trailing slash marks a directory; the name renders as written, slash kept
[name](url)
A linked entry
# comment
Everything after the first whitespace-preceded #; \# is a literal hash
N directories, M files
The tree summary line, dropped automatically
Unknown attributes or values, open on a file, a malformed {…} and a
return to an unopened level all warn with the line number in the fence; the
theme then uses a safe default or skips the line.
Limits
The filetree fence is the only form; there is no {.filetree} list marker
and no shortcode.
Names and comments are plain text, so **bold** shows literally and the
source stays readable in any Markdown viewer.
The tree reads nothing from disk. It is the text you wrote or pasted and does
not follow later changes to the repository.
There is no search, multiple selection or copy-the-whole-tree control; use a
code block when readers must copy the listing.
A dragged splitter position is not saved, so a reload restores the width
computed at build time.
Related
Code blocks — listings meant to be copied verbatim
Use KaTeX for inline and display mathematics at build time. Readers download no script.
Write formulas in TeX and Hugo turns them into HTML and MathML with KaTeX while
it builds the site, so readers download one local stylesheet and no script,
and nothing is sent to a remote math service. Use \(…\) inside a sentence,
$$…$$ or \[…\] for a formula on its own line, and the math and chem
fences where you cannot change the site configuration. For TikZ drawings or
macro packages KaTeX does not support, use a pre-rendered
image.
Site prerequisites
The $$, \[…\] and \(…\) delimiters work only after you enable Goldmark’s
passthrough extension in your site’s own configuration; Hugo does not inherit
markup settings from a theme, so OINK cannot do it for you. A math: true
key, in front matter or in params, does not enable anything: without this
block, $$ stays on the page as literal text.
hugo.yml
markup:goldmark:parser:attribute:block:true# numbered equations need the attribute lineextensions:passthrough:enable:truedelimiters:block:[['\[','\]'],['$$','$$']]inline:[['\(','\)']]
A single $ is deliberately left out of the inline delimiters, so a price
such as “$5” in prose is never read as the start of a formula.
Configuration describes each key. The math and
chem fences and the eq shortcode need none of this.
Shortest form
An inline formula sits in the sentence; keep the surrounding spaces and
punctuation outside the delimiters.
Source
The shared buffer hit ratio is \(\mathrm{hit} = \frac{H}{H + R}\), where \(H\) is `blks_hit` and \(R\) is `blks_read`.
The shared buffer hit ratio is hit=H+RH, where H is blks_hit and R is blks_read.
Display formulas
Put a formula in its own paragraph between $$ delimiters, or \[…\], to
show it larger and centered.
Source
A B-tree with fan-out \(f\) over \(N\) keys has height:
$$
h = \left\lceil \log_{f} N \right\rceil
$$
A B-tree with fan-out f over N keys has height:
h=⌈logfN⌉
A formula too long for the column scrolls sideways inside it instead of
widening the page.
The math fence
A math fence is another way to write a display formula. It needs no
passthrough configuration, and GitHub shows it as an ordinary code block.
This is Little’s law applied to a connection pool: in steady state, the
connections you need equal the arrival rate times the mean response time,
which is why a pool can be much smaller than the number of clients.
Chemistry and units
A chem fence typesets a \ce{…} body with KaTeX’s mhchem extension, which
also handles physical units.
Put an attribute line under a display formula to number it. You write the
number yourself in num, such as 3-1 or 5.3, because the theme does not
count; the anchor defaults to #eq-<num>. The number appears at the right of
the formula after a localized “Equation” label.
Source
$$
\text{WAL}_{\text{day}} \approx \text{TPS} \times \bar{s}_{\text{record}} \times 86400
$$
{#eq-wal num="3-1" caption="Estimating daily WAL volume"}
See [Equation 3-1](#eq-wal): multiply by the retention period for the floor on archive disk size.
WALday≈TPS×sˉrecord×86400
Equation 3-1Estimating daily WAL volume
See Equation 3-1: multiply by the retention period for the floor on
archive disk size.
caption is optional plain text, and both #id and caption need num. An
incomplete attribute line warns and drops the parts it cannot use; a duplicate
target warns and keeps the first. On a narrow screen a long caption wraps
inside the column.
Cross references
An ordinary link reaches a numbered equation on the same page, as above. To
link across pages, or to have the “Equation N” label written for you, use
xref:
Source
Capacity planning starts from {{< xref eq="3-1" anchor="eq-wal" />}}.
xref may come before the equation it points to. For a book-wide list of
equations and the book-equations index, see
publishing books.
The eq shortcode
eq renders with the same KaTeX engine for sites that cannot enable
passthrough, such as a migrated manuscript or a site whose hugo.yml you do
not control. Without parameters it is an unnumbered display formula; with
num it matches the attribute-line form. Where you can enable passthrough,
$$ is shorter.
Source
{{< eq >}}\sigma_{\text{idx}} = \frac{\text{rows}_{\text{matched}}}{\text{rows}_{\text{total}}}{{< /eq >}}
{{< eq num="3-2" caption="Where a sequential scan and an index scan cost the same" >}}
c_{\text{seq}} \cdot P = c_{\text{rand}} \cdot \sigma \cdot T
{{< /eq >}}
σidx=rowstotalrowsmatched
cseq⋅P=crand⋅σ⋅T
Equation 3-2Where a sequential scan and an index scan cost the same
Output
No form loads JavaScript. A page with formulas loads a local katex.min.css
and the WOFF2 fonts it names; a page without formulas loads neither. Print
shows formulas the same way, without scrolling. The Markdown output keeps the
TeX source as written, except that an eq shortcode becomes
**Equation 3-2.** caption followed by a $$ block. RSS carries rendered
KaTeX HTML and MathML; a numbered $$ block gets a bold “Equation N.” line
before it, and a numbered eq keeps its “Equation N” caption below the
formula.
Parameter reference
The four ways to write a formula:
\(…\), Placementinline
Needs the site’s passthrough configuration; takes no attributes
$$…$$ / \[…\], Placementdisplay
Needs the site’s passthrough configuration; an attribute line below it numbers it
```math, Placementdisplay fence
Works without passthrough; takes no attributes
```chem, Placementdisplay fence
Works without passthrough; the body is \ce{…}
The attribute line {…} under a display formula:
num, string, default—
[0-9A-Za-z.-]+; registers a numbered equation and shows “Equation N” at the right
#id, identifier, defaulteq-<num>
[A-Za-z][A-Za-z0-9_.:-]*; the anchor and cross-reference target
caption, plain text, default—
Caption after the number; requires num
The eq shortcode:
num, string, default—
As above; without it the formula is an unnumbered display formula
id, identifier, defaulteq-<num>
Requires num
caption, plain text, default—
Requires num
class, class list, default—
Requires num; passed through for site CSS
Body, TeX, default—
Required, non-empty
Invalid TeX does not stop the build. It warns with KaTeX’s error message and
the source position, and the page shows the expression as written, so search
the build log for these warnings before you publish.
Limits
Only $$ blocks and eq can be numbered. The math fence takes no
attribute line, so switch forms when you need a number.
The theme never counts or renumbers equations. When you reorder chapters,
update num yourself.
Inline formulas take no attributes; the attribute line applies only to
display formulas.
caption is plain text, so Markdown in it appears literally.
Related
Code blocks — fence attributes and numbered examples
Images — figures use the same {#id num=} numbering
List places in a map fence to get a numbered place list in HTML, Print and RSS, plus an interactive map once the site names a tile service.
A map fence suits places that belong together in an order: the stops of a
trip, a company’s offices, the venues of a conference, the sites of a field
survey. HTML, Print and RSS show a numbered list with names, notes, thumbnails
and OpenStreetMap coordinates. The list works without JavaScript. Markdown and
LLMS keep the original YAML fence.
The interactive map above the list is something your site turns on. Map tiles
are images fetched from a third-party tile service in the reader’s browser,
and every service has its own usage policy, quota and attribution terms, so
the theme does not pick one for you: until you set params.map with a tile
URL and its attribution, as described in
Site configuration, pages show the list and make no map
requests at all.
For addresses that need no map, a table is enough;
a map that is a drawing belongs in an image.
This site has a tile service configured, so a map appears above the list, with
markers numbered like the list and zoomed to fit every place. On a site
without one, the same fence renders only the list. Each coordinate pair links
to the place on openstreetmap.org; that is an ordinary link the reader may
follow, not a request the page makes.
The body is parsed as YAML, and since JSON is valid YAML,
[{"name": "Forbidden City", "lat": 39.9159, "lng": 116.3908}] works too.
Site configuration
Maps are off by default. To turn them on, choose a tile service and add it to
hugo.yml. This site uses OpenStreetMap’s standard tiles:
tiles is an https:// URL template containing {z}, {x} and {y}
({s} for subdomains, {r} for high-DPI tiles and {-y} for TMS row order
are allowed). Any other placeholder, such as {apikey} or {accessToken},
has no value to fill: write the key into the URL itself, or the template
warns and is ignored. An optional dark_tiles, with the same rules, is used
in dark mode. Only {s} may vary in either host. Put tile coordinates in the path or query.
attribution is the plain-text credit the tile service requires; it appears
in the corner of every map. Add attribution_url (https://) to turn the
credit into a clickable link without accepting author HTML — OpenStreetMap’s
attribution guidelines
require interactive web maps to link to https://www.openstreetmap.org/copyright.
subdomains overrides Leaflet’s default abc when tiles uses {s} (for
example abcd or "01234567"). Quote digits: YAML reads an unquoted
01234567 as a number, which warns and falls back to Leaflet’s default.
max_zoom is a whole number from 1 to 22 and defaults to 19.
loading is lazy (the default: a map loads once it is on screen, within
320px below the viewport, or anywhere above the reading position) or click
(show a button naming every tile host the map may contact, dark_tiles
included and {s} written as *, and send no tile requests until clicked;
if the button still holds focus, it moves to the map on success or the first coordinate link on failure).
enable: true without a valid tiles and an attribution warns and leaves
maps off, so a half-finished configuration never sends readers to a service
you have not agreed to. Fences keep rendering their lists.
Surrounding whitespace in tiles, dark_tiles, attribution_url and
subdomains is trimmed. An unknown key warns and is ignored, including a
camel-case spelling such as maxZoom, which Hugo lowercases; write
max_zoom.
Pick a service that fits your traffic. The OpenStreetMap Foundation’s
tile usage policy
allows light use of its standard tiles with linked attribution; a busy site
should use a commercial tile service with a domain-restricted key, or
host its own tiles. A key in the tile URL is visible to every reader, which is
why the restriction to your domain matters.
Each tile request sends the reader’s IP address and the area being viewed to
the tile service. Requests start only on sites that enable maps. Under the
default lazy loading they start as a map nears the viewport, and a reader who
opens a link to a later section loads every map above it at once, so the text
being read is not pushed down later. If no tile request may happen before the
reader agrees, set loading: click: nothing is requested until the button is
pressed. Either way, mention the service in your privacy notice if you have one.
Place fields
Besides name and the coordinates, a place can carry a note, a thumbnail and a
link:
One place with every field
- name:Forbidden Citylat:39.9159lng:116.3908text:Enter through the Meridian Gate in the morning.image:forbidden-city.webplink:"#single"
name and text are plain text: Markdown and HTML in them show literally,
and popups are built from this text, never from HTML.
image is resolved like any image: page resource, then global resource,
then static path, then remote URL. Local raster images are resized to fit
480×360 for the list and the popup, and carry their width and height in
both, so the popup keeps its size while the image loads; remote images are
used as they are.
Thumbnails are decorative (alt=""), since the name beside them already says
what they show. The route map below uses four images stored beside this
page’s index.md.
link turns the name into a link in the list and in the popup, typically to
a #anchor on the same page. Quote it, because YAML reads an unquoted # as
the start of a comment.
A place without a name, without numeric coordinates, or with coordinates out
of range warns and is skipped. A quoted number such as lat: "39.9159" is a
string, so that place is skipped too.
Unknown fields warn and are ignored. A fence with no valid place, including
an empty list [], warns and renders nothing.
Routes, thumbnails and captions
route=true joins the places with a line in list order, and image adds a
resized thumbnail to both the list entry and its marker popup. caption adds a
plain-text caption under the list, and screen readers announce it as the name
of the map.
Source
```map {caption="Beijing Central Axis walk" route=true}
- name: Forbidden City
lat: 39.9159
lng: 116.3908
text: Start at the Hall of Supreme Harmony; close-up below.
image: forbidden-city.webp
link: "#single"
- name: Jingshan Park
lat: 39.9245
lng: 116.3904
text: Climb Wanchun Pavilion to overlook the palace roofs.
image: jingshan.webp
- name: Beihai Park
lat: 39.9264
lng: 116.3825
text: Cross Yong'an Bridge toward the White Dagoba.
image: beihai.webp
- name: Drum Tower
lat: 39.9393
lng: 116.3898
text: End the walk at the northern drum plaza.
image: drum-tower.webp
```
Select a marker or a row in the list below to open its popup with the
thumbnail, the name and the note; the first place links to the next section.
The route is a straight line from place to place, not a computed walking or
driving route.
One place and zoom
A single place opens at zoom level 15. zoom sets another level, from 1 (the
whole world) to 22 (a street corner, capped by params.map.max_zoom), and
height sets the map’s height as a CSS length.
Source
```map {zoom=16 height="18rem"}
- name: Forbidden City
lat: 39.9159
lng: 116.3908
text: Hall of Supreme Harmony, centered inside the palace moat.
image: forbidden-city.webp
```
Forbidden CityHall of Supreme Harmony, centered inside the palace moat.39.9159, 116.3908
With several places, zoom replaces the fitted zoom level but keeps the
fitted center. Without height the map is min(26rem, 60vh) tall, so a reader
on a phone can always scroll past it. height takes a positive number
followed by px, rem, em, vh or vw. A percentage has no height to
resolve against and a zero height leaves nothing to see, so both, like anything
else, warn and keep the default.
The interactive map
The theme bundles Leaflet 1.9.4. Only pages with a map link its stylesheet,
and the script loads when the first map is due: on screen, within 320px
below the viewport, or anywhere above the reading position (or when the
reader clicks the load button under loading: click).
Scroll-wheel zoom is off, and on touchscreens single-finger swipes keep
scrolling the page instead of trapping the reader inside the map. Readers
pan and zoom with two-finger pinch, the zoom buttons, a mouse or pen drag, or the
keyboard (focus the map, then use the arrow keys and + / -;
site-wide single-key shortcuts yield while focus is inside the map).
Selecting a marker by pointer or with Enter, or clicking a place
entry in the list below, pans to the place and opens its popup. A popup
opened with Enter takes focus, so its link and close button come
next; Escape or the close button closes it and returns focus to
the marker.
In dark mode the map switches to dark_tiles when the site configures them,
and switches back when the reader changes the color scheme; without
dark_tiles, light tiles are gently dimmed without inverting map colors.
If every dark_tiles request fails, the map keeps the dimmed light tiles.
The map resizes and frames with its container, including when a tab panel is
shown or a disclosure opens, without fetching tiles for hidden tabs ahead of time.
If Leaflet or all light tiles fail to load, the canvas hides and the list remains.
The list stays under the map as its interactive legend and accessible
alternative, and it uses two columns on wide screens.
Coordinates
Coordinates are WGS 84 decimal degrees, the system used by GPS, photo metadata
and OpenStreetMap. The explicit lat and lng keys avoid the mix-ups that
GeoJSON’s [lng, lat] order causes. To look up a place, open it on
openstreetmap.org: the address bar ends with #map=zoom/lat/lng.
Tile services in mainland China commonly use GCJ-02 or BD-09 coordinates, on
which WGS 84 markers land hundreds of meters off. The theme does not ship
unofficial coordinate transforms; choose a WGS 84 / CGCS2000 tile service
(such as compliant self-hosted tiles, a global commercial provider, or Tianditu
with subdomains: "01234567" — note that Tianditu splits base imagery and
place labels into two separate layers while params.map.tiles configures one).
Output
Print and RSS show the list and the caption without a map, and RSS makes the
thumbnail URLs absolute. On a site without a tile service, the HTML page has
no map script, stylesheet or tile URL at all. The page’s Markdown output keeps
the map fence as you wrote it.
Parameter reference
Place fields:
name, plain text, default—
Required. The list entry and the popup title
lat, number, default—
Required. WGS 84 latitude, −90 to 90
lng, number, default—
Required. WGS 84 longitude, −180 to 180
text, plain text, default—
A note under the name and in the popup
image, image source, default—
Page resource / global resource / static path / remote URL; local rasters are resized
link, URL, default—
Links the name; a same-page #anchor is typical
Fence attributes:
caption, plain text, default—
Caption under the list; also labels the map region
route, bool, defaultfalse
true connects the places in list order
zoom, whole number, defaultfit
1 to 22 (capped by params.map.max_zoom). Without it: 15 for one place, otherwise fit all places
num and other unknown attributes warn and are ignored. Hugo consumes
style and strips on* attributes before the theme sees the fence, so those
are ignored without a warning.
Site parameters (hugo.yml):
params.map.enable, bool, defaultfalse
Turns on interactive maps; requires tiles and attribution
params.map.tiles, URL template, default—
https:// with {z}, {x}, {y} ({s}, {r} and {-y} allowed; other placeholders warn)
params.map.attribution, string, default—
The plain-text attribution the tile service requires
params.map.attribution_url, URL, default—
Optional https:// URL that turns attribution into a link
params.map.dark_tiles, URL template, default—
Optional; used in dark mode
params.map.subdomains, string, default—
Optional {s} subdomain characters as a quoted string (e.g. abcd, "01234567"); empty uses Leaflet’s abc
params.map.max_zoom, whole number, default19
1 to 22
params.map.loading, lazy | click, defaultlazy
lazy mounts on, near or above the reading position; click waits for a reader click
Limits
Coordinates are WGS 84 only; markers on GCJ-02 or BD-09 tiles appear offset.
Routes connect places directly in coordinate space and do not wrap across
the antimeridian.
There are no GPX or GeoJSON tracks, no marker clustering, search or
geocoding, and no custom marker icons.
Markers are not read from photo GPS metadata; write the coordinates.
name, text and caption are plain text; put rich text in a paragraph
next to the fence.
Remote thumbnails are neither downloaded nor resized at build time.
Draw.io — another feature that stays off until the site names a service
4.19 - Images
Add images with plain Markdown, then use one attribute line for a caption, a size, zoom, a link, a figure number or Hugo image processing.
Screenshots and diagrams go in with ordinary Markdown, ,
so the same source still shows the image on GitHub or in any editor. When an
image needs more, such as a caption, a display size, a figure number for a
book or a resized copy made at build time, put it in its own paragraph and add
one {…} attribute line under it. There is no image shortcode to learn.
Shortest form
Source

The image file sits next to this page’s index.md, which makes the folder a
page bundle. The theme reads the image’s size and writes width and height
into the page, so the text does not jump while it loads, and every image is
lazy-loaded. Always write alt text, because screen readers and search engines
rely on it; leave it empty only for a decorative image, which also never zooms.
Where images come from
Put each image where it is easiest to maintain and use the matching path form:
Placement
How it is written
Suited to
Beside the page (a bundle: index.md plus the image)

A screenshot only this page uses; it travels with the page and is shared by translations
Current section bundle (_index.md and its resources)

Images belonging to a section; use the resource path relative to that section
Global resource assets/images/…

Images several pages share, especially ones needing processing (resize / crop)
Static directory static/images/…

Large images and downloads that need no processing; supply width/height where the theme cannot measure them
Remote URL

Rare: nothing is downloaded at build time and nothing can be processed
A relative path is looked up as a page resource, then a resource of the
current section, then a global resource. When none matches, the path is
published as a static path; the theme does not check whether static paths or
remote URLs exist, so a typo shows up as a broken image in the browser. If an
image asks for processing but no processable resource is found, the build
warns and publishes the image unprocessed.
Alt text written in Markdown always wins over the resource’s metadata,
including an empty alt that marks a decorative image. A resource’s
params.alt must be a string; any other value warns and is ignored.
Inline versus block
An image inside a line of text is inline: it renders as a single <img> and
takes no attributes. An image in a paragraph of its own is a block image, and
only a block image can carry an attribute line.
Source
This little one  sits inside a sentence — an inline image.

{width="100" height="64"}
This image is inside a sentence, so it is inline.
An inline image shows at its own size, 50×32 here. An SVG without an intrinsic
size would stretch to the full column width inline, so place SVGs as block
images with an explicit width and height.
Note
Block images need markup.goldmark.parser.wrapStandAloneImageWithinParagraph: false
in the site’s own hugo.yml; see the Goldmark prerequisites.
Without it, Goldmark wraps every standalone image in <p> and prints the
attribute line as text.
Captions
caption="…" turns the image into a <figure> with a <figcaption>.
Captions are plain text; Markdown in them is not rendered.
Source

{caption="The release card uses the page's release_url and date"}
The release card uses the page's release_url and date
The "title" part of the Markdown image stays a hover tooltip and never
becomes the caption.
Size
width and height take positive integers and override the size the theme
measured. Use them to reserve space for a static or remote image, which the
theme cannot measure, or to show a large image smaller. The browser does the
scaling; the file itself is unchanged.
Source

{width="450" height="300" caption="A 900×600 illustration from static/images/ shown at half size"}
A 900×600 illustration from static/images/ shown at half size
Processed images
To publish a smaller or cropped copy instead of the original file, let Hugo
process the image at build time. Give both command (Fit, Resize, Fill
or Crop) and options in Hugo’s image-processing syntax. The page then links
the processed copy, and when zoom is on, the dialog still opens the original.
Source

{command="Fit" options="300x150" caption="Fit 300x150: scaled to fit inside a 300×150 box"}

{command="Fill" options="300x150 Left" caption="Fill 300x150 Left: fills the box, cropped from the left"}
Fit 300x150: scaled to fit inside a 300×150 boxFill 300x150 Left: fills the box, cropped from the left
Only page and global resources can be processed. A command on a static path,
a remote URL or an SVG warns and publishes the image unprocessed. Anchors,
quality and format conversion, such as 300x150 webp q80, are described in
Hugo image processing.
Linked images
There are two ways to make an image clickable, depending on whether it has a
caption:
Without a caption, wrap the image in a Markdown link: [](href).
To make a captioned figure clickable as a whole, add link="…" to the
attribute line, which then also needs caption or num.
Source
[](/docs/about/features/)

{caption="Click the image for the releases and downloads guide" link="/docs/write/releases/"}
Click the image for the releases and downloads guide
A linked image never zooms, because a click follows the link. A link=
without a caption or number warns and is dropped, and the warning suggests the
[](…) form.
Numbered figures
Books and long manuals refer to figures by number. Add num to the attribute
line, and optionally an #id. You write the number yourself as a string such
as 2-1 or 3.4, because the theme never counts; the caption then starts
with a localized “Figure 2-1”, and the ID defaults to fig-<num>. Refer to
the figure with an ordinary link such as [Figure 2-1](#fig-2-1) or with
xref; Books covers the whole-book list of figures.
Source

{#fig-release num="2-1" caption="The release card: version, date and assets"}
See [Figure 2-1](#fig-release).
Figure 2-1The release card: version, date and assets
A numbered figure can also be processed (num with command) and can carry a
link.
Zoom
Zoom lets readers open a screenshot at full size without leaving the page.
It is off by default. Turn it on for the whole site with
params.ui.image_zoom; image_zoom in a page’s front matter overrides the
site setting for that page, in either direction:
hugo.yml
params:ui:image_zoom:true
One page's front matter: off for this page only
image_zoom:false
With zoom on, block images, figures and gallery images that have alt text
become buttons that open the full image in a native <dialog>; Esc
closes it and returns focus to the image. This page turns zoom on in its front
matter, so you can click any image above. The button’s label exists only for
screen readers, so copying the article copies the images and captions and no
button text.
Inline images, decorative images with empty alt text, linked images and
images marked data-no-zoom never zoom. The zoom script loads only on pages
that have an image that can zoom.
Source: a decorative image does not zoom

{width="150" height="75"}
Light and dark images
There is no setting that swaps an image by color scheme. When a screenshot
needs a light and a dark version, give each one a class and hide the wrong
one in site CSS. The theme sets data-bs-theme on html, so these selectors
show exactly one of the two:
Replace sidebar-light.webp and sidebar-dark.webp with your own images.
Output
Print shows images and figures as on the web, without the zoom buttons, and
RSS rewrites each image src to an absolute URL. The page’s Markdown output
keeps  and the attribute line as you wrote them.
Parameter reference
The attribute line {…}, on the line right after a block image:
caption, plain text, default—
Its presence makes a figure; not parsed as Markdown
#id, identifier, defaultfig-<num> when num is set
[A-Za-z][A-Za-z0-9_.:-]*; the anchor and the Book target ID
num, string, default—
[0-9A-Za-z.-]+; registers a Book figure target and prefixes the caption with “Figure N”
Overrides the size; static and remote images use it to avoid layout shift
command, enum, default—
Fit, Resize, Fill, Crop; must accompany options; page and global resources only
options, string, default—
Hugo image processing options such as 600x300, 300x150 Left, 800x webp q80
link, URL, default—
Wraps the figure in a link; requires caption or num; a linked image does not zoom
class, class list, default—
Passed through for the site’s CSS
data-* / aria-*, string, default—
Passed through
style, alt, title, src and any other key on the attribute line warn
and are ignored; Hugo strips on* handlers before the theme sees them, so
they are dropped silently. Alt text, title and source belong in the Markdown image
itself.
Limits
Captions and every other string parameter are plain text; put a longer
explanation in a paragraph under the image.
title is not a caption: the c in  is a hover tooltip.
Only resources can be processed, so move an image that needs processing from
static/ into the page bundle or assets/.
Remote images are never downloaded at build time.
Zoom has no drag, pan or previous / next control; show a set of related
images as a gallery.
Lay out a set of related screenshots as a responsive grid with a gallery fence, each with an optional description or link.
A gallery puts related images side by side so readers can compare them: the
screens of a setup wizard, the light and dark versions of a dashboard, the
same chart before and after a fix. You write one image per line inside a
gallery fence, and the theme lays them out as a grid that drops columns as
the screen narrows.
Use an image for a single picture. Images without an
order or a comparison between them are better as separate figures in the text.
Always write the alt text. It is the item’s title, the only text a screen
reader announces for it, and what makes the image eligible for zoom. There is
no column setting: the grid follows the width of its container.
Descriptions
Put # after the image to add a description under it. Descriptions are
plain text, so Markdown in them shows literally; write \# for a literal hash.
Source
```gallery
 # The default shell: sidebar, article, table of contents
 # Docsy upstream — the content model is the same lineage
 # Release cards use release_url and date; checksums blocks list download assets
```
The default shell: sidebar, article, table of contents
Docsy upstream — the content model is the same lineage
Release cards use release_url and date; checksums blocks list download assets
Descriptions may differ in length: the items in a row line up with the tallest
one, and a description that wraps does not push its neighbors around. The
image is parsed before the description, so a # inside alt text or a path
needs no escaping.
A link per item
Add {link=…} at the end of a line to make that item a link, for example to
the page that explains the screen. Site paths, relative paths and http(s):
URLs are accepted.
A click on a linked item follows the link, so that item does not zoom. One
gallery can mix both kinds: linked items open their page, the others open the
full image.
Where images come from
Each source is looked up like a plain image: a page resource in the page
bundle, then a global resource under assets/, then a static path such as
/images/…, then a remote URL. The theme reads the size of local resources
and writes it into the page, so the grid does not jump while images load.
Remote images are neither downloaded nor measured at build time.
Source
```gallery
 # Under assets/images/…, eligible for build-time processing
 # Under static/images/…, published as is
```
Under assets/images/…, eligible for build-time processing
Under static/images/…, published as is
A page or global resource that cannot be found is kept as a static path. The
theme does not check whether static paths or remote URLs exist, so a typo
there shows up as a broken image in the browser.
Decorative images and zoom
Empty alt text marks an image as decorative: it gets no title, screen readers
skip it, and it never zooms.
Image zoom is off by default and turned on with params.ui.image_zoom for the
whole site or with image_zoom in a page’s front matter; this page does the
latter. Every image above that has alt text and no link opens at full size,
and Esc closes it and returns focus to the image.
this page's front matter
image_zoom:true
Source: one decorative image, one ordinary one
```gallery
 # Decorative, never zooms
 # Has alt text, so it opens
```
Decorative, never zooms
Has alt text, so it opens
Galleries reuse the page’s single zoom dialog instead of bringing their own,
and the zoom script loads only when the page has at least one image that can
zoom. Images · Zoom lists the full rules.
Classes and tabs
class adds a CSS class for your own styles, either to the whole fence (after
the language) or to one item (at the end of its line); the theme passes it
through without interpreting it. A fence with tab= (and group= /
value=) becomes one panel of a tab set, which
suits one gallery per platform or per color scheme.
Source
```gallery {tab="OINK" group="shell" value="oink"}
 # Sidebar, article, table of contents
```
```gallery {tab="Docsy" value="docsy"}
 # The same content-model lineage
```
OINK
Sidebar, article, table of contents
Docsy
The same content-model lineage
Output
Galleries load no script of their own, and every image is lazy-loaded. Print
and RSS stack the images without zoom, and the page’s Markdown output keeps
the gallery fence as you wrote it.
Parameter reference
The line syntax  [# description] [{key=value …}]:
, Requiredyes
Must start the line. alt is the item’s title; empty means decorative
Plain text under the image; \# is a literal hash; must not be empty
{link=…}, Requiredno
Makes the item a link, and therefore not zoomable
{class=…}, Requiredno
Adds a site CSS class to that item
Fence attributes:
tab, plain text, default—
Makes this gallery one panel of a tab set
group / value, string, default—
Tab group and sync value; must appear with tab
class, class list, default—
Passed through for site CSS
There is no columns, caption or title attribute. A malformed line or
attribute warns with its line number in the fence, and only the broken part or
line is dropped.
Limits
The fence is the only form; there is no {.gallery} list marker and no
shortcode. GitHub therefore shows the source rather than the images.
You cannot set the number of columns, and images keep their own proportions
instead of being cropped to a common shape.
There is no slideshow, carousel or previous / next control; the zoom dialog
shows one image at a time.
Remote images are not downloaded at build time, so their size is unknown
until the browser loads them and the layout can shift.
Descriptions do not render Markdown; put rich text in a paragraph below the
gallery.
For a whole album with a sidebar, page-by-page browsing and drag-to-pan
viewing, use the Expo layout; a gallery fence is for a
group of images inside a text page.
Related
Images — single images, captions, numbering, the zoom switch
Embed product demos, screen recordings and muted loops that replace GIFs, and link YouTube, Bilibili or Vimeo talks without contacting the platform until a reader clicks.
A video is written like an image, , with an optional
attribute line below it. A video file plays in the page’s own <video>
element, so it needs no configuration and no third-party service. A YouTube,
Bilibili or Vimeo URL in the same place becomes a card that links to the
platform; it plays in the page only on a site that has opted that platform in,
because playing there connects the reader to the platform.
Use a file for product demos, screen recordings and the short silent loops
usually published as animated GIFs, and a platform card for talks and
interviews that already live on a video site. A video file gets the theme’s
control row under the picture: play, the elapsed time, one progress bar, the
duration, speed, captions, sound and full screen. The bar is a single track in
three colors: played time in the page’s accent color, buffered time a deeper
neutral and the rest a light one. Clicking the picture also plays or pauses.
Platform embeds use the provider’s controls.
The file sits beside this page in its bundle: a 9-second, 1200×600 MP4 of
123 KB. The bracket text is the player’s accessible name, so write it as you
would alt text. When it is empty the caption names the player, and when both
are empty the theme warns and falls back to the file name (or the watch URL for
platform links).
The player uses preload="metadata", so until the reader
presses play the browser fetches only enough to show the duration. Without a
known size the box reserves 16:9, then takes the video’s own shape once its
metadata arrives; add a local poster or width and height if the video is
not 16:9 and you want zero layout shift.
Like a block image, a video needs
markup.goldmark.parser.wrapStandAloneImageWithinParagraph: false; see
Images · Inline versus block.
Where videos come from
Video files resolve in the same order as images:
Placement
How it is written
Recognized by
Beside the page (a bundle)

Hugo media type video/*
Current section bundle

Hugo media type video/*
Global resource assets/…

Hugo media type video/*
Static directory static/…

Extension mp4, m4v, webm, ogv or mov
Object storage or a CDN

The same extensions
A path that matches no resource is written out as a static path, and the theme
checks neither static paths nor remote URLs. Only the path part decides the
extension, so a signed URL such as …/tour.mp4?sig=… is still a video, while a
destination with any other extension stays an image:
https://example.com/stream?id=42 renders as a broken <img>.
Inline versus block
Only a video in a paragraph of its own becomes a player. Inside a sentence it
is a plain link to the file, with the bracket text as the link text:
Source
Inside a sentence,  is a link to the file.
Inside a sentence, the same tour is a link to the file.
An inline platform URL links to its watch page. Inline videos take no
attributes.
Poster, subtitles and caption
Source

{caption="The documentation shell, its Docsy upstream and a release page, in nine seconds" poster="tour-poster.jpg" track="tour.en.vtt"}
The documentation shell, its Docsy upstream and a release page, in nine seconds
poster is the picture shown before playback, found the same way as an
image. A local raster poster also gives the player its width and height
(1200×600 here), so the box has the right shape before the video loads.
track is one WebVTT subtitle file, found the same way. The theme writes
kind="subtitles", takes srclang from the page language, labels the track
with the language name and turns it on by default. Each translation names
its own file: the Chinese page uses tour.zh.vtt. Keep .vtt files on the
same origin (in the page bundle or static/) when possible; when track is
a remote URL, <video> adds crossorigin="anonymous", so both the subtitle
and video hosts must send CORS headers.
caption is plain text in a <figcaption>, exactly as for images; it is
not parsed as Markdown.
num makes the video a numbered Book figure, as for an image: the caption
gains a “Figure N” prefix in the page’s language, #id defaults to
fig-<num>, and links and xref can reach the video. See
Books.
Size
width and height take positive integers and must be given together; they
set the player or card box’s aspect ratio, overriding the poster’s ratio while
leaving the poster image’s own dimensions intact in Print and RSS. Use them for
a video without a local poster whose shape is not 16:9:
Unlike image sizes they do not shrink a landscape player, which spans the
reading width; portrait boxes still cap at 80% of the viewport height and
center horizontally. A non-positive value or a single dimension without its
pair warns and is ignored.
Looping demos instead of GIFs
Source

{autoplay=true poster="appearance-poster.jpg" caption="A muted loop: it plays while in view and pauses when you scroll away"}
A muted loop: it plays while in view and pauses when you scroll away
autoplay=true is for the short, silent demos usually published as animated
GIFs, and it costs far less: this 6-second clip is 246 KB, while the same clip
as a 15 fps GIF is 4.4 MB and cannot be paused.
The video is written out muted loop with a data-td-media-autoplay marker
but without the autoplay attribute, and the small js/chunks/media.js
runtime plays it only while all three of these hold:
at least half of the video is visible;
the page itself is visible, not in a background tab;
the reader has not asked for reduced motion.
It pauses as soon as one stops holding. If the reader pauses or plays the
video, their choice wins until it next leaves the viewport. The control row
stays, so the motion can always be stopped (WCAG 2.2.2, Pause, Stop,
Hide) and the sound turned on. Without JavaScript nothing starts by itself:
the reader sees the poster and presses play. autoplay=false is the same as
leaving it out, and any other value warns and counts as false.
Video platforms
A YouTube, Bilibili or Vimeo URL renders as a card:
Source

{caption="OSChina talks with this site's author about Pigsty, 2022"}
OSChina talks with this site's author about Pigsty, 2022
The card is one link to the watch page, showing the poster or a plain
surface, a play glyph, the bracket text and the platform name. The browser loads any poster you supply from its URL.
The card fetches no platform thumbnail or player before activation. This site has opted Bilibili in, so a click on the card above loads
the player in place; see the next section.
The accepted URLs:
YouTube: youtube.com/watch?v=ID, music.youtube.com/watch?v=ID,
youtu.be/ID, youtube.com/shorts/ID, /live/ID, /embed/ID, and
youtube-nocookie.com/embed/ID, with an 11-character ID. t, start or
#t= sets the start time, in seconds (90) or as 1m30s. Shorts default
to a 9:16 frame unless a poster or width/height overrides it.
Bilibili: bilibili.com/video/BV…, bilibili.com/video/av…,
b23.tv/BV… / b23.tv/av…, or the src of Bilibili’s embed code,
https://player.bilibili.com/player.html?bvid=… (or ?aid=…; prefix the
// it is copied with by https:). An embed URL can select a part by its numeric cid. Otherwise p selects the part by number.
t sets the start time.
Vimeo: vimeo.com/NUMBER, vimeo.com/manage/videos/NUMBER, or
player.vimeo.com/video/NUMBER, with /HASH or ?h=HASH for an unlisted
video. #t= or t sets the start time.
A start time in any other form, such as t=1:30, warns and the video starts at
0; write it as seconds or in 1h2m3s form.
Hosts may carry www. or m.. The theme validates the video ID and builds
the player address from it, so no author text ever reaches an iframe. A URL on
these hosts without a recognizable ID warns and renders a card without a
player. So does an opaque b23.tv short link (such as b23.tv/abc), which
cannot be resolved without the network; write the full bilibili.com/video/BV…
URL instead.
Cards accept caption, num, id, poster, width and height; track
and autoplay warn on a card. The theme never fetches the platform’s
thumbnail, so save a still into the bundle as the poster if you want a
picture.
Playing in place
Every platform card only links out until the site opts its platform in:
hugo.yml
params:video_embeds:[bilibili, youtube]
params.video_embeds is a list drawn from youtube, bilibili and vimeo,
and it is empty by default. Playing in place loads the platform’s player in
your page, and the reader’s browser then talks to the platform, which sees
their address and applies its own privacy terms. Whether that is acceptable is
the site owner’s decision, so nothing loads until you list the platform. A list
rather than a switch lets you play one platform in place and only link to
another that part of your audience cannot reach; this site plays Bilibili and
YouTube in place and leaves Vimeo as a link. A value that is not a list warns
and leaves every card as a link, and an unknown name warns and is ignored.
For an opted-in platform, a plain click replaces the card with the platform’s
player and moves focus into it. The player takes the bracket text as its title,
loads in a sandboxed iframe (allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox,
allow="autoplay; picture-in-picture; fullscreen",
referrerpolicy="strict-origin-when-cross-origin"), and starts at once from
the URL’s start time. A click with Ctrl, Cmd,
Shift or Alt, or with the middle button, still opens the
link, and without JavaScript the card stays a link. Each player loads with its
platform’s most private settings:
Platform
Player host
Privacy setting
YouTube
www.youtube-nocookie.com
The privacy-enhanced domain
Bilibili
player.bilibili.com
Danmaku (scrolling comments) off
Vimeo
player.vimeo.com
dnt=1, do not track
If your site sends a Content Security Policy, add the hosts of the platforms
you list to frame-src: player.bilibili.com, www.youtube-nocookie.com
and player.vimeo.com. Otherwise the browser blocks the player after the
click.
Large files
A video in a page bundle is committed to Git with the page, which suits clips
like the two on this page, 123 KB and 246 KB. Anything beyond a few megabytes
makes every clone of the repository heavier, so upload it to object storage or
a CDN and write its HTTPS URL. The poster and subtitle file can stay in the
bundle:
Source

{poster="install-poster.webp" track="install.en.vtt" caption="A single-node install, start to finish"}
Use a stable public URL on a host that supports HTTP Range requests (standard
on object storage and CDNs) so browsers can read metadata and seek without
downloading the whole file. A signed URL that expires breaks the page later,
and the theme does not check remote files. An H.264 MP4 plays in every current
browser, and a command such as this keeps a screen recording small:
-an drops the sound track, which a muted loop never plays, and +faststart
puts the index first so the browser can show the duration without downloading
the whole file.
Output
In HTML a video is a <figure class="td-media td-media--video"> around a
native <video controls preload="metadata" playsinline>, whose controls
the shared script swaps for the theme’s .td-media__controls row; a caption or number
adds td-figure and a <figcaption>, and a platform URL is an
<a class="td-media-card"> that carries data-td-media-embed when its
platform is opted in. Paper and feeds have no player, so Print and RSS show the
poster if there is one, the name as a link, the platform name when applicable,
the full file or watch URL, and the caption, with absolute URLs in RSS.
Printing the HTML page from the browser shows the poster or the current frame
with the file or watch URL below it, and still prints the title, platform and
watch URL even after an opted-in card has been replaced by an iframe. Markdown
and LLMS output keep the image line and attribute line as written.
Parameter reference
The attribute line {…} directly after a block video:
caption, plain text, default—
Figure caption; not parsed as Markdown
#id, identifier, defaultfig-<num> when num is set
The figure’s anchor and Book target ID
num, string, default—
Book figure number; registers a fig target and prefixes the caption with “Figure N”
poster, path, default—
Image shown before playback, resolved like an image; a local raster supplies width/height
track, path, default—
One WebVTT subtitle file, on by default; srclang is the page language; files only
Aspect ratio of the box; the player still spans the reading width
class, class list, default—
Passed through to the figure for site CSS
data-* / aria-*, string, default—
Passed through to the figure
link, command, options and other keys warn as unknown attributes and are
dropped; style warns as unsafe. Hugo strips on* handlers before the theme
sees them, so they are dropped silently.
The site setting:
params.video_embeds, list, default[]
Platforms whose player loads in place after a click: youtube, bilibili, vimeo
Limits
One subtitle track per video. Each language page names its own file; there
is no track list or subtitle menu.
One source file: no codec fallbacks across several <source> elements, no
adaptive streaming (HLS or DASH), and no chapters or playlists.
The captions button switches the one track on and off. Safari may start with
it off when the reader’s system caption setting asks for that.
Full screen shows the picture with the control row below it. On iPhone the
system player takes over with its own controls.
Site single-key shortcuts yield while focus is in the player’s controls.
Three platforms only. Other video sites and arbitrary iframe addresses are
not supported; link to them in prose.
No remote thumbnails. A card shows your poster or a plain surface.
width and height set the aspect ratio, not pixel dimensions, and must be
paired. A player or card is never taller than 80% of the viewport, so a
portrait recording is pillarboxed inside <video> and a portrait card or
embedded player centers within that height.
Static paths and URLs are recognized by extension only, so a streaming URL
without a video extension renders as an image.
The theme measures no file sizes and checks no static or remote files.
Related
Images — the same syntax, attribute line and figure numbering
Audio — recordings with a visible title and a transcript
Asciinema — terminal sessions as selectable text, not video
Books — numbered figures and xref cross-references
4.22 - Audio
Put a podcast episode, voice sample or recorded talk on a page with image syntax, as a titled player with its transcript beside it.
Write an audio file the way you write an image, , and
it becomes a titled player. Use it for podcast episodes, voice samples,
pronunciation guides and recorded talks. There is no shortcode to learn and
nothing to configure. A small shared script gives the player the theme’s
control row: play, the elapsed time, one progress bar, the duration, speed and
sound. The bar is a single track in three colors: played time in the page’s
accent color, buffered time a deeper neutral and the rest a light one. The
script also pauses other audible players when you start a recording. With
JavaScript off, the browser’s own controls remain.
A recording has no picture, so the bracket text does the work alt text does
for an image: it is both the visible title and the player’s accessible name
(linked via aria-labelledby). If you leave it empty, the build warns and the
file name becomes the title; Markdown inside the brackets is shown as plain
text, and any Markdown "title" after the URL is ignored. Do not wrap an audio
image inside a Markdown link ([](…)): the native player
already contains a fallback link, so wrapping it produces invalid nested <a>
markup.
The first six audio players on a page default to preload="metadata", so the
duration appears without downloading the recording; from the seventh player
onward, the default switches to preload="none" to avoid a burst of metadata
requests on long sample pages. The count follows Hugo’s render order: players
written directly in the page come first, then players inside shortcode bodies
such as tabs, includes and cards. You can override either default with
{preload="none"} or {preload="metadata"}; set {preload="metadata"}
explicitly on a player inside a shortcode that must show its duration.
This file is an 8-second, 50 KB MP3 stored beside the page in its bundle. Like
a block image, the player needs
markup.goldmark.parser.wrapStandAloneImageWithinParagraph: false, one of the
site prerequisites.
Where audio comes from
Audio files are looked up in the same order as images and video:
Placement
How it is written
Recognized by
Beside the page (a bundle)

Extension mp3, m4a, aac, oga, ogg, opus, wav or flac, in any letter case
Current section bundle

The same extensions
Global resource assets/…

The same extensions
Static directory static/…

The same extensions
Object storage or a CDN

The same extensions
Hugo defines no audio/* media type of its own. If your site declares one in
mediaTypes, a page or global resource of that type is audio whatever its
file name.
Query parameters and Media Fragments such as #t=30,60 are preserved on both
local resources and remote URLs, exactly as written (percent-encoding
included), so you can cue an excerpt without cutting a separate file:
Remote episode with time fragment

{caption="OINK Radio · recorded November 2026" preload="none"}
A recording in a page bundle is committed to Git with the page, which suits
short samples like the two on this page. Upload a full-length episode to
object storage and write its HTTPS address instead, as described for
large video files. The theme does not
check that a static or remote file exists, so open the page and press play
once after you publish.
Inline versus block
Only audio in a paragraph of its own becomes a player. Inside a sentence it is
an ordinary link to the file, with the bracket text as the link text:
Source
Inside a sentence,  is a link to the file.
caption adds a line of plain text after the title, which wraps below it on a
narrow screen (and is linked to the player via aria-describedby). Audio
figures that follow each other directly sit closer together, so a set of
samples reads as one group, and starting one player automatically pauses any
other active player on the page:
Source

{caption="The tagline read aloud"}

{caption="The same sentence in Simplified Chinese"}
The caption is not Markdown. Leave the duration out of it: the player already
shows one, and it cannot drift from the file the way typed text can. Add
#id to give the figure an anchor that a link can point to. If another audio
or video figure or a numbered figure on the page already uses that ID, the
build warns and the later of the two loses it. Headings and plain images are
not checked, so keep their IDs distinct yourself.
Transcripts
Put the transcript, show notes or lyrics right after the player as ordinary
content. A folded [!DETAILS] callout placed directly after an audio figure
tightens the gap between them so the pair reads as one unit, while keeping a
long transcript out of the way until a reader wants it. Give each transcript a
distinct title so screen-reader and keyboard users can tell them apart:
Source

> [!DETAILS]- Transcript: Voice sample 1
> OINK is a local-first Hugo theme. Every component reads as Markdown,
> prints on paper, and needs nothing but the Hugo binary.

> [!DETAILS]- Transcript: Voice sample 2
> OINK 是一个本地优先的 Hugo 主题。每个组件都能当作 Markdown 阅读,可以打印成纸面,而且只需要 Hugo 这一个程序。
OINK 是一个本地优先的 Hugo 主题。每个组件都能当作 Markdown 阅读,可以打印成纸面,而且只需要 Hugo 这一个程序。
A transcript is the text alternative WCAG 1.2.1 asks for prerecorded audio,
and it also serves anyone who cannot play sound where they are. Print and RSS
show folded callouts expanded, so the transcript is complete there too. See
Callouts · DETAILS.
Output
Paper and feeds cannot play sound, so static outputs replace the player with a
usable link:
Dedicated Print (/_print/) and browser printing show the title, the
caption, and the recording’s full clickable URL on its own line in ink on
paper, regardless of the screen color mode.
RSS links the title directly to the recording’s absolute URL, with the
caption beside it.
Markdown and LLMS keep your authored image line and attribute line as
written, and a following transcript callout remains plain readable text.
Copying from the page preserves the title, caption, start alignment and
clickable recording URL in rich text.
Parameter reference
The attribute line {…} directly after a block audio file:
caption, plain text, default—
Shown after the title and linked via aria-describedby; not parsed as Markdown
#id, identifier, default—
The figure’s anchor; one already used by another media figure or a numbered figure warns and drops
Controls whether the browser fetches audio metadata before playback
class, class list, default—
Added to the <figure class="td-media td-media--audio"> for site CSS
data-* / aria-*, string, default—
Passed through to the figure
num, poster, autoplay, track, width, height, link, command,
options and any other key warn as unknown and are dropped; style warns as
unsafe. Hugo strips on* handlers before the theme sees them, so they are
dropped silently. A recording takes no figure number, because it is not a figure
in the Book sense.
Limits
No cover art, chapters or waveform: the title and caption are the whole
frame.
Single-active playback: a player that becomes audible, by starting with
sound or by being unmuted while it plays, pauses the other audible
<audio> and <video> players on the page. Muted or silent players, such
as autoplay loops, keep running. Opening a platform card pauses audible
players; once playing, that cross-site player cannot be paused locally.
The speed button cycles 1×, 1.25×, 1.5×, 2× and 0.75×. The volume bar opens
beside the speaker button when you point at or focus it; touch screens use
the device’s own volume buttons.
The control row looks the same in every browser and follows the preset and
light or dark mode. Without JavaScript, the browser’s native player and its
own styling remain.
Site single-key shortcuts yield while focus is in the player’s controls.
One source file per recording, with no fallback formats. MP3 plays in every
current browser.
No podcast feed: the RSS output carries no <enclosure>, so podcast
distribution is up to the site.
Related
Video — the same syntax for video files and video platforms
Callouts — the folded [!DETAILS] block that holds a transcript
Images — the attribute line and image lookup order shared by media
4.23 - Asciinema
Embed a .cast terminal recording that readers can play, pause and copy text from, with the player shipped in the theme.
asciinema plays a .cast terminal recording in the page. Use it when a
command-line procedure is easier to follow when watched: an installation, a
migration, a long-running build. Unlike a video, the terminal output stays
text, so readers can pause and copy a command out of the player, and the
three-minute installation on this page weighs about 196 KB. For graphical
interfaces, use screenshots or a video instead. The
player and its styles ship with the theme, so nothing is downloaded at build
time and no CDN is contacted.
This is a single-node Pigsty installation on Debian, recorded in a 120×36
terminal: 6 min 42 s of real time, which its 0.5 s idle limit plays back in
about 3 minutes. To try it on your own site,
download the sample recording to
static/images/install.cast. file is a path from the site root, and the
same value also finds a file under assets/, because the theme looks for a
global resource first. Page-bundle files are not found. Without title, the
window title shows the value of file.
Window title and theme
title names the window and theme sets the terminal colors:
The default, theme="auto", follows the site: td-light in light mode and
td-dark in dark mode, and the player redraws in place when the reader
switches. Any other value fixes the palette in both modes: the player’s own
asciinema, dracula, gruvbox-dark, monokai, nord, seti,
solarized-dark, solarized-light and tango, or the theme’s td-light and
td-dark. A fixed light palette such as solarized-light looks out of place
on a dark page, so prefer auto unless the recording needs its own colors. The
terminal font is always the site’s code font.
Speed, start point and poster
For a long recording, speed sets the playback rate, startAt skips the
opening, and poster chooses the frame shown before the reader presses play:
Source
{{< asciinema file="images/install.cast" title="From 60 seconds in, at double speed"
speed="2" startAt="60" poster="npt:1:30" >}}
speed and startAt are numbers, startAt in seconds. poster uses the
player’s npt: time notation, so npt:1:30 is the frame at one minute thirty:
the player above shows that frame and starts playing from second 60.
idleTimeLimit shortens every silent stretch to at most that many seconds.
This recording needs none, because its .cast header already sets
idle_time_limit: 0.5; use it for a recording made without an idle limit.
Chapter markers
markers puts named chapters on the progress bar, so a reader can jump to the
part of a long recording they came for. Write each chapter as time:label,
with the time in seconds, and separate chapters with commas:
Hover a mark to read its label; with the player focused, [ and ] jump to
the previous and next chapter. The marks appear once the recording has
loaded, so pair markers with preload="true" when they should show before
the reader presses play. pauseOnMarkers="true" stops at every chapter, which
suits a walkthrough the reader steps through.
Times count on the player’s clock, after the idle limit (idleTimeLimit, or
the one in the .cast header) has shortened the silences, so take them from
the player’s timer rather than from the .cast file. A label may contain
colons but not commas, and a chapter written as a bare time has no label.
Size and fit
The player takes its terminal size from the .cast header and scales to the
width of the column (fit="width"). cols and rows override the header:
A size smaller than the recording clips it: the player above shows 16 of the
36 rows. Use cols and rows to correct a header that has the wrong size, not
to make the player smaller; for a shorter player, record again in a smaller
terminal.
fit decides how the terminal scales: width (the default) fits the column
width, height fits the container’s height, both fits both, and none keeps
the font at its natural size, so a wide terminal overflows the column.
Looping and preloading
loop starts again at the end. preload fetches the recording as soon as the
player appears, so it starts without a pause when the reader presses play:
Source
{{< asciinema file="images/install.cast" title="Looping: the first minute after login"
startAt="0" speed="3" loop="true" preload="true" >}}
autoplay="true" starts playback without a click. Avoid it: the reader’s
“reduce motion” setting only turns off the player’s control animations, not
autoplay, so a moving terminal is forced on everyone. If you must autoplay,
keep the clip very short, add loop, and use one per page.
Inside steps
A recording works best beside the step it shows: the text says what to do,
the recording shows what happens.
Source
1. Install the dependencies and fetch the installer:
```sh
curl -fsSL https://repo.pigsty.io/get | bash
```
2. Run the install; the recording plays the process at four times speed:
{{< asciinema file="images/install.cast" title="pig install" speed="4" >}}
3. Open `http://<node address>:3000` and sign in to Grafana with `admin / pigsty`.
{.steps}
Install the dependencies and fetch the installer:
curl -fsSL https://repo.pigsty.io/get | bash
Run the install; the recording plays the process at four times speed:
Open http://<node address>:3000 and sign in to Grafana with admin / pigsty.
A page can hold any number of players; the script and styles load once.
Recording a cast file
Record with asciinema, for example
asciinema rec --idle-time-limit=2 --cols=100 --rows=28 install.cast, and
check the result with asciinema play install.cast before you commit it.
Keep the terminal under 100 columns so the text stays legible on a phone,
and run clear before you start.
Remove secrets before you record. A .cast file is plain text, so every
character typed or printed can be found with grep; read the file before
committing it.
Commit the file to your site, for example as static/images/install.cast
with file="images/install.cast", rather than pointing at another site’s
.cast. A remote recording breaks when that site moves it.
Output
Print, RSS and the page’s Markdown output have no player: each shows the
recording as a link with its title. Readers of a printed page, feed readers
and tools that read llms.txt therefore get only that link and your prose, so
write the key commands and their output beside the recording as text or code.
Parameter reference
file, path (required), default—
Named, or the first positional parameter. Looked up as a global resource in assets/, then as a path from the site root; an http or https URL is used as is
title, plain text, defaultthe value of file
The window title
theme, enum, defaultauto
auto follows the site’s color scheme; or td-lighttd-darkasciinemadraculagruvbox-darkmonokainordsetisolarized-darksolarized-lighttango
fit, enum, defaultwidth
widthheightbothnone
cols / rows, positive integer, defaultfrom the .cast header
Override the terminal size; smaller than the recording clips it
speed, positive number, default1
Playback rate
startAt, number (seconds), default0
Where playback starts
idleTimeLimit, number (seconds), defaultfrom the .cast header
Longest a silent stretch plays for
poster, string, default—
The frame shown before playback, npt:mm:ss
autoplay, "true" / omitted, defaultoff
Play without a click; not recommended
loop, "true" / omitted, defaultoff
Replay at the end
preload, "true" / omitted, defaultoff
Fetch the recording as soon as the player appears
pauseOnMarkers, "true" / omitted, defaultoff
Pause at chapter markers
markers, time:label,time:label, default—
Named chapters on the progress bar, times in seconds on the player’s clock; see Chapter markers
The on/off parameters are on only when their value is the text true, so
loop="true" and loop=true both work and anything else means off. Other
invalid values warn and fall back: an unknown fit uses width, a speed
that is not a positive number uses 1, a non-numeric startAt uses 0, and
non-numeric cols, rows, idleTimeLimit or marker times are ignored. A
file with another scheme, a protocol-relative //host address, or an empty
value warns and renders nothing.
Limits
The player needs JavaScript. With scripts off, the window frame holds a
link to the recording instead.
Site search indexes page text, not recordings, so a command that appears
only in a recording cannot be found.
Few readers finish a recording longer than five or six minutes. Split a long
procedure into short recordings, each with its own text.
Related
Code blocks — the key commands and output, copyable
Steps — the recording beside the step it belongs to
Images — static screenshots: recordings for terminals, screenshots for graphical interfaces
Include — when the same commands appear on several pages
4.24 - Social
Quote a post from X, Bluesky, Mastodon, or another platform with a > [!SOCIAL] callout. The page supplies the quote and attribution without a platform script, and plain Markdown viewers show an ordinary blockquote.
When an article cites something posted on X, Mastodon or another network, a
> [!SOCIAL] callout quotes it as a card: avatar, name, handle, platform icon,
the post text and a dated link to the original. You write all of it into the
page, so the quoted text stays readable after the original is edited or
deleted. A local avatar and local attachments keep the card entirely on your
site, and the card takes its colors from the site’s preset and color scheme.
The source is an ordinary blockquote. GitHub, an editor preview or Obsidian
shows the name, the post text, its images and any quoted post without the
theme. To quote a book or a paper, a plain blockquote is enough.
Shortest form
The callout title names the author. Write the handle as a code span after the
name, then the post text in Markdown.
Source
> [!SOCIAL] Ron `@RonVonng`
>
> PostgreSQL is not just a relational database; it is a data-management framework capable of absorbing almost every workload. Replacing Kafka, Elasticsearch, MongoDB, and Redis with Postgres is a practical way to cut system complexity.
RRon @RonVonng
PostgreSQL is not just a relational database; it is a data-management framework capable of absorbing almost every workload. Replacing Kafka, Elasticsearch, MongoDB, and Redis with Postgres is a practical way to cut system complexity.
The title renders as written, inline Markdown included. Its code span is the
handle: the card shows it under the name, isolated as left-to-right text.
Writing the handle as code also keeps a Markdown viewer from turning
@user@instance into an email link.
The empty > line after the title is optional for Hugo. It keeps a viewer
that does not know [!SOCIAL], such as GitHub, from joining the title and
the first line of the post into one paragraph.
Without avatar, the card draws the first character of the title’s plain
text in a circle, after removing leading @, spaces, and invisible
characters such as a zero-width space. Emoji and combining marks stay whole,
and a person icon replaces an empty result. The card never requests a
default image or a Gravatar.
A complete card
The other facts go in a block attribute line directly under the callout, with
no blank line between them:
Source
> [!SOCIAL] Ron `@RonVonng`
>
> Released `pig`, the PostgreSQL extension package manager and Pigsty CLI. One command configures PG repositories on mainstream Linux distros and installs **hundreds of PostgreSQL extensions** through the native package manager.
>
> 
{avatar="images/ron-vonng.webp" date="2024-12-23" url="https://x.com/RonVonng/status/1871040275575124082" platform="x"}
Ron @RonVonng · X
Released pig, the PostgreSQL extension package manager and Pigsty CLI. One command configures PG repositories on mainstream Linux distros and installs hundreds of PostgreSQL extensions through the native package manager.
avatar resolves like any image. A value with a URL scheme is a remote
image that the reader’s browser loads directly. Any other value is looked up
as a page resource (or a resource of the section’s branch bundle), then a
global resource in assets/, and otherwise used as a path to the site’s
static files. Prefer page or assets/ resources, which the build always
finds. The name sits beside the avatar, so it is decorative (alt=""). The
card shows it small and crops it to fill its frame, so use a square image.
date is plain text, shown as written. A year-month (2026-11), a date
(2026-11-23), or a date and time with hours and minutes, optional seconds,
and an optional Z or ±HH:MM offset (2026-11-23 08:30,
2026-11-23T08:30:00+08:00) on a real calendar day becomes a
machine-readable <time datetime>; a space before the time is written as
T in the attribute. Anything else, including fractional seconds or a
+0800 offset, renders as plain text without <time>.
url turns the date line into a “View original” link. Give the post’s
HTTP(S) address (which receives rel="external") or a site-internal path;
an invalid URL warns and is dropped. It is optional, so you can still quote
a post that no longer exists.
The attached image is an ordinary Markdown image. This page turns on
image zoom, so it opens at full size.
Block attributes need markup.goldmark.parser.attribute.block: true, the
setting OINK already requires for callout icons and native Book figures.
Platforms
platform selects the brand icon and the platform name that screen readers and
RSS carry, and nothing else: every platform shares one layout, the preset owns
the colors, and the card never imitates a platform’s own interface. Without
platform the card shows no icon, so name the platform the post came from.
platform
Icon
x
fa-brands fa-x-twitter
bluesky
fa-brands fa-bluesky
mastodon
fa-brands fa-mastodon
threads
fa-brands fa-threads
weibo
fa-brands fa-weibo
zhihu
fa-brands fa-zhihu
telegram
fa-brands fa-telegram
linkedin
fa-brands fa-linkedin
none (default)
None (omits icon and platform name)
Source
> [!SOCIAL] Ron `@ron@fosstodon.example`
>
> OpenAI runs a single unsharded PostgreSQL cluster (one primary with 40+ read replicas) for its core workload. Vertical scale plus disciplined indexing still goes a very long way.
{platform="mastodon" date="2025-05-19 11:27" url="https://fosstodon.example/@ron/1002"}
> [!SOCIAL] `@pigsty.io`
>
> PostgreSQL is the Linux of databases: one kernel, hundreds of extensions, zero vendor lock-in.
{platform="bluesky"}
RRon @ron@fosstodon.example · Mastodon
OpenAI runs a single unsharded PostgreSQL cluster (one primary with 40+ read replicas) for its core workload. Vertical scale plus disciplined indexing still goes a very long way.
PostgreSQL is the Linux of databases: one kernel, hundreds of extensions, zero vendor lock-in.
The second card is quoted by handle alone, so it has no name, date or link.
Screen readers hear the platform name, which the card carries as visually
hidden text beside the decorative icon. An unknown or empty platform warns
and shows no icon. The handle appears exactly as written, because the theme
adds no @ and knows no per-platform rules: write @name for X and
@user@instance for Mastodon.
The body
The body is the callout’s own Markdown, rendered with the page, so
paragraphs, links, inline code, lists and footnotes work as usual. Everything
else a post can contain is written with syntax OINK already has, which is why
the card has no attributes for it.
Post content
Write it as
Text, links, code
Ordinary Markdown
One attached image
A Markdown image; image zoom applies when it is eligible
> [!SOCIAL] Ron `@RonVonng`
>
> One PostgreSQL documentation theme, two color schemes:
>
> ```gallery
> 
> 
> ```
{avatar="images/ron-vonng.webp" date="2026-11-24" platform="x"}
Ron @RonVonng · X
One PostgreSQL documentation theme, two color schemes:
Quoted posts
When the post quotes another, write the quoted post as a nested callout in
the body. Its attribute line carries one >, so it belongs to the inner
callout; the outer line follows without one. The inner card is compact (a
smaller avatar, name and handle on one line) and keeps its own date and link.
Leave platform off the inner card to keep the icon from repeating, or give
it for a cross-platform quote.
Source
> [!SOCIAL] Ron `@RonVonng`
>
> PostgreSQL 17 is out — billed as the world's most advanced open-source database. Before long, "open-source" may be the redundant part.
>
> > [!SOCIAL] PostgreSQL `@PostgreSQL`
> >
> > News: PostgreSQL 17 Released!
> {date="2024-09-26" url="https://x.com/PostgreSQL/status/1839292604854223176"}
{avatar="images/ron-vonng.webp" date="2024-09-27" url="https://x.com/RonVonng/status/1839521052843442618" platform="x"}
Ron @RonVonng · X
PostgreSQL 17 is out — billed as the world’s most advanced open-source database. Before long, “open-source” may be the redundant part.
Invalid input warns, and as long as there is a body, the quoted words are
kept.
Input
Result
No title, with body
Warns; the body renders as a plain blockquote, without the card. url survives only as the quote’s cite attribute; date, platform and avatar are ignored
No title, empty body, with url
Warns; renders a plain blockquote linking to url
Empty body, with url
Warns; a link-only card with the author line and “View original”
Empty body, no url
Warns; nothing renders
Unknown or empty platform
Warns; no icon
[!SOCIAL]- or [!SOCIAL]+
Warns; the fold marker is ignored
Invalid url or avatar
Warns; the attribute is dropped
Static avatar not under the project’s static/
Warns when static/ exists (ID social:avatar-static); keeps the path
Static avatar that climbs above the site root with ..
Warns (ID social:avatar-static); the avatar is dropped and the card draws the initial instead
Unknown attributes
Warn; ignored. class, data-* and aria-* pass to the card
Hugo’s x shortcode
Hugo ships its own x shortcode, {{</* x user="…" id="…" */>}}, and OINK
leaves it alone. It asks X’s oEmbed service for the post at build time, so a
clean build needs network access and the quote disappears when the post does.
Use a [!SOCIAL] callout for quotes that must build offline and stay
readable.
Output
The card loads no JavaScript. Print switches the card to the paper palette
regardless of screen color mode and prints the original URL after “View
original”. The Markdown and LLMS output keep the callout as written, with its
attribute line, so an agent reads the same blockquote the author wrote. RSS
carries the body (omitting <blockquote> on link-only cards) and an
attribution line with absolute URLs, without the avatar.
Reference
Title, inline Markdown, default—
The identity line, required. A code span in it is the handle
avatar, image source, default—
Remote URL / page or branch-bundle resource / global resource / static path; decorative. Without it, the card draws the first character (or a user icon)
date, plain text, default—
Shown as written; a year-month, date, or date-time (HH:MM, optional seconds, optional Z or ±HH:MM) on a real day renders as <time datetime>
url, URL, default—
Original post (HTTP(S) or site-internal path); links the date line
platform, enum, defaultnone
xblueskymastodonthreadsweibozhihutelegramlinkedinnone; selects the icon and the announced platform name
Body, Markdown, default—
The post; may contain images, a gallery fence, a video, footnotes, or a nested [!SOCIAL]
There are no attributes for engagement counts, verification badges, image
lists or quoted posts; images and quoted posts go in the body.
Limits
What you may quote, and which avatars and media you keep in the repository,
is your decision. When the original no longer resolves, remove url; the
quote itself stays.
There are no likes, reposts, view counts or verification badges, because
such numbers are snapshots that go stale.
Platforms differ only by their icon; there are no platform skins or brand
colors.
Threads, replies and polls are not modeled. Quote several posts as several
cards, separated by a blank line.
A plain Markdown viewer shows the [!SOCIAL] marker and the attribute line
as text, and no avatar, because the avatar is an attribute.
The static avatar check reads only the project’s own static/ directory,
and only when it exists. A file that a module mount or a custom staticDir
publishes also warns; list social:avatar-static under the site’s
ignoreLogs to silence that warning. The build skips remote avatar checks.
Prefer page-bundle or assets/ images and inspect the rendered card before
publishing.
Turn a Markdown link list into a grid of navigation cards, and use the shortcode when cards need icons, badges or images.
Cards lay out a few parallel destinations so the reader can pick one at a
glance: where to start, what to read next, which of three paths fits. Each card
is a linked title with a sentence under it, and the grid adapts to the width
of the page. A plain Markdown link list with {.cards} under it is all it
takes, so the source stays an ordinary list on GitHub. Do not use cards for
prose, which reads better as paragraphs, or for image collections, which
belong in a gallery. A section’s own landing page
usually needs no hand-written cards at all, because the theme can generate
them from the child pages (automatic cards).
Shortest form
Put {.cards} on the line after a link list. Each link becomes a card title,
and the text after — becomes its description:
Source
- [Get started](/docs/start/) — Start with OINK Starter, preview locally, then replace the site details with your own.
- [Authoring](/docs/write/) — How pages are organized and which front matter keys exist.
- [Customization](/docs/customize/) — Navigation, search, branding, languages.
{.cards}
Get started — Start with OINK Starter, preview locally, then replace the site details with your own.
Authoring — How pages are organized and which front matter keys exist.
The whole card is the click target, not just the title. The number of columns
follows the available width, down to one on a phone, so there is no
columns parameter.
Title-only cards
The description is optional: one link per item is enough.
When a description needs more than a sentence, write a loose list: the link in
one paragraph, the description in the next, and a blank line between items.
The title then sits on its own line above the description. {.cards} still
goes directly under the last paragraph, with no blank line in between.
Source
- [Front matter](/docs/write/frontmatter/)
Every page parameter is defined here exactly once: type, default, accepted
values, and the page that explains it.
- [Configuration](/docs/customize/config/)
Site parameters grouped by feature, each row linking back to the guide that
explains it.
{.cards}
Site parameters grouped by feature, each row linking back to the guide that
explains it.
Single-column list
For a directory of resources, where readers scan down rather than across,
write {.cards .td-cards-list} instead of {.cards}. The cards become one
column inside a single frame, separated by dividers, and each row grows with
its description. The shortcode form takes cards variant="list" for the same
result; any other variant warns and keeps the grid.
Component presentation shows the grid
and the list one after the other.
Icons and badges
A link list cannot carry icons, badges, images or a description with several
paragraphs; the cards and card shortcodes can. icon is exactly one Font
Awesome class pair, and badge is a short plain-text label beside the title.
Source
{{< cards >}}
{{< card title="Get started" link="/docs/start/" icon="fa-solid fa-rocket" badge="start here" >}}
Use OINK Starter and establish a local preview before customizing.
{{< /card >}}
{{< card title="Release and download pages" link="/docs/write/releases/" icon="fa-solid fa-box-open" badge="v0.5" >}}
A release card from `release_url` and `date`, plus a `checksums` block for download assets.
{{< /card >}}
{{< card title="Keyboard navigation" link="/docs/customize/keyboard/" icon="fa-solid fa-keyboard" >}}
Site-wide shortcuts and focus order.
{{< /card >}}
{{< /cards >}}
An icon that is not a single class pair such as fa-solid fa-rocket warns,
and the card renders without it.
Markdown bodies
The body of a card is ordinary Markdown, so it can hold inline code,
emphasis, links and lists. Parameters such as title and badge are plain
text.
Source
{{< cards >}}
{{< card title="Hugo Module" icon="fa-brands fa-golang" >}}
`hugo mod get github.com/pgsty/oink`. The recommended way; upgrading is one
version line.
{{< /card >}}
{{< card title="Git submodule" icon="fa-solid fa-code-branch" >}}
No Go installation needed:
-`git submodule add`- the theme lands in `themes/oink`{{< /card >}}
{{< /cards >}}
Hugo Module
hugo mod get github.com/pgsty/oink. The recommended way; upgrading is one
version line.
Git submodule
No Go installation needed:
git submodule add
the theme lands in themes/oink
A card without link, like these two, shows its title in bold and links
nowhere.
Cards with images
image puts a picture at the top of the card. It is looked up like
: page resource, then the current section’s resources, then a
global resource in assets/, then a static path such as /images/…, then a
remote URL. Local images carry their width and height, so the page does not
jump while they load.
Every image needs exactly one of image_alt="…", for an image that carries
information, or decorative=true, for one that is only ornament. With both,
the build warns and keeps the alt text; with neither, it warns and treats the
image as decorative.
Source
{{< cards >}}
{{< card title="The OINK shell" link="/docs/about/features/" image="/images/oink.webp" image_alt="An OINK documentation page: sidebar, article and table of contents" >}}
Sidebar, article, table of contents — each can be turned off on its own.
{{< /card >}}
{{< card title="Release notes" link="/docs/write/releases/" image="/images/releasenote.webp" decorative=true >}}
A decorative cover: `decorative=true` emits an empty alt and screen readers skip it.
{{< /card >}}
{{< /cards >}}
A decorative cover: decorative=true emits an empty alt and screen readers skip it.
Card images do not open in the image zoom
dialog, because clicking anywhere on the card already follows its link.
Automatic cards on section pages
A section’s landing page (_index.md) can list its child pages as cards with
no list in the source: the theme builds one card per child from its title,
description and icon. This site turns that on for every section:
hugo.yml
params:ui:section_index:cards# list | cards
A section can choose differently in its own front matter, and cascade passes
the choice down to its whole subtree:
content/docs/customize/_index.md
section_index:list
Generated and hand-written cards share the same styles; only the source of
the data differs. Let the theme list a section’s child pages, because a
hand-written list drifts out of step with the sidebar as pages are added or
renamed. Write cards by hand for anything else, such as external links or
recommendations from other sections. Configuration
defines these keys.
Which form to use
What you want
Which form
A grid of links with one-sentence descriptions
{.cards} link list
Icons, badges, images
cards / card shortcode
Lists, code or several paragraphs in the description
cards / card shortcode
A card with no link
cards / card shortcode
This section’s child pages
nothing at all — section_index: cards
Use the link list whenever it can hold your content: it still reads as a list
of links on GitHub, while shortcodes do not.
Output
Cards are pure CSS and load no script. In print, link-list cards stack in one
column, shortcode cards fall back to two columns, and no card breaks across a
page. In the page’s Markdown output, a link list stays as written and each
shortcode card becomes a line - [Title](link) (badge) — description.
Parameter reference
The native form:
{.cards}, list attribute line, default—
On the line after an unordered list; unordered lists only. Add .td-cards-list for the single-column list
First link in an item, Markdown link, default—
The card title and the whole card’s click target
Everything else, Markdown, default—
The description: after — in a tight list, its own paragraph in a loose one
card parameters (cards itself takes only an optional variant="list"):
title, plain text, default—
Required, non-empty. The card title
link, URL, default—
Site path, relative path, http(s):, mailto:; external links get rel="noopener"
icon, Font Awesome class pair, default—
For example fa-solid fa-rocket; a malformed value warns and is dropped
true marks a decorative image and emits an empty alt
Body, Markdown, default—
The card description
There is no cols, columns, accent, desc or color parameter. Unknown
parameters warn and are ignored.
Limits
{.cards} works on unordered lists only; on a numbered list it does
nothing.
{.cards} must sit directly under the list. A blank line before it, or
indentation that puts it inside the last item, loses the marker without a
warning: the build succeeds and the list stays a list. When no grid
appears, check that line first.
A card outside cards, alone or inside another shortcode, warns and is
skipped.
Only automatic section cards take a column count, through
params.ui.section_index_columns; hand-written grids always follow the
width.
A description longer than two lines belongs in a paragraph or a
callout.
Related
Fields — also has a native form and a shortcode form
Turn a Markdown definition list into a vertical timeline of dated or ordered events, for milestones, incident write-ups, product history or an agenda.
A timeline lays events along a vertical axis, each beside its marker: a date,
a time, a version, “Day 2”, whatever puts the events in order. Use it for
project milestones, the sequence of an incident, a product’s history or an
agenda; Where a timeline fits compares it with steps, update entries
and Gantt charts.
You write an ordinary Markdown definition list, one term per marker and one
definition per event, and put {.timeline} on the line below it. The theme
adds only CSS, so the source stays plain Markdown and the page loads no script.
Shortest form
Write each marker on its own line and its event on the next line after : ,
with a blank line between entries. Put {.timeline} directly under the last
event.
Source
2024-03-12
: **v1.0.** First stable release: single-node installs on EL 9 and Ubuntu 24.04.
2024-11-05
: **v2.0.** Streaming replicas and automatic failover.
2025-09-30
: **v3.0.** PostgreSQL 18 becomes the default version.
{.timeline}
2024-03-12
v1.0. First stable release: single-node installs on EL 9 and Ubuntu 24.04.
2024-11-05
v2.0. Streaming replicas and automatic failover.
2025-09-30
v3.0. PostgreSQL 18 becomes the default version.
Both kinds of line break matter. {.timeline} must touch the last event: after
a blank line Goldmark drops the attribute line and renders a plain definition
list, while the theme logs a build warning naming the page. The blank lines
between entries are required too, because without one the next marker becomes a
line of the previous event’s text and its event attaches to the previous marker.
Markers
A marker is one line of free text. The theme does not parse it, so 2026-11,
09:02, v1.6.0, Day 2 and Q3 2026 – Q1 2027 all work, and events stay
in the order you write them. Markers are set small and semibold with tabular
figures, so times and dates line up; plain text suits them best.
Source
09:02 UTC
: **Alert.** The deploy workflow fails on the production branch.
09:14 UTC
: **Cause found.** A new page links to a heading that was renamed, and the link check stops the build.
09:40 – 10:15 UTC
: **Fix.** The link is corrected and the site rebuilds.
10:30 UTC
: **Resolved.** Production serves the new page.
{.timeline}
09:02 UTC
Alert. The deploy workflow fails on the production branch.
09:14 UTC
Cause found. A new page links to a heading that was renamed, and the link check stops the build.
09:40 – 10:15 UTC
Fix. The link is corrected and the site rebuilds.
10:30 UTC
Resolved. Production serves the new page.
On wide screens the marker column grows with the longest marker up to 10rem,
and a longer marker wraps inside it. A marker cannot continue onto a second
source line: every line directly above a : line is a marker of its own, so
two marker lines in a row leave the first without an event (the axis still
bridges across them).
Event content
An event is a definition, so it can hold continuation paragraphs, lists and
fenced code, indented two spaces to the column after : . A bold phrase at the
start is the usual event title; it is a writing convention, and the theme
styles it as ordinary bold text.
Source
2025-09-30
: **v3.0.** PostgreSQL 18 becomes the default, and PostgreSQL 13 leaves the supported list.
A cluster still on PostgreSQL 13 upgrades in two moves:
- take a fresh base backup;
- run `pg_upgrade` on the primary, then rebuild the replicas from it.
```bash
pg_upgrade -b /usr/pgsql-13/bin -B /usr/pgsql-18/bin -d /var/lib/pgsql/13/data -D /var/lib/pgsql/18/data --link
```
Next release
: **Logical replication.** One command sets up publications and subscriptions between clusters.
{.timeline}
2025-09-30
v3.0. PostgreSQL 18 becomes the default, and PostgreSQL 13 leaves the supported list.
A cluster still on PostgreSQL 13 upgrades in two moves:
take a fresh base backup;
run pg_upgrade on the primary, then rebuild the replicas from it.
Logical replication. One command sets up publications and subscriptions between clusters.
The axis runs along the start edge of each event, so it stays unbroken however
tall an event grows.
Several events under one marker
Write more than one : line under a marker for events that share it. They
follow one another on the axis under a single node.
Source
2025-10-14
: **v3.0.1.** Fixes a failover timeout on clusters with more than three replicas.
: **v3.0.2.** The same day, a patch restores air-gapped installs, which 3.0.1 broke.
2025-12-02
: **v3.1.** Point-in-time recovery from the command line.
{.timeline}
2025-10-14
v3.0.1. Fixes a failover timeout on clusters with more than three replicas.
v3.0.2. The same day, a patch restores air-gapped installs, which 3.0.1 broke.
2025-12-02
v3.1. Point-in-time recovery from the command line.
Two columns: markers end-aligned against the axis, events beside them; the marker column fits its content up to 10rem
Narrower viewport or inside cards
One column: each marker above its event, with the axis and nodes on the start edge
Ink and Terminal presets
Square nodes (0px in Ink, 2px radius in Terminal) instead of round ones
Forced colors
The axis and nodes use the system text color
Right-to-left pages
The axis moves to the right, and the whole layout mirrors while keeping timestamps in natural order
The styles apply only to dl.timeline inside article content, so definition
lists without the marker, and any element your site already calls .timeline
outside the article, are left alone.
Prerequisites
Definition lists are a Goldmark extension that Hugo enables by default. The
attribute line needs Goldmark block attributes, one of the
site prerequisites every component shares.
With definition lists turned off, each marker and its event render as one
paragraph with a literal colon.
Output
Timelines load no JavaScript. Screen readers announce each marker and event as
a term and its definition, in source order; the axis and nodes are decoration.
Print switches the timeline to paper ink regardless of the screen color scheme,
keeps each marker with its event and avoids breaking inside short events;
Markdown and LLMS output keep the list and its {.timeline} line as written,
and feed readers show a plain definition list.
Parameter reference
The definition-list syntax:
Marker line, Requiredyes
One line of free text; plain text recommended. Each line directly above a : line is its own marker
: event, Requiredyes
At least one per marker. Continuation blocks are indented two spaces
Further : lines, Requiredno
More events under the same marker, sharing its node
Blank line, Requiredyes
Between entries; without it the next marker joins the previous event’s text
{.timeline}, Requiredyes
The line directly below the last event, with no blank line before it
A timeline has no attributes of its own: no icon, color, badge, link or
compact variant. An id or further classes on the same line, as in
{#history .timeline}, pass through Goldmark onto the <dl>.
Limits
When placing a timeline directly inside a callout
(> [!NOTE] ...), leave one blank > line after the callout header;
without it Goldmark absorbs [!NOTE] into the first marker and the theme
logs a build warning.
Events take no icon, color, badge or link parameters. Put a link or a
badge in the event text instead.
Because Hugo has no <dl> render hook, attributes on the {.timeline} line
follow Goldmark’s default filtering (which strips on* handlers but passes
style), unlike render-hook components.
GitHub and some editors do not render definition lists, but the source
still reads naturally: a marker line followed by : event lines.
Markers are not parsed, sorted, grouped or localized; events appear in
source order.
Events are not headings and do not appear in the TOC. Use
update headings when they should.
Mermaid — Gantt charts and timeline diagrams for schedules
4.27 - Update
Write a changelog, a “What’s new” page or weekly notes as ordinary headings marked {.update}, with an optional date and tags under each entry.
An update is a changelog entry written as an ordinary Markdown heading with
{.update} at the end. Each entry gets extra space and a separator rule above
it, which gives a long stream of entries its rhythm, and optional date and
tags attributes add a metadata line under the heading. Use updates for a
one-page changelog, a “What’s new” page, weekly notes or a log of policy
changes.
Because the entry is still a heading, it keeps everything a heading has: its
table-of-contents entry, anchor, search section and print ID. No script loads.
When each version needs a page of its own, use release pages
instead.
Shortest form
Put {.update} at the end of the heading, with date and tags inside the
same braces. Write an explicit #id first for version entries: Goldmark strips
dots when building an anchor from heading text (v1.6.0 — … becomes
#v160--…, and v1.10 collides with v11.0), while {#v1-6-0 .update …}
keeps a clean, stable link even if the title changes.
Source
### v1.6.0 — PostgreSQL 18 by default {#v1-6-0 .update date="2026-11-23" tags="Breaking, Performance"}
New clusters get PostgreSQL 18, with asynchronous I/O turned on.
v1.6.0 — PostgreSQL 18 by default
, Breaking, Performance
New clusters get PostgreSQL 18, with asynchronous I/O turned on.
A changelog page usually writes each entry as ##. The examples here use
### so that they nest under this page’s own sections in the table of
contents.
Date
date takes a year, a month or a day (YYYY, YYYY-MM or YYYY-MM-DD). It
renders as <time datetime="…"> and shows exactly as written, so 2026-11
stays 2026-11.
## 2026 in review {.update date="2026"}
## November notes {.update date="2026-11"}
## v1.6.0 {.update date="2026-11-23"}
Any other value — including an impossible calendar date such as 2026-02-30 or
2025-02-29, a timestamp with a time or time zone, or an unquoted number such
as date=2026 — warns, naming the heading and the page. The date is dropped
while the heading, any valid tags and the rest of the entry stay. Leap days
such as 2024-02-29 pass.
An unquoted full date such as {.update date=2026-11-01} goes further wrong:
Goldmark cannot parse it, drops the whole attribute block and leaves it in the
heading text. The build warns whenever a heading ends in an unparsed {…}
block containing .update, with or without a leading #id, as in
{.update date=2026-11-01} or {#v1-6-0 .update date=2026-11-01}. Quote
every value.
Tags
tags is a comma-separated string of plain text (both , and full-width ,
separate items). Each item is trimmed and empty items are skipped, so
tags=" Fix ,, Docs " gives two chips, Fix and Docs. A non-string value such
as tags=true warns and is dropped. Every chip looks the same whatever it
says, in a color set by the preset, and Markdown inside a tag shows literally.
These are not Hugo taxonomy tags: they create no term pages and link nowhere.
The theme does not translate them, so write them in the page’s language.
Entries without metadata
Both attributes are optional. ## Unreleased {.update} is a valid entry with
the entry spacing and separator rule but no metadata line, and the line is
also left out when there is no date and tags holds only commas and spaces.
The text under an entry is ordinary Markdown, and lower headings inside an
entry are ordinary headings that nest under it in the TOC without a marker.
Still a heading
The marker changes nothing a heading already does:
The TOC shows the heading text only, without the date or tags.
The anchor and the self-link that appears on hover work as usual.
Local search indexes the entry as a section titled with the heading text; when offline_search_index is content (the theme default), the date and tags are indexed as separated tokens inside that section’s text.
Multi-page Print namespaces the heading ID as it does for any heading.
The metadata line follows the heading rather than sitting inside it, so the
heading text, its accessible name and its search title stay exactly as
written. Without an explicit #id the anchor comes from the heading text (dots
removed and titles turned into long slugs), and renaming the entry changes its
link, so give an #id to every version entry and any entry that other pages
link to.
A changelog on one page
A stream of entries, newest first. The three entries and the subsection below
appear in the table of contents under this section.
Source
### Unreleased {#demo-unreleased .update}
One command sets up logical replication between two clusters.
### v1.6.0 {#demo-v1-6-0 .update date="2026-11-23" tags="Breaking"}
PostgreSQL 18 is the default version for new clusters.
#### Upgrade notes {#demo-v1-6-0-upgrade}
- Set `pg_version: 17` in the inventory to keep creating PostgreSQL 17 clusters.
- Rename `pg_backup_dir` to `backup_dir`.
### v1.5.1 {#demo-v1-5-1 .update date="2026-11" tags="Changed, Fixed"}
Failover no longer times out on clusters with more than three replicas.
Unreleased
One command sets up logical replication between two clusters.
v1.6.0
, Breaking
PostgreSQL 18 is the default version for new clusters.
Upgrade notes
Set pg_version: 17 in the inventory to keep creating PostgreSQL 17 clusters.
Rename pg_backup_dir to backup_dir.
v1.5.1
, Changed, Fixed
Failover no longer times out on clusters with more than three replicas.
Update or release pages
Need
Use
One readable stream of entries on one page
.update headings
One page per version, with its own URL, feed item, release assets or GitHub release
Choose one model as the source of truth for a product’s release notes — either
a single .update changelog page or per-version release pages collected by
layout: releases — rather than maintaining the same version in both places.
If a separate “What’s new” page highlights a milestone that already has a
release page, link to that release page instead of repeating its notes.
Output
Updates load no JavaScript. In HTML the heading gets class="update" and is
followed by <div class="td-update-meta">, which holds the <time datetime>
and one <span class="td-update-tag"> per tag. A comma that takes no space on
screen sits between the items, so copied text, local search and feed readers
get 2026-11-23, Breaking, Performance instead of
2026-11-23BreakingPerformance. Print uses the light paper colors in either
color mode and keeps each heading on the same page as its metadata line.
Markdown and LLMS output keep the heading line with its attribute block (raw
Markdown viewers such as GitHub show {…} literally), and the page stays one
page with one URL, so entries never become separate feed items.
Parameter reference
The attribute block at the end of the heading:
.update, marker, default—
Makes the heading an entry; any level, usually ##
date, string (YYYY, YYYY-MM or valid calendar YYYY-MM-DD), default—
Rendered as <time datetime> and shown as written; non-strings and invalid dates warn and are dropped
tags, string (, or , separated plain text), default—
One neutral chip per non-empty item, trimmed; non-strings warn and are dropped
id, anchor, defaultfrom the heading text
Recommended for version entries, written first: {#v1-6-0 .update …}
date and tags work only together with .update; on any other heading they
warn as unknown attributes and are dropped.
Limits
There is no sticky label rail or two-column layout; the table of contents
already tracks the entries.
Entries get no URLs or feed items of their own. Use
release pages when each version needs one.
The TOC shows the heading text only, so put the date in the heading text
when readers should see it there.
Tags are not translated, colored or linked.
Entries appear in source order, with no sorting, filtering or generation
from data.
Cards, disclosures, tabs, and compact procedures across OINK’s six visual presets.
This page shows the everyday components side by side with their compact
variants, so you can judge how each looks before choosing it: switch between
Paper, Slate, GitHub, Ink, News and Terminal, light or dark, from the
Appearance menu and compare. Each variant is one extra class or a variant parameter on the
Markdown you already write. None loads a script or changes links, keyboard
use, copied text, print or Markdown output, and an unknown variant warns and
falls back to the regular look.
Set navigation, languages, appearance, and search.
For a compact directory of resources, {.cards .td-cards-list} turns the
same link list into a single framed list with dividers, each row as tall as
its description needs.
Callouts have no variants; compare their colors and the disclosure row in each
preset.
Keep a local preview
Review the page at a narrow width as well as on your desktop.
Check the destination
Confirm the destination before publishing a new version.
How does this work without JavaScript?
The disclosure is a native HTML details element. It remains usable with scripts disabled.
The title, chevron, and focus outline share one stable summary row.
Longer titles can wrap without displacing the chevron or reducing the interactive area
Each disclosure opens independently. Other content stays in its current state.
Tabs and commands
macOS / Homebrew
brew install hugo
Debian / Ubuntu
sudo apt install hugo
Add {class="td-code-command"} to a one-line fence to make it a command
strip. The copy button gets its own column, so a long command scrolls or wraps
without running under it.
hugo server --bind 127.0.0.1 --port 1313
hugo --environment production --baseURL https://example.com/documentation/ --destination public
wrap, copy and accessible labels work as on any code block. A command
strip holds exactly one line, so a multiline, numbered or collapsed block with
this class warns and renders as a regular code block.
Short procedures
For a short procedure, add .td-steps-compact to the marker:
{.steps .td-steps-compact}. Keep the regular .steps for long tutorials,
where the extra spacing helps.
Review the configuration.
Run the local preview.
Check the generated output.
A procedure with headings uses the shortcode with variant="compact", written
with percent delimiters:
Preview
Run the development server and open the changed page.
Review
Check the page in the language and appearance your readers use.
Tables and metadata
Tables, field lists, badges and key sequences have no variants either; they
are here so you can check them against the rest of the preset.
View
Purpose
Input
Cards
Related resources
Link list
Steps
Ordered procedure
Ordered list
Tabs
Equivalent alternatives
Adjacent blocks
title, Typestring
A concise title that may wrap naturally.
description, Typestring
Supporting information, separate from the main label.
PreviewValidatedReview needed
Open search with Ctrl+ with K and move between results with the arrow keys.
5 - Customization
Configure the site brand, navigation, layout, search, languages, versions, print output, and agent output.
Customization covers whatever applies to the whole site rather than to one
page: how it looks, how readers find their way around, what it publishes
besides HTML, and which languages and versions it serves. Most of it is a key
in hugo.yml; the rest lives in data files under data/ and in your own
stylesheets under assets/. To write a page and set its front matter, see
Authoring.
Find every site parameter that the theme reads, with its type, default, description, and related guide.
Every site-wide setting OINK reads lives in hugo.yml and appears in a table
on this page with its type, its default and a link to the guide that shows it
in use. The defaults are conservative: local search, image zoom, comments, page
feedback and the light/dark menu stay off until you turn them on, so your
configuration only needs the keys you want to change. There is no master
switch and no params.oink.* namespace, so a key that is not on this page does
nothing. Settings for a single page are in
Page parameters.
An empty Default cell means the theme has no default and the feature stays off
until you set the key. Each group has its own anchor, such as
/docs/customize/config/#sidebar.
The layers of hugo.yml
Configuration keys come in four layers, and the layer tells you where a key’s
behavior is documented:
OINK checks every value it reads. When it cannot use one, such as a misspelled
choice, a string where a boolean belongs, or a color that is not hex, it prints
a warning that names the key, the value and the fallback, then continues with
the documented default:
The site keeps building, so a typo under hugo server changes one setting
instead of taking every page down. The same applies to front matter overrides,
where the warning also names the page. Read the warnings after each change,
because a warning usually means a feature you expected is running on its
default or is switched off; Verifying a configuration change lists
the common ones.
For the same reason, leave Hugo’s --panicOnWarning off: OINK reports
fallbacks as warnings on purpose, and the flag would turn each one into a
failed build.
Features that depend on an outside service stay off until their configuration
is complete. Draw.io without drawio_server, maps without tiles and
attribution, Algolia without all three keys and giscus without its four
required values each warn and render nothing; the theme never substitutes a
public service of its own choosing. Upstream attribution that is missing
required fields also warns and is left out entirely, because a partial credit
line would look complete.
One check keeps your value. If theme_color reads below 4.5:1, the AA
contrast for body text, against the theme’s canvas, the color still ships,
since a custom canvas or a brand rule may justify it. The warning prints an
ignoreLogs id you can add to silence it. Only a value that is not a hex color
is dropped, leaving the default palette.
Hugo itself can still stop a build when a content reference resolves to no
page.
Page-level override precedence
Most parameters can be overridden for one page or a whole section. Hugo’s
.Param lookup takes the first value it finds, in this order:
The page’s own front matter;
cascade in an ancestor section’s _index.md (the nearest wins);
Site params.
Drop the ui. prefix in front matter. The site key params.ui.reading_time
becomes reading_time on a page. The theme silently ignores a ui: block in
front matter, so when an override seems to have no effect, check the key name
against Page parameters first.
Override where the content genuinely differs. A page that rebuilds its own
visual system out of overrides tends to drift out of step with the rest of the
site after a theme upgrade.
The three Goldmark prerequisites
Hugo does not merge a theme module’s markup settings into the site, so
these lines belong in your own hugo.yml:
hugo.yml
markup:goldmark:parser:# block images may carry an attribute line ({caption=…}, numbered figures)wrapStandAloneImageWithinParagraph:falseattribute:block:truerenderer:# HTML emitted by `{{% … %}}` shortcodes has to surviveunsafe:trueextensions:passthrough:enable:truedelimiters:block:[['\[','\]'],['$$','$$']]inline:[['\(','\)']]highlight:# class-based highlighting, so light and dark can each have a palettenoClasses:falsetableOfContents:endLevel:4
The first three settings are the prerequisites every OINK site needs; the rest
switch on math, theme-aware highlighting and a deeper outline. Each one shows
a visible symptom when it is missing:
Setting
Without it
parser.attribute.block: true
Attribute lines such as {.fields}, {.steps} and {caption=…} print as literal text
parser.wrapStandAloneImageWithinParagraph: false
A standalone image cannot take an attribute line, so captions and numbered figures do not work
renderer.unsafe: true
Hugo escapes the HTML that steps, cards and {{% … %}} shortcodes produce
extensions.passthrough
\(x\) and $$…$$ stay as text instead of becoming formulas
highlight.noClasses: false
Code is colored with inline styles, so it cannot switch palette with dark mode
tableOfContents.endLevel: 4
Optional: without it the outline stops at ### headings
renderer.unsafe: true also lets raw HTML in Markdown through. That suits a
team writing its own documentation, but it is not a filter: if the site
publishes contributions from untrusted authors, review them before they merge.
Site identity and brand
Hugo’s own keys name the site and turn on Git metadata:
title, string
Site name, shown in the navbar, <title> and the footer
baseURL, string
The production domain. Include the path segment for a subpath deployment
copyright, string
Fallback copyright line, rendered as HTML when params.copyright is unset
enableGitInfo, boolean, defaultfalse
Needed for “last modified” dates and commit information
enableRobotsTXT, boolean, defaultfalse
Generates robots.txt
enableEmoji, boolean, defaultfalse
Allows :smile: emoji shortcodes
The theme’s keys add the logo, footer text and accent color:
params.logo, string, defaulticons/logo.svg
Brand mark, from an assets/ resource or a static/ path. See Brand and appearance
params.wordmark, string
Horizontal wordmark shown beside the logo in place of the site name. Below 992 px the navbar shows the logo alone
params.description, string
Site description, used as the meta description when a page has none
params.copyright, string or map
A string renders as Markdown. A map takes authors, from_year and to_year; present means the current year
params.footer_center_info, string, defaultPowered by Oink
Inline Markdown in the middle of the footer. An empty string hides it
params.author, string or map
The RSS author. A map takes name and email
params.ui.theme_color, string
#rgb or #rrggbb accent for the shell’s colored backgrounds. Prose links and inline code keep their own colors. See Brand and appearance
The dark-mode accent. When omitted, the theme lightens theme_color until it meets AA contrast on the dark canvas
Favicons have no parameter: the theme picks up the conventional file names in
static/ (favicon.ico, favicon.svg, favicon-NxN.png,
apple-touch-icon.png, apple-touch-icon-NxN.png). See
Brand and appearance.
Shell types and section roots
The reading shell follows a page’s type, not its folder, so documentation
can live in any directory as long as a cascade gives it type: docs.
Site-wide defaults for Expo albums. A page’s own expo
block replaces this block as a whole and takes built-in defaults for the fields
it leaves out, and a reader’s saved mode and size override both. The complete
rules are in Expo defaults.
params.ui.expo.images, string, defaultimages/*
Pattern that selects the image resources in the page bundle
params.ui.expo.mode, enum, defaultwall
wall, cards or seamless
params.ui.expo.size, integer, default240
Target tile size, from 160 to 360 CSS pixels
Blog
These keys shape the section named by params.ui.blog_section, and each can be
overridden for one section through front matter or a cascade on the blog
root. The blog layout guide compares the four index
layouts side by side.
params.ui.featured_image, enum, defaultnone
How a post’s featured image appears on its page and in section indexes: none shows nothing, banner a 16:9 figure above the title, wash the image behind the article header at one-tenth opacity, hero a full-bleed background behind the shell that moves the opening down. It is the same image as the post card and og:image, so the three always agree. Without an image, every mode shows nothing
params.ui.blog_index, enum, defaultlist
list horizontal entries, cards image cards, table compact rows, gallery linked covers. All are newest first; table always lists the whole section on one page
params.ui.blog_index_columns, integer, default3
Columns for blog_index: cards from the xl breakpoint up. Between md and xl there are always two columns, below md one
params.ui.blog_index_size, integer, default12
Posts per page for list, cards and gallery, and for all four layouts when blog_index_toggle is on. A standalone table ignores it
Publishes all four layouts and lets readers cycle list → cards → table → gallery, remembering their choice. When false, only the configured layout is published
params.ui.blog_gallery.mode, enum, defaultwall
Tile arrangement inside gallery: wall with 6px gaps, seamless with none, cards as a masonry with visible captions. Independent of blog_index
params.ui.blog_gallery.size, integer, default240
Target gallery tile size, 160–360 CSS pixels. It does not change the number of posts per page
params.ui.toc_style, enum, defaultfixed
Right-rail presentation: fixed pins a panel to the viewport; flow uses a wider panel that starts level with the article and pins only once you scroll
params.ui.toc_taxonomies, boolean, defaulttrue
Taxonomy term clouds in the right rail. A rail with neither an outline nor clouds is not rendered
A page or cascade blog_gallery block replaces the whole site block. Fields it
leaves out take wall and 240. A reader’s saved arrangement and size
override the author’s defaults and are kept separately from Expo preferences.
See Gallery.
The navbar, the footer and the page-action menu at the right end of the
breadcrumb row:
params.ui.navbar_enabled, boolean, defaulttrue
Whether the site navbar renders. A page overrides it with a top-level navbar_enabled. See Navigation and menus
params.ui.navbar_autohide, boolean, defaultfalse
The navbar slides up out of view and returns when the pointer reaches its wake zone at the top. Inactive below 768px and on coarse pointers
params.ui.footer_style, enum, defaultfat
fat is a multi-column grid plus the copyright line, slim the copyright line only, none nothing
params.ui.dark_mode, boolean or map, defaultfalse
true turns on the dark palette and the light/dark control. { show_menu: true } implies enable: true; { enable: true, show_menu: false } keeps the palette without showing the menu control
params.ui.breadcrumb, boolean, defaultper-shell (true; false in blog)
Breadcrumbs above the title. A top-level section never shows a one-level breadcrumb
From this page count on, pages that share a language, sidebar root and effective settings reuse one copy of the navigation markup, and the browser marks the active entry
params.ui.sidebar_width_min, integer, default220
Narrowest width, in pixels, the reader can drag the sidebar to on the desktop
params.ui.sidebar_headings, boolean or integer, defaultfalse
type: book only: shows the current page’s headings as a branch under its sidebar row. Takes an integer from 2 to 4; true means 2
params.ui.sidebar_enabled, boolean, defaulttrue
The left sidebar. Usually turned off per page rather than for the whole site
params.ui.taxonomy_icons, map, defaultbuilt-in
Icons per taxonomy, keyed by plural. Each taxonomy has two: taxonomy for the whole classification, such as a right-rail cloud heading, and term for one term’s badge. A string such as tags: fa-solid fa-tags sets both; a map with taxonomy and term sets them separately, and a key it leaves out keeps the built-in. Built-in pairs cover tags, categories, modules, authors and series; any other taxonomy uses a generic shapes icon
Table of contents
Hugo decides which heading levels the right-hand outline collects; the theme
only controls how it follows your reading. Hide the outline on one page with
notoc: true (Page parameters).
No effect: the outline always highlights the current heading. Safe to delete from older configurations
Pager and page end
The blocks at the end of a page always come in the same order: share,
feedback, page information, pager, comments. Each has its own switch.
Backlinks sit in the right rail beside the outline.
params.ui.share, list, default[]
Share targets at the page end, in the order listed, chosen from xblueskymastodonfacebooklinkedinreddithackernewstelegramwhatsapplinepinterestweibochatgptclaudeemailcopy. An empty list hides the bar. Each target is a plain link, with no SDK, iframe, third-party script or share count. An unknown target warns and is dropped. See Writing a blog
Types that show previous and next links. Turn them off on one page with pager: false. An unknown type warns and is dropped
params.ui.annotation, boolean, defaulttrue
The “last modified” and provenance block at the end of the body. Upstream attribution comes from the page’s upstream_link keys; see Page parameters
params.ui.backlinks, boolean, defaultfalse
A “Backlinks” group in the right rail listing the pages that link here, worked out at build time from ordinary links. See Navigation and menus
params.ui.compare, boolean, defaultfalse
Duo View: two panes side by side on Docs, Book and blog pages that have an HTML translation on the same site. A language can set it to false to opt out. See Duo view
params.ui.translation_notice, language code or false, defaultfalse
The language code of the authoritative version, so that a translated page shows a line pointing back to it. A page opts out with translation_notice: false
Your own palette commands, each with either a url or a built-in action. See Command palette
params.gcs_engine_id, string
A Google Programmable Search engine ID. Searches then go to Google
params.search.algolia, map
Algolia DocSearch. appId, apiKey and indexName are all required
A custom command takes only seven keys: id, title, description, icon,
keywords, url and action. The id must match ^[a-z][a-z0-9_-]*$ and
must not repeat a built-in action ID. Put per-language titles under
languages.<lang>.params.ui.command_palette.commands.
Keyboard
params.ui.keyboard_nav, boolean, defaulttrue
Twenty-nine single-key shortcuts for navigation, page actions and the view, plus the browsing history and the reader’s column width. With false, the runtime is left out of the page, so nothing is bound, recorded or restored. See Keyboard navigation
Image zoom
params.ui.image_zoom, boolean, defaultfalse
Lets body images open full size. A page overrides it with image_zoom in front matter
Site-wide look: paper or slate, or the explicit experiments github, ink, news and terminal
params.ui.preset_menu, boolean or list, defaultfalse
true lets readers choose Paper, Slate or the site default. A list names the presets offered, may include the experiments, and must include the site default. Independent of dark_mode
params.ui.typography, enum, defaulttechnical
technical uses the selected preset’s bundled fonts (Paper: Plex Sans; Slate: Inter); system uses the platform font stack and requests no brand font
params.ui.fonts, map
Font-family names for the ui, body, heading, code, display, meta, brand and print roles. The theme checks the names but loads no font files. End each list with a generic family
params.page_width, enum, defaultnormal
Overall shell width: normal, wide, full. Overridable per page
params.reading_width, enum, defaultnormal
Body text width on Book pages: slim, normal, wide. The shell is unaffected
params.ui.fonts suits faces that are already on the reader’s system or that
the site declares with @font-face. To ship font files with the site or
change finer typography, use the project stylesheet; see
Brand and appearance.
Comments and feedback
Comments use giscus, which keeps each page’s discussion in a GitHub repository;
page feedback is two buttons with no backend of its own.
params.comments.enable, boolean, defaultfalse
Site-wide comment switch. A page overrides it with comments in front matter. See Comments
params.comments.type, string, defaultgiscus
Only giscus renders today
params.comments.giscus.repo, string
The GitHub repository that holds the discussions; required
lazy requests the giscus script only when the reader nears the comments, except on return from GitHub sign-in; eager requests it at once
params.comments.giscus.lang, string, defaultderived from the site language
The giscus interface language. When unset, Chinese sites resolve to zh-CN, zh-TW or zh-HK and other languages use their base code; a language giscus does not support falls back to en
Text shown when loading fails. The default is “Comments could not be loaded.” in the page’s language
params.ui.feedback.enable, boolean, defaultfalse
“Was this page helpful?” buttons at the page end. There is no backend; when gtag is present, each answer is recorded as a structured event
params.ui.feedback.reasons, boolean, defaulttrue
Offers four optional reasons after “no”
Without all four required giscus values, the page has no comment section.
Comments shows where to find them.
Repository links and page information
Links from each page back to its source, and the information block at its end:
params.github_repo, string
URL of the repository that holds the content. Drives “Edit this page”, “View edit history”, “Create child page” and “Create docs issue”. See Repository links and page info
URL of the product repository, for “Create project issue” and the navbar GitHub entry
params.github_branch, string, defaultmain
The branch that edit links point at
params.github_subdir, string
The content site’s subdirectory inside a monorepo
params.path_base_for_github_subdir, string or map
Rewrites source paths (normalized to /) before they become repository links. A map takes from and to. Content mounted from outside the repository needs an explicit mapping to a repository-relative path. See repository links
params.github_url, —, default—
Removed and ignored. Use params.github_repo
params.ui.lastmod_commit, enum, defaultsubject
What follows “last modified”: subject the commit subject, hash the short hash, none nothing
params.images, string array, default—
Site-wide social card: supplies og:image for pages without their own image. Metadata only; never shown as a list thumbnail
params.upstream_source, string, default—
Default data/upstreams record for pages that declare upstream_link. A page’s front matter can override it
params.upstream_modified, boolean, defaultfalse
Site default for whether attributed material has been adapted. A page can override it. Nothing renders without upstream_link
params.default_featured, —, default—
Removed and ignored. Use params.images, or images in a section cascade
Content runtimes
Mermaid, KaTeX, ECharts, Infographic, Asciinema, Swagger UI and Redoc load by
themselves on the pages that use them, and only in HTML output, so they have
no switch. The features below need one, mostly because they talk to a service
you choose. PlantUML renders in the reader’s browser unless you set
svg_image_url, which hands rendering to a server;
PlantUML compares the two modes.
params.markmap, boolean, defaultfalse
Turns on the mind-map fence site-wide. See Markmap
params.mermaid, map
Configuration passed to mermaid.initialize(). Keys are lowercase. Dark mode overrides theme automatically
params.plantuml, boolean or map, defaultdisabled
true turns on local rendering; false turns off all PlantUML rendering
Turns on interactive maps; needs tiles and attribution
params.map.tiles, string
HTTPS tile template with {z}, {x} and {y} ({s}, {r} and {-y} allowed; any other placeholder warns and the template is ignored). The theme names no tile service; required when enabled
params.map.attribution, string
The plain-text attribution the tile service requires. Required when enabled
params.map.attribution_url, string
Optional https:// URL turning attribution into a clickable link
params.map.dark_tiles, string
Optional tile template for dark mode
params.map.subdomains, string
Optional {s} subdomain characters as a quoted string (e.g. abcd, "01234567"); empty uses Leaflet’s abc
params.map.max_zoom, integer, default19
Highest zoom level, 1–22
params.map.loading, lazy | click, defaultlazy
Mount near viewport (lazy) or wait for a reader click (click)
params.highlight_classes, boolean, defaulttrue
Emits Chroma classes for syntax highlighting; false returns to Hugo’s inline styles
params.ui.code_copy, boolean, defaulttrue
Copy button on code blocks. false removes it site-wide; a fence’s own copy= still wins
params.ui.rich_copy, boolean, defaulttrue
Typeset HTML copy for article prose selections pasted into rich-text editors; overridable per page or cascade. See Copying into rich-text editors
The theme defines extra output formats but turns none of them on, because some
are expensive to build and most sites need only a few. List the ones you want
under outputs:
Optional JSON at a Book root for EPUB and PDF packaging tools. It is not an ebook itself
RSS
index.xml
Hugo’s own format. Add it to section to give each section a feed
LLMSFULL and BookManifest go in the front matter of the top-level section
that publishes them, not in the site configuration, and NAVJSON belongs on
outputs.home. AI-agent support and
Books have complete examples.
Two parameters shape the print output:
params.print.toc, boolean, defaulttrue
A table of contents at the top of the print page. false leaves it out
Hugo’s own: turns on tag: tags and category: categories. See Taxonomies
params.taxonomy.page_header, list
Taxonomies shown in a post header. When unset, all of them
services.googleAnalytics.id, string
Hugo’s own: the analytics script is added to production builds only. See Analytics and SEO
Editor completion via generated schemas
The theme publishes JSON Schemas for its configuration, so your editor can
complete keys, show each key’s documentation on hover and flag a wrong type as
you type. schema/site-params.schema.json covers hugo.yml, and
schema/front-matter.schema.json covers page front matter. Take them from the
same release tag as the theme pinned in your go.mod, because keys change
between releases.
With the VS Code YAML extension, map the site schema in your settings. This
example uses OINK v1.8.0 and covers both common file names; replace the tag
with the one in your go.mod:
To confirm the mapping works, give a boolean such as params.offline_search a
string value for a moment: the editor should flag the type. Then put the valid
value back. Front matter completion depends on your Markdown tooling; associate
it with front-matter.schema.json in the same way. That schema does not
enforce types, because keys such as share and theme_color also accept a
bare boolean to opt out.
Verifying a configuration change
Build once after each configuration change:
hugo --printPathWarnings
The build is good when it ends with Total in … and prints no ERROR. Then
read each WARN line; these are the common ones:
A misspelled footer style. When it comes from front matter, the warning names the page
invalid params.page_width … (allowed: normal | wide | full)
A misspelled page width
invalid params.ui.section_index … (allowed: list | cards)
A misspelled section index style
invalid params.offline_search_index
The scopes are title, heading, summary and content
params.drawio.enable requires an explicit params.drawio.drawio_server
Draw.io is enabled without an editor address
params.map.enable requires params.map.tiles … and params.map.attribution
Maps are enabled without a complete tile service
params.map.tiles may use only the {s}, {z}, {x}, {y}, {-y} and {r} placeholders
The template has a placeholder such as {apikey} that nothing fills; write the key into the URL
params.video_embeds must be a list of platforms
Written as a single string or a boolean
params.search.algolia requires explicit appId, apiKey, and indexName
One of the three Algolia values is missing
params.ui.image_zoom must be true or false
Written as a string such as "true"
theme_color … is not a #rgb or #rrggbb hex color
The value is not a hex color; the default palette stays
theme_color … reads at about N:1 against the theme's … canvas
Advisory: the color still ships, and the message prints the id that silences it
theme_color_dark … has no theme_color to pair with
Only the dark color was set. It is ignored, and both modes keep the default palette
command … must define exactly one of url or action
A custom command has both url and action, or neither
invalid params.ui.sidebar_icon_policy …; using all
A misspelled icon policy
Then check three things in a browser: one page in each language, one page
without a translation to see the fallback, and links under the production
baseURL, including any subpath the site is deployed under. Build with the
same Hugo that builds the site in production; Get started
lists the versions it needs.
Give the site your name, logo, favicon, accent color and fonts, choose a visual preset, and add your own CSS.
A site starts to look like your own once it carries your name, your logo and
your color. All three are settings in hugo.yml, so a first pass at a brand is
one edit and a reload:
hugo.yml
title:Acme DB Docsparams:logo:images/acme-mark.svg# under assets/ or static/ui:theme_color:'#0f766e'dark_mode:true
Fonts, the overall look and the footer are settings too. For anything a
setting cannot reach, write plain CSS in
assets/css/project.css, which loads after the theme’s stylesheet.
Leave the theme’s own files alone, because the next hugo mod get replaces
them.
Site name
The site name appears in the navbar, the browser tab and the footer. On a
multilingual site, give each language its own under languages.<lang>.title;
the top-level title is the fallback for a language that sets none.
hugo.yml
title:Acme DB Docslanguages:en:title:Acme DB Docslabel:Englishlocale:en-USweight:1zh:title:Acme DB 文档label:简体中文locale:zh-CNweight:2
Logo and wordmark
Out of the box the navbar shows the theme’s mark, assets/icons/logo.svg,
beside the site name. Replace either half by putting an image in the site’s
assets/ or static/ directory and naming its path relative to that
directory:
params.logo is the square mark in the navbar, the sidebar header and the
footer. A file under assets/ goes through Hugo’s resource pipeline; a file
under static/ is published unchanged.
params.wordmark is an image of the name that takes the place of the site
name text next to the mark. The navbar draws it 16px tall and, like the site
name, hides it below 992px, leaving the mark alone, so the wordmark should
contain the name only. The footer shows it on its own unless the
footer data names a logo.
Crop the SVG tightly around the artwork and give it a viewBox, or it will not
line up with the text beside it. The theme places both images with <img>,
which page CSS cannot recolor and in which currentColor resolves to black.
Choose colors that read on both the light and the dark canvas, or do what the
theme’s own mark does: put a <style> inside the SVG with a
@media (prefers-color-scheme: dark) rule. That rule follows the reader’s
system setting, not the site’s light/dark toggle.
Favicon
There is no favicon setting. The theme looks in the site’s static/ directory
for the conventional file names and adds a <link> to every page for each one
it finds:
static/favicon.ico
rel="icon"
static/favicon.svg
rel="icon"type="image/svg+xml"
static/favicon-32x32.png
rel="icon"type="image/png" with sizes; several sizes are linked smallest first
static/apple-touch-icon.png
rel="apple-touch-icon"
static/apple-touch-icon-180x180.png
rel="apple-touch-icon" with sizes
favicon.ico, favicon.svg and apple-touch-icon.png are enough for every
browser. A file with a size in its name must be square (NxN); the theme
ignores any other.
Other head metadata, such as a Web App Manifest, goes in
layouts/_partials/hooks/head-end.html. To look in another directory or
accept other names, override layouts/_partials/favicons.html in the site.
Accent color
The accent color marks where the reader is: the selected sidebar row and hover
backgrounds, the outline’s current-section marker and its rail, tag and chip
hovers, card borders and share buttons on hover, text selection, focus rings,
and each section’s mark in the sidebar switcher. Set it with one hex value:
It is most useful per section. Put the pair in a section root’s cascade and
the whole section, its index page included, takes that color, so readers can
tell Docs from Blog at a glance while the rest of the site keeps the default:
Prose links, external URLs and inline code keep the preset’s colors in every
section, because a reader should recognize a link or an identifier the same
way everywhere. To change those, override the palette.
theme_color_dark is optional. Without it, the theme lightens the light color
toward white until it reaches AA contrast for body text on the dark canvas;
set it yourself when the derived shade drifts from your brand. The light color
is required: a theme_color_dark on its own, or next to an invalid
theme_color, is ignored with a warning, so a page is colored in both modes or
in neither.
To return one page to the default palette, set theme_color: false in its
front matter; that drops the inherited dark color too, without a warning. Any
other value that is not a #rgb or #rrggbb hex, such as a number, true or
a color name, warns and keeps the default. Hugo merges parameters key by key,
so a page that overrides only theme_color still inherits the section’s
theme_color_dark: override both or neither.
The theme checks each color you write against its own canvases and warns when
contrast falls below 4.5:1, the AA level for body text. The color is still
applied, since a custom canvas or a fixed brand color may justify it, and the
warning carries an ID you can add to Hugo’s ignoreLogs once you have checked
it on the real background. A color that only just passes deserves a second
look on interactive surfaces that use it for text over a 12% wash of itself,
such as a linked badge; pick a darker shade if those read poorly.
Fonts
OINK bundles its Latin typefaces as local fonts served from your own site, so
no page requests Google Fonts or any other font service. Chinese uses fonts already on
the reader’s system, and the theme ships no Chinese font file. Each
visual preset arranges the faces its own way:
Preset
Interface and body text
Headings
Chinese
Paper
IBM Plex Sans
IBM Plex Sans
Hei throughout
Slate
Inter
Inter; Chakra Petch for display titles
Hei throughout
GitHub
GitHub’s system font stack
GitHub’s system font stack
Hei throughout
Ink
Palatino
Palatino; italic for sections
Kai headings and chrome over Fangsong text, or Song where they are missing
News
A system serif
Times New Roman, heavy
Song throughout, heaviest in headlines
Terminal
IBM Plex Mono, IBM Plex Sans in print
IBM Plex Mono
Hei throughout
Code is IBM Plex Mono and the wordmark Chakra Petch in Paper and Slate. Plex
Sans and Inter include Latin, Cyrillic, Greek and Vietnamese. Chinese emphasis
and quotations switch to Kai where the reader has it installed, so Han is never
slanted; Terminal colors emphasis instead.
To use the platform’s own fonts and load none of the bundled ones, switch the
typography policy:
hugo.yml
params:ui:typography:system# technical (default) | system
With system, every role uses the platform font stack. An invalid value warns
and falls back to technical. The policy in effect is written to
<html data-td-typography="…">.
Use fonts readers already have
To change a family without writing CSS, set params.ui.fonts:
hugo.yml
params:ui:fonts:# Body text and headings follow this face in every presetui:"'Source Han Sans SC', 'PingFang SC', sans-serif"# Give monospace a CJK fallback, or mixed code blocks stop aligningcode:"'Sarasa Mono SC', 'Noto Sans Mono CJK SC', monospace"
Setting ui changes body text and headings in every preset. Set
heading to choose a separate face for headings. The other keys are listed under
Font roles.
These values are family names, not files: the theme never downloads or loads a
font because of this key. A family must already be on the reader’s system or
declared by your own @font-face, so end every list with a
generic family (sans-serif, serif, monospace) for readers who have
neither.
A value may contain only font family syntax: quoted names, bare identifiers,
a leading hyphen as in -apple-system, and names in any script (苹方 is a
family name). Semicolons, braces, parentheses, url() and angle brackets are
rejected. An unknown role or an unsafe value warns and drops that one entry;
the rest of the map still applies. The theme writes these values after its
stylesheet, so they win over both the preset and typography: system.
Bundle your own font
To ship a font file, or to give one kind of content its own face, use the
project stylesheet. Put the .woff2 file in the site’s static/webfonts/,
declare it, and point the roles at it:
assets/css/project.css
@font-face{font-family:'My Sans';font-display:swap;font-style:normal;font-weight:400800;src:url('../webfonts/my-sans-variable.woff2')format('woff2');}:root{--td-ui-font-family:'My Sans','Noto Sans SC',sans-serif;--td-body-font-family:var(--td-ui-font-family);--td-heading-font-family:var(--td-ui-font-family);--td-display-font-family:var(--td-heading-font-family);}
Roles are ordinary inherited custom properties, so scoping one to a body class
changes the face for that kind of page without touching component selectors:
A monospace stack needs a CJK fallback, or code that mixes Latin and Chinese
stops aligning:
assets/css/project.css
:root{--td-code-font-family:'My Mono','Sarasa Mono SC','Noto Sans Mono CJK SC',monospace;}
Font roles
Eight CSS custom properties carry the font roles, and each can also be set by
its key under params.ui.fonts:
Property
Config key
Where it is used
--td-ui-font-family
ui
Navigation, controls and interface text
--td-body-font-family
body
Body text and blog posts
--td-heading-font-family
heading
Headings in the body
--td-code-font-family
code
Code and terminals
--td-display-font-family
display
Display headings
--td-meta-font-family
meta
Technical labels and metadata
--td-brand-font-family
brand
Wordmark
--td-print-font-family
print
Print body text; follows body unless set
Visual presets
A preset is a complete look: palette, fonts, link style and table style, in
light and dark. Pick the one closest to your brand before adjusting colors by
hand.
Preset
Look
paper (default)
Warm paper, ink text, blue links and accent, Plex Sans and framed tables
slate
A cool blue-gray technical look
github (experimental)
Markdown as GitHub shows a README: GitHub’s fonts and colors, ruled tables, alert colors and green buttons
ink (experimental)
A written page on warm paper, Palatino and Kai throughout the chrome and headings, Fangsong or Song text, vermilion marks (emphasis dots, a first letter, the current row), brush-stroke rules and underlined prose links; at night gold and silver writing on indigo-violet paper
news (experimental)
A printed page on grey newsprint: heavy Times New Roman and Song headlines, serif text and chrome, one spot blue, a masthead rule, a deck and dateline under the title, thick-and-thin section rules, pull quotes and open tables; at night a darkroom, silver type on black with a safelight orange
terminal (experimental)
Monospace controls, headings and prose, teal links, amber accents and compact desktop navigation; at night a phosphor screen, grey type on black with green headings, links and cursor
Each preset’s dark mode keeps the fonts of its light mode but has a palette of
its own, so switching to dark is a different experience rather than an
inverted page.
params.ui.preset sets the site’s look. params.ui.preset_menu decides
whether readers may choose another in the Appearance menu:
Exactly the listed presets; the site’s preset is added with a warning if missing
GitHub, Ink, News and Terminal appear only when you name them, as
preset or in the list. The menu always lists them in the order of the table
above.
The experiment record
lists what has been tested on Ink and Terminal. A reader’s style and light/dark choice are
saved separately in the browser, and choosing the entry marked as the site
default goes back to following the site. Print always uses a light palette on
white paper.
Font settings and theme_color win in every preset. Dark palette overrides in
your own CSS do not automatically: Paper scopes its dark palette to
[data-td-preset='paper'][data-bs-theme='dark'], which outranks a bare
[data-bs-theme='dark']. Write dark overrides as shown under
Palette colors.
Light and dark mode
Sites are light-only until you turn dark mode on:
hugo.yml
params:ui:dark_mode:true
This adds the dark palette and a Light / Dark / System choice to the
Appearance control in the navbar and footer, whose icon shows the reader’s
choice: a sun for Light, a moon for Dark, and a half-filled circle for System,
which stays while the system switches between modes. The control works with touch and keyboard and opens as a bottom
sheet on phones. A reader’s choice is saved in the browser and shared across
tabs; with no saved choice the page follows the system’s
prefers-color-scheme. A small inline script applies the mode before the
stylesheet loads, so pages never flash the wrong palette.
To support the dark palette for readers whose system asks for it, without
showing the control, write dark_mode: { enable: true, show_menu: false }.
If preset_menu still offers styles, the control stays and shows a palette.
Footer
hugo.yml
params:ui:footer_style:fat# fat | slim | nonecopyright:authors:'[The Acme DB team](https://example.com/)'from_year:2026to_year:presentfooter_center_info:'Powered by [Oink](https://oink.pgsty.com)'
footer_style
Footer
fat (default)
A grid of link columns above the copyright line
slim
The copyright line only
none
No footer
The link columns come from data/footer/<language>.yaml, described in
Navigation and menus. Until that file
exists, a fat footer renders as slim, so you can switch it on before you
write the links. Front matter, or a section’s cascade, can set a different
style (for example, slim on a focused reading section while keeping fat
elsewhere). An unknown value warns and uses fat.
params.copyright is either a Markdown string or a map of authors,
from_year and to_year, where present means the current year.
footer_center_info is inline Markdown for the middle of the copyright line;
set it to an empty string to leave that space blank.
Project stylesheet
Anything the settings above cannot reach is plain CSS in the site’s
assets/css/:
File
Use
project.css
Your selectors and custom property overrides
project/*.css
Optional further files, appended to project.css in path order
The theme publishes them as one stylesheet that loads after its own, minified,
fingerprinted and with an integrity attribute in production. Because it is a
separate file, editing your styles leaves the theme’s stylesheet, and the copy
in readers’ caches, untouched.
Hugo minifies this file but does not compile it, so write CSS, not SCSS:
// comments, Sass variables, mixins, @extend and &-suffix selectors do not
work, and native CSS nesting reaches the browser as written. Relative URLs
resolve from /css/, so ../webfonts/my-font.woff2 is the site’s
static/webfonts/my-font.woff2. A site upgraded from an older OINK or from
Docsy may still have files under assets/scss/; the build warns and ignores
them until you convert them as described in
Retired SCSS hooks.
Rely only on the public part of the theme’s CSS: the eight
font roles and the --td-brand-* properties keep their names
and meanings across minor releases. Component aliases such as
--td-asciinema-font-family work only inside their component, and other
variables, such as --td-shell-*, can change in any release. Use a variable
where one exists, and otherwise the narrowest selector that works; overriding
baseof.html to change a color makes every theme upgrade a merge.
To add a third-party stylesheet, copy it into the site and publish it as a
local resource from layouts/_partials/hooks/head-end.html, not with a
<link> in Markdown. Keep stylesheets and fonts local rather than pointing at
a CDN, so the site keeps working when that host does not.
Palette colors
Colors other than the accent are CSS custom properties that you override in
the project stylesheet. Each preset sets them in light and dark, so override
both modes together, or one mode keeps the preset’s color.
Links use Bootstrap’s link tokens, --bs-link-color and
--bs-link-hover-color with their -rgb twins. Bootstrap components such as
buttons use the semantic colors; override the property, and the button
variables that hold the color as a fixed value:
The theme’s brand layer works the same way. Write the dark block with both
selectors below: the bare one covers Slate, and the preset-scoped one is needed
to outrank Paper’s dark palette.
The brand gradient, for example on the site name in the navbar
--td-brand-header-bg
Navbar background
--td-brand-elev
Overlay backgrounds
--td-brand-silk
Secondary text
--td-brand-line-strong
Strong rules
--td-brand-shadow-sm, --td-brand-shadow-md
Shadows
Whatever you recolor, check hover, focus, disabled and selected states in both
modes: body text needs 4.5:1 contrast and large text 3:1.
Styles for a site-owned shell
A page with its own layout, such as a hand-built home page, can use parts of
the theme’s styling without the reading shell. Instead of main, the
stylesheet every OINK page loads, such a layout asks for a smaller stylesheet
by name:
chrome
Tokens, typography, the six palettes, the site navbar, and the language, theme and appearance controls
The partial returns a Hugo resource published as css/<name>.css, one
directory below the site root, where its ../webfonts/… references resolve;
your layout minifies and fingerprints it. An unknown name warns. These
stylesheets follow the pinned theme version, so ask for them by name rather
than copying them into the site, and do not read the layer files under the
theme’s assets/css/td/, which can change in any release.
Verify
hugo --printPathWarnings
The build ends with Total in … and reports no ERROR. Read any warnings: a
rejected color, font value or preset name is reported there and replaced by
the default.
The navbar shows your logo and site name, the browser tab shows your
favicon, and switching language switches the site name.
<html> carries the data-td-typography and data-td-preset values you
set.
In dark mode, body text, tables, callouts, code blocks and focus rings are
still readable. Check every color change in both modes and in each preset
you offer.
In the browser’s developer tools, a paragraph’s font-family lists your
family, and the rendered font is the file or system font you expect.
Related
Configuration — types and defaults of the brand settings
Build the home page, or any product or pricing page, from sections listed in a YAML data file, with no template to write.
An OINK home page is data, not a template. data/home/<language>.yaml lists
the sections from top to bottom (a hero, a grid of cards, pricing, a closing
call to action) and holds the content of each, so you change the page by
editing YAML and never touch HTML. Any other page can use the same sections as
a landing page.
Edit the Starter’s home page
The OINK Starter ships a three-section home page in
data/home/en.yaml. Replace the text and links with your own and the browser
reloads with the result:
data/home/en.yaml
sections:[hero, cards, cta]hero:align:centereyebrow:Open-source time-series databasetitle_lines:- words:[{text:Acme DB. }]- words:[{text:Fast queries over years of metrics. }]lead:Install it, load your data and run your first query in ten minutes.actions:- {label:Install, url:docs/install/, icon:fa-solid fa-download, style:primary }- {label:Read the docs, url:docs/, style:ghost }cards:eyebrow:Where to starttitle:Everything has a placecolumns:3items:- title:Installdesc:Packages for Linux and macOS, a container image, and a Helm chart.icon:fa-solid fa-downloadurl:docs/install/- title:Query languagedesc:Every function and operator, with an example for each.icon:fa-solid fa-terminalurl:docs/reference/- title:Release notesdesc:What changed in each version, and how to upgrade.icon:fa-solid fa-tagurl:blog/cta:title:Run your first query today.text:The quick start takes ten minutes on a laptop.label:Get startedurl:docs/install/style:primary
Write internal links as site paths without a leading slash, such as
docs/install/; the theme adds the language prefix, so the same link reaches
/zh/docs/install/ from the Chinese home page. To add a section, append its
name to sections and give it a key of the same name; to reorder the page,
reorder the list. The section types table lists everything
available.
Where the data lives
The home page’s content file holds only its title and description:
For each language the theme reads data/home/<language>.yaml, falls back to
data/home/en.yaml, and on a single-language site accepts a plain
data/home.yaml.
Each file has two levels: the sections list, and the keys it names. A section
normally reads the key that matches its type; give it a key to read another,
which is how one page shows two card grids:
An entry in sections is either a type name or a map:
Key
What it does
type
The section type. If omitted, key is used as the type
key
The top-level key that holds the data. Defaults to the type name; use it to tell two sections of the same type apart
data
The section’s data inline, instead of under a top-level key
id
The section’s anchor ID, generated from key or type by default
enabled: false
Hides the section and keeps its data
partial
Renders the data with one of the site’s own partials. This ties the data to your templates, so it no longer moves between sites
Type names use hyphens (logo-wall); underscores are accepted and normalized.
A misspelled type warns with unknown section type and the section is
skipped. A home page migrated from Docsy’s blocks/* shortcodes has to be
rebuilt this way; see Migrating from Docsy.
Hero
The hero is the first screen, and the only section with a large title and an
illustration:
data/home/en.yaml
hero:eyebrow:Acme DB 3.0 · Open source # small text above the title, with a status dottitle_lines:# the large title, one entry per line- words:- {text:Acme DB }lead:One sentence saying what this is. # inline Markdown and <br> allowednote:Runs on a single binary # a supplementary line with an iconnote_icon:fa-solid fa-circle-checktitle_size:4.25rem # rem, em or px onlyimage:light:images/hero-light.webpdark:images/hero-dark.webp # with only one, both modes use italt:Query latency dashboardmedia:ratio:'1fr 240px'# column widths of text and imagemax_width:240pxhide_below:md # hide the image below sm | md | lg | xlactions:- {label:Get started, url:docs/install/, icon:fa-solid fa-rocket, style:primary }- {label:GitHub, url:'https://github.com/example/acme-db', external:true, style:ghost }detail:{label:See a live demo, url:docs/demo/ }
An image path names a file under the site’s static/ or assets/; the example
expects static/images/hero-light.webp and static/images/hero-dark.webp.
The image is a CSS background: with alt its container is announced as an image with
that label, and without alt it is hidden from assistive technology. Without
title_lines the hero shows title, and without either it shows the site
title.
align: center gives a text-only first screen, as in the Starter: the text
block widens and centers, title lines are balanced, and note moves below the
buttons. A centered hero cannot hold an image, so when both are present the
theme warns and keeps start alignment and the image.
Section types
There are 22 section types. Every type except hero accepts the same heading
fields, eyebrow, title and desc (or text), plus a class for your own
CSS.
Type
What it holds
hero
The first screen: large title, buttons, an image that follows light and dark mode
metrics
Numeric facts, with optional count animation and source links
capabilities
Capabilities described one per row, alternating sides, each with a visual panel
principles
Numbered product principles
cards
A general card grid: features, use cases, entry points
logo-wall
Tools and partners, as a grid or a pure-CSS marquee
gallery
A wall of screenshots
testimonials
Quotations with attribution
contributors
People, roles, avatars and links
faq
Questions and answers, collapsible or flat
markdown
Free Markdown content
cta
The closing call to action
pricing
Pricing tier cards
pricing-compare
A tier-by-feature comparison matrix
command-box
One copyable command
steps
An ordered procedure, optionally with commands
timeline
Dated milestones
code-plate
Code inside a presentation panel
preview
Markdown source beside its rendered result
case-study
A case: metrics, a quotation and its source
download
One or more data/download/ records
bar-chart
Numeric comparison drawn without chart JavaScript
Common sections
cards sets its column count with columns:
data/home/en.yaml
cards:title:Use casescolumns:4link_label:Learn moreitems:- title:Monitoringmeta:Metricsicon:fa-solid fa-chart-linedesc:Keep a year of per-second metrics queryable in milliseconds.url:docs/use-cases/monitoring/
capabilities gives each capability a row of its own with a visual panel
beside it. visual.type is one of shell, components, code, image or
card. In a components panel, items with url become links, and items with
preset become in-place style switchers whenever params.ui.preset_menu offers
that preset:
data/home/en.yaml
capabilities:eyebrow:Why Acme DBtitle:Built for data that only growsitems:- ref:01/ Operationstitle:One binary, no cluster to babysiturl:docs/install/motto:From the first install to the hundredth upgradebullets:- 'Rolling [upgrades](docs/upgrade/) without downtime'- 'Built-in [backups](docs/backup/) and point-in-time recovery'value:Teams spend their time on queries, not on the database.visual:type:codetitle:install.shlines:- {class:c, prefix:'# ', text:One command, one running server }- {class:p, prefix:'$ ', text:acme-db start --data ./data }- {class:ok, prefix:'✓ ', text:listening on :5433 }
For a terminal session, use lines to colour the prompt or status prefix of
each line. With the development theme, paste a source snippet into a YAML
block string and set lang to its language. Omit lang for plain text.
data/home/en.yaml
visual:type:codetitle:Pythonlang:pythoncode:| import acme
db = acme.connect("localhost:5433")
Minimal YAML for eleven more sections
metrics:title:Factsanimate:trueitems:- {value:2189, compact:true, label:Stars, source:{label:Local CI data, url:'https://example.org/'}}- {value:32, suffix:'+', label:Languages }command-box:title:Installcode:hugo mod get github.com/pgsty/oinklang:bashnote:The copy button comes from the on-demand landing runtime.steps:title:Three steps to publishitems:- {title:Clone, desc:Copy the documentation site repository. }- {title:Configure, desc:Change three settings., cmd:{code:hugo server } }- {title:Publish, desc:Push to GitHub Pages. }timeline:title:Project historyitems:- {date:'2024', title:Prototype, desc:The first data-driven sections. }- {date:'2026', title:Scenario components, desc:Landing becomes a reusable shell. }code-plate:title:Page configurationaria_label:Example configurationlang:yamlcode:| layout: landing
landing: pricingpreview:title:What you write is what you getfile:guide.md # the filename in the source panel header, default page.mdsource:| # the right side renders this Markdown with the site's own hooks> [!TIP] Markdown only> Callouts, steps and tabs are all ordinary syntax.1. Write Markdown2. Run `hugo`{.steps}case-study:title:Migration outcomestats:- {value:12, label:Reusable sections }- {value:0, label:Remote requests }quote:"One YAML file replaced a bespoke page template."source:A site maintainerpricing:title:Pricingtiers:- name:Communityprice:Freeperiod:foreverdesc:The full open-source capability.features:[Every component, Community support]cta:{label:Download, url:docs/start/ }- name:Professionalfeatured:trueprice:$3.4Kperiod:/yearfeatures:[Priority response, Release packages]cta:{label:Contact us, url:'mailto:example@example.org'}pricing-compare:title:Tier comparisontiers:[Community, Professional]groups:- name:Supportrows:- {name:Priority response, cells:[N,Y]}- {name:Annual fee, price_row:true, cells:[Free, $3.4K] }download:title:Downloadkeys:[prd5]bar-chart:title:Build timeunit:secondsitems:- {label:Cold build, value:12.3, group:cold }- {label:Warm cache, value:1.6, group:warm, note:A repeat build on the same machine. }
The download section reads the same data/download/<key>.yaml records as
Releases and downloads, so a version number is
written once for both.
Landing pages
A pricing page, a product overview or an event page can use the same sections
as the home page. Two front matter lines turn an ordinary page into a
full-width landing page that keeps the navbar, the command palette and the
footer and drops the sidebar and outline:
content/pricing.md
---title:Pricinglayout:landinglanding:pricing---
landing: pricing names the data, which sits beside the home page’s and is
split by language the same way:
landing page data
data/
landing/
pricing/
en.yaml
zh.yaml
A single data/landing/pricing.yaml also works: with sections at its top
level it serves every language, and with one map per language code it works
like the directory form. For a language tagged zh-cn, the theme tries
zh-cn, then zh, then en. When it finds nothing, the page warns and
renders the landing shell without sections.
A page with only a section or two can write them in its front matter instead,
each with its data inline. Use either landing: or sections:, not both; with
both, the theme warns and uses the inline sections.
content/pricing.md
---title:Pricinglayout:landingsections:- type:herodata:title:Acme DB Cloud, priced per nodeactions:- {label:Read the docs, url:docs/, style:primary }- type:ctadata:title:Ready to start?label:Read the docsurl:docs/---
Landing pages show the search button and command palette when the site has
local search on. To leave search off landing pages
other than the home page, set params.ui.landing_search: false.
Languages and local facts
Put each language’s text in its own file (en.yaml, zh.yaml). A record that
is mostly shared facts, such as a pricing tier, can instead carry per-language
fields: the theme reads <field>_<language>, then <field>_<base language>,
then <field>, with - in the language tag written as _. A page in zh-cn
therefore reads title_zh_cn, then title_zh, then title. CamelCase
suffixes are not recognized.
Section text is site data and does not go through the theme’s interface
strings; only the theme’s own controls, such as the marquee’s pause button and
pricing states, are translated by the theme. For the rest of a multilingual
setup, see Languages.
No section fetches anything in the browser: prices, star counts, screenshots,
avatars and download states must all be in the repository when Hugo runs. The
same holds for the two navbar facts you can set in hugo.yml:
hugo.yml
params:ui:github_stars:2189# shown on the GitHub link; never fetched from GitHubalt_site:{label:中文站, url:'https://example.cn/'}# sister-site link on a single-language site
The footer has its own data, data/footer/<language>.yaml or data/footer.yaml
on a single-language site; see Navigation and menus.
A footer key left in data/home/<language>.yaml is ignored with a warning
that names the new location.
Output
HTML: every section rendered on the server, plus landing.js, loaded only when needed, for reveal effects, counters, copy buttons and light/dark image switching.
Print: the content, with moving parts such as the marquee laid out as a static grid and controls removed.
Markdown: titles, prose, lists, tables and code, without component classes.
RSS: no landing sections.
Without JavaScript, or if landing.js fails to load, every section is still
visible: metrics already show their final formatted value, prefix and suffix,
and the marquee’s pause control works without script. Readers who ask for
reduced motion get no movement or reveal effects.
Verify
Run hugo --printPathWarnings. Misspelled types, missing data keys and a
page with both landing and sections are reported here.
Open the home page and each landing page in every language, and compare the
sections with their data files.
Reload with JavaScript disabled; the content stays, only the motion goes.
Switch between light and dark mode and check that image.light and
image.dark each appear in the right one.
On a site deployed under a subpath, check that internal links and images
carry the prefix.
Languages — enabling languages and splitting data by language
Configuration — params.ui.landing_search, github_stars, alt_site and the rest
5.4 - Navigation and menus
Configure the navbar menu, dropdowns, section switcher, breadcrumbs, page actions, pager, and footer links.
The menu across the top of every page is the map of your site: the handful of
places, such as Docs, Blog and Download, that a reader should reach from
anywhere. You write it once per language in hugo.yml. The other ways of
moving around (the section switcher at the top of the sidebar, breadcrumbs,
previous and next links, backlinks) follow from your content tree, so you
adjust them rather than build them. The sidebar tree and the page outline are
covered in Layouts and page types.
The navbar menu
Top-level entries go in each language’s menus.main:
Entries appear in ascending weight. Point at your own pages with pageRef,
so that Hugo resolves the page in each language and marks the entry active on
every page beneath it, and use url for anything else. An external url opens
in a new tab with rel="noopener noreferrer" and carries an external-link
mark. Translate name in every language but keep identifier the same,
because other settings refer to entries by it: params.ui.quick_links picks
command palette quick links by identifier,
and the default icon is matched against it.
A page can also add itself to the menu from its front matter, which is handy
when the page itself is the top-level destination:
content/download/_index.md
---title:Downloadmenu:main:weight:30---
The GitHub button at the right end of the navbar is not a menu entry, and a
menu entry with the identifier github is skipped. The button links to
params.github_project_repo, or to params.github_repo when that is unset, so
change those to change it; see
Repository links and page info.
Dropdowns
Give an entry a parent to place it in that entry’s dropdown panel:
The panel is a single column with one icon and one name per row; it does not
display a child’s params.description, and a params.columns setting is
ignored with a build warning. The parent stays an ordinary link: hovering or
focusing it opens the panel, while clicking it or pressing Enter
opens the parent page. Touch readers therefore go straight to that page, so it
should link to the same children, as a section index does by itself. With the
keyboard, ↓ opens the panel and focuses its first item, and
Esc closes it and returns focus to the parent; clicking outside
also closes it.
Dropdowns go one level deep. A grandchild entry is rendered as a plain group
heading inside the panel, not as a third-level flyout, and the build warns
only one interactive child level is supported. Put deeper structure in the
sidebar.
Menu icons
Below the lg breakpoint the navbar shows each top-level entry as its icon
alone, so give every top-level entry one. An entry’s icon is the first of:
the menu entry’s own params.icon;
icon in the target page’s front matter;
a built-in default matched against the identifier, the target’s section or
the first segment of its URL (docs, guide, blog, news, examples,
community, about, download, github);
fa-solid fa-link.
An icon is one Font Awesome class pair; the theme ships the free icon set, so
nothing is downloaded. Setting params.icon to false or "none" removes the
icon, and the entry then keeps its text label at every width:
A top-level entry that points at a taxonomy list page such as /tags/ needs
no children: its panel fills itself with the taxonomy’s terms and their page
counts, most-used first. The entry is written like any other; see
The taxonomy panel in the navbar.
Navbar controls
The 50px navbar holds the brand logo or wordmark at the start, the menu in the
middle, and utility controls at the end. It adapts to the viewport in three
tiers:
Viewport
State
lg and above
Brand, menu labels, and the search, version, language, appearance and GitHub controls. No drawer button
md to below lg
Menu icons in the middle, utility controls at the end. No drawer button
Below md
Menu icons in the middle; only search and a drawer button at the end. Version, language, appearance and keyboard help move to the footer’s bottom bar
The drawer button opens the sidebar on pages that have one, and a site menu on
Home and Landing pages.
Menu entries never wrap onto a second line. When the brand, a fixed desktop
sidebar and the utility controls leave too little room, entries with icons
collapse to their icons first, while entries with params.icon: false keep
their labels; whatever still does not fit folds into a trailing … panel that
shows each entry’s icon, name and children.
Each utility control appears once its feature is configured: search with
params.offline_search (Search), the version menu
with params.versions (Versions), the language
menu with two or more languages (Languages), and the
appearance menu when the site offers a color-mode or preset choice
(Brand and appearance).
Auto-hide
On long pages you can give the navbar’s space back to the content:
hugo.yml
params:ui:navbar_autohide:true
The hidden navbar keeps its 50px band, so nothing below it moves. Pointing into
the upper 60% of that band, or tabbing into the navbar, fades it back in place
without covering the page. The wake zone leaves out 64px at each side, so the
buttons that restore a collapsed sidebar or outline stay clickable.
Auto-hide stays off below 768px and on coarse-pointer or touch-only devices,
where the navbar is always visible. Home ignores the site setting unless its
own front matter turns it on, and hero pages keep their overlay navbar, which
scrolls away with the hero. A top-level navbar_autohide in page front matter
or a section cascade overrides the site setting.
Turning the navbar off
For pages that need the whole viewport, such as a full-screen report or an
embedded application, turn the navbar off for the site:
hugo.yml
params:ui:navbar_enabled:false
or for one page or section:
content/docs/_index.md
---title:Docscascade:navbar_enabled:false---
Without the navbar, the theme moves its essentials elsewhere: a mobile
subnavigation, a brand and search row at the top of the sidebar, and the
utility buttons on the outline rail. Readers lose the site menu, though, so
reserve this for pages that need it rather than using it as a style choice.
The section switcher
The row at the top of the sidebar switches between whole trees: Docs, Blog, a
Book, or any large subtree you promote to a root of its own. It lists every
top-level section, then every section marked sidebar_root_for: self, without
duplicates, and adds the root the reader is currently in when it is not
already listed. Sections without a permalink (build.render: never) and
divider groups never appear. With no entries the switcher is absent, with one
it is a plain link, and with two or more it is a dropdown.
Both default to true. sidebar_root_menu: false removes the switcher.
sidebar_root_enabled: false ignores sidebar_root_for, so every page shows
the tree of its top-level section.
To make a large subtree, such as a versioned API reference or a self-contained
handbook, a root of its own, mark its _index.md:
With self, the section index and everything below it use the new tree; with
children, the index stays in its parent’s tree and only its descendants
switch. sidebar_root_link_self (default true) points the link at the top of
the new tree to the section’s own index; set it to false to point that link
at the parent section instead. The switcher picks the tree, and that root link
opens a page in it.
To keep a top-level section or a self root out of the switcher, set
sidebar_root_menu: false in its front matter. While a reader is inside that
section, it still appears in the switcher to mark where they are.
Breadcrumbs and page actions
Above each page title, a breadcrumb shows where the page sits, using the
localized linkTitle of each ancestor in the same hierarchy as the sidebar.
The page action menu sits at the right end of the same row. A top-level
section leaves out the one-item breadcrumb that would only repeat its title,
and the action menu keeps its place. Blog pages show no breadcrumb by default,
because a post reads as a standalone piece; set breadcrumb in front matter or
a cascade to change that for a page or section, or turn breadcrumbs off for the
whole site:
hugo.yml
params:ui:breadcrumb:false
The page action menu
The split button at the end of the title row gives readers what they can do
with the page: take its content elsewhere, or change it at the source. Its left
half copies the page’s Markdown and shows a green check mark when the copy
succeeds; the arrow opens the full menu. Each entry appears only when the site
can serve it, and each has a stable action ID that the command palette and
custom CSS use:
Entry
Action ID
Appears when
Copy Markdown
copy_markdown
The page has the markdown output format
Open in ChatGPT
open_chatgpt
page_context_menu.assistant_links: true
Open in Claude
open_claude
page_context_menu.assistant_links: true
View markdown
view_markdown
The page has the markdown output format
View edit history
view_history
params.github_repo is set and the page’s source path resolves
page_context_menu: false, for the site or in a page’s front matter, removes
the button; the same actions stay in the command palette.
The assistant entries are off by default because clicking one sends the page’s
full URL, query and fragment included, to that third party. A page can switch
them off but cannot switch them on when the site has not;
AI-agent support covers the prompt they
send and what to put in your privacy statement.
links adds your own external actions at the end of the menu. In url,
{url} is the page’s full address, {title} its title and {markdown_url}
the address of its Markdown version, each URL-encoded:
hugo.yml
params:ui:page_context_menu:links:- name:Ask the internal assistanticon:fa-solid fa-wand-magic-sparklesurl:https://assistant.example.com/new?source={markdown_url}&title={title}
On the blog root and its first-level sections the left half is an RSS
subscription link instead, and Copy Markdown moves into the menu. A page
without Markdown output has no left half, and the arrow becomes a labeled
“Actions” button.
The pager
Two text links at the end of the body lead to the previous and next page in
the order of the visible sidebar tree, from the root page down to the last
page. The root has no previous link and the last page no next link. When the
site supplies data/docs_nav.json, that
tree orders the pager and the section indexes it declares, so the sidebar, the
pager and the index list children in the same order; other sections follow the
content tree.
hugo.yml
params:ui:pager_types:[docs, book, blog]
pager_types accepts only docs, book and blog; any other value warns and
is dropped. To remove the pager from one page:
content/docs/appendix.md
---title:Appendixpager:false---
The same order goes into the page’s <head> as <link rel="prev"> and
<link rel="next">, so browsers and crawlers can follow the reading sequence:
Only HTML pages carry the pager and these links; print, Markdown and RSS
output have neither. The pager is one of the blocks at the end of a page, which
appear in a fixed order; see What the page end is made of.
Backlinks
Backlinks list the pages that link to the current one, so a reader who lands
from search sees which pages consider it worth pointing to and where it sits in
the rest of the site. They are off until you turn them on:
hugo.yml
params:ui:backlinks:true
A page overrides the setting with backlinks in its front matter, and a
section passes it down with a cascade:
content/docs/_index.md
---title:Docscascade:backlinks:true---
The list appears in the right rail as an expanded “Backlinks” group, below the
outline and above the taxonomy clouds; below xl it moves into the sidebar
drawer with the outline. The first eight entries are visible and the rest sit
behind a native “Show N more” disclosure, and hovering an entry shows its
source page’s description. A page that nothing links to has no backlinks block
at all, heading included. A non-boolean value warns and counts as off.
Hugo builds the list at build time from the ordinary Markdown links and
ref / relref shortcodes you already write, so there is no new syntax and no
JavaScript. Links inside code are ignored, as are self links, external links,
mailto: and same-page anchors; several links to one page count once, and a
fragment is ignored when matching the target. Each language has its own list,
so a Chinese page never appears under an English one, and entries are sorted by
page path, so the same content always gives the same order.
URLs in custom shortcode parameters or raw <a href> elements are not counted,
and links that do not resolve are dropped silently. Backlinks help readers
navigate; keep running a link checker to find broken links.
The page’s Markdown output carries the same list after a “Backlinks:” line;
RSS and the print view leave it out. This site enables backlinks everywhere,
so the right rail of this page shows a live example, and
Configuration lists more than forty, most of them
behind the disclosure.
The footer
params.ui.footer_style chooses fat, slim or none; see
Brand and appearance. The link grid of the
fat footer comes from data/footer/<language>.yaml, not from a menu (the
theme has no menus.footer):
data/footer/en.yaml
brand:name:Product Docstagline:A short description that **supports Markdown**.slogan:Close to the product, with clear answers.columns:- title:Docslinks:- {label:Get started, url:/docs/start/ }- {label:Components, url:/docs/components/ }- title:Projectlinks:- {label:GitHub, url:https://github.com/pgsty/oink, external: true }- {label:Releases, url:/blog/release/ }
Without brand.name and brand.logo, the footer uses the site’s own brand name, logo and wordmark. tagline and slogan render Markdown.
An internal url resolves against the current language root. external: true opens the link in a new tab with rel="noopener noreferrer".
The grid has as many columns as the data has.
A single-language site can use data/footer.yaml.
A fat footer with no data falls back to slim, so you can switch it on before writing the data.
An arrow at the end of the fat footer’s copyright row collapses and restores
the link grid. The grid starts expanded, and the reader’s choice is kept in
localStorage under td-footer-collapsed across pages; it is independent of
Zen Mode. slim and none have no such arrow.
The footer’s bottom bar ends with an icon dock holding, in order, the version,
language, appearance and keyboard-help controls, followed by the fat
footer’s collapse arrow. Their menus open upward. Hovering keyboard help
previews the full three-column shortcuts sheet
above the footer, and clicking it opens the centered modal dialog. The version button shows only an icon, while its choices keep
their full labels. The sidebar does not repeat these controls, and
footer_style: none removes the bottom bar together with the footer.
The copyright row and the note in its center are set in
Configuration.
Verify
Build, then check the warnings and the rendered navigation:
hugo --printPathWarnings
No build warning says only one interactive child level is supported; if one does, a menu is nested three levels deep.
On desktop, hovering a parent opens its panel, clicking it opens its page, and Esc closes the panel.
Below lg, every top-level entry shows an icon; an entry without one is blank at that width.
Below md, the Home and Landing navbars keep only search and the drawer button at the end, and version, language, appearance and keyboard help are in the footer’s bottom bar.
The switcher at the top of the sidebar lists every top-level section and marks the current one.
On a documentation page, E / Q page through the sidebar order, and the page source has the matching rel="prev" / rel="next".
With backlinks on, grep td-backlinks public/<a page that is linked to>/index.html finds the block, and a page nothing links to has none.
The page action menu shows the entries you expect and nothing else; for example, Create project issue is absent without github_project_repo.
Choose which shell a page renders in, and tune its sidebar, table of contents, section index and page width.
Every page renders in a shell: the reading shell, with a sidebar on the left
and an outline on the right, or a plain single column. The page’s type
chooses the shell, not the folder it lives in, so documentation can sit
anywhere under content/. To give an operations handbook in
content/handbook/ the documentation shell, set the type on its section and
cascade it to every page below:
If you override the list, keep those five in it, because the theme loads the
shell’s scripts only for listed types. Listing a type of your own switches the
shell’s behavior on for it but does not draw a sidebar unless your own
templates for that type do; to make a section read like documentation, give
it type: docs as above.
Section roots
hugo.yml
params:ui:docs_section:docsblog_section:blog
These keys name the top folders of the documentation and the blog. The theme
uses them to find sidebar roots, the command palette’s quick links and default
icons, but they do not choose the shell: the handbook above gets the
documentation shell while docs_section stays docs.
A docs page’s sidebar normally starts at the documentation section. To start
it at the site home instead, so it shows every top-level section:
hugo.yml
params:ui:docs_sidebar_root:home# home | section
Any other value warns and uses section.
Documentation at the site root
A site that is mostly documentation can serve it from the URL root, as
/install/ rather than /docs/install/, while the source stays in
content/docs/. It takes three changes, made together.
First, drop the docs/ segment from URLs with Hugo’s own permalinks:
Second, stop each language’s site root index (content/_index.md,
content/_index.zh.md, …) from rendering, so it no longer competes with the
docs section for the same output path while remaining a valid link target:
content/_index.md
---title:Product Docsbuild:{render:link }---
Third, root the sidebar at the site home, so the sidebar and the
previous/next links walk one tree:
With docs_sidebar_root: home, every top-level section joins that tree. Take
out the ones that are not part of the reading order, such as the blog, a
community page or downloads, with toc_root: true in their _index.md; they
then appear neither in the tree nor in the paging order:
content/blog/_index.md
---title:Blogtoc_root:true---
The documentation now shares the URL root with every other section, so build
with --printPathWarnings and resolve any duplicate target before you
publish.
Landing pages
A page with layout: landing gets neither shell: it keeps the navbar and
footer and fills the width between them with sections such as a hero, cards
and pricing. See Home and landing pages.
Sidebar
The sidebar mirrors the folders under content/, ordered by weight and
labeled with linkTitle where a page has one. These settings, shown with
their defaults, tune how much of the tree is open and how wide it is:
sidebar_menu_compact opens only the branch of the current page and its
neighbors; false opens the whole tree.
sidebar_menu_foldable lets readers open and close sections. Blog sections
start open; set sidebar_expanded: false in a section’s _index.md to start
it closed.
sidebar_expand_levels is how many levels are open by default.
sidebar_menu_truncate caps the entries rendered per section, which keeps
the HTML of a thousand-page tree usable. When a section is cut, a build
warning names it and the value it needs.
sidebar_width_min and sidebar_width_max bound the width, in pixels, that
readers can drag the sidebar to on desktop. Double-clicking the divider
restores the default.
sidebar_item_overflow: ellipsis cuts long titles short; wrap suits a
site with many long titles, such as Chinese ones.
Each reader’s open sections, sidebar width and scroll position are kept in the
browser, separately for each language. Below the md breakpoint the sidebar
becomes a drawer with a backdrop.
On a large site, rendering every page’s sidebar separately slows the build.
Once the site reaches params.ui.sidebar_cache_limit pages (500 by default),
pages with the same effective sidebar settings share one cached tree, and the
browser marks the current page and opens its ancestors. The shared tree is
still complete and navigable without JavaScript. Below the limit, each page’s
current position is rendered at build time. A Book page with
sidebar_headings on always gets its own tree.
Use an explicit tree when the order of a manual comes from somewhere else,
such as a Sphinx toctree you migrated and want to keep; when weight in
content/ already gives the order, you do not need this file. The theme uses
data/docs_nav.json instead of the folder tree when all three hold:
the file exists and has a sections key;
the page’s type is docs or book;
the page’s resolved sidebar root is not the site home.
The file is a tree of nodes. Each node’s page names a content path and its
children are its children in the navigation. The theme resolves links and
the current branch from page identity; url and the active_path_by_url
ancestor map are optional hints kept for older files:
Write paths without a language prefix and without the deployment subpath from
baseURL. The theme strips both before comparing, so /docs/start/ matches
/zh/docs/start/ and /handbook/zh/docs/start/, and rendered links keep the
real prefixes.
The tree can also group pages without moving their files. With
docs_section: docs and docs_sidebar_root: section, root-level pages of type
docs can be arranged like this:
content/config.md and content/api.md stay sibling files, but API appears
under Config, and opening API expands Config. A node applies to a sidebar
root when it is that root, sits below it in content/, or is a Docs or Book
page that resolves to the same root. A custom page URL changes the link, not
where the page sits in the sidebar. A separate Book root, or a root nested
with sidebar_root_for, uses its own branch, and a root missing from the file
keeps its folder tree.
The same tree drives the previous/next links and the navigation JSON, so the
pager and the sidebar always agree. An empty sections array warns and falls
back to the folder tree, and a page that does not exist warns and is
skipped. Placeholder nodes with manual_link and sidebar_divider rows stay
in the sidebar without becoming paging targets. A divider section keeps its
children here too; use the same
group-only front matter as in the folder
tree.
Sidebar icon density
A page’s icon front matter shows in the sidebar. An icon on every leaf makes
a long tree harder to scan, so you can limit them:
hugo.yml
params:ui:sidebar_icon_policy:groups# all | groups | none
Value
Effect
all (default)
Every entry with an icon shows it
groups
Only the root and entries with children show icons
none
No entry icons in the sidebar
An invalid value warns and uses all. This site uses groups.
Expanding headings in the sidebar
On a long Book chapter, readers can jump between sections from the sidebar
when the current page’s h2–h4 headings appear as a branch under its row. The
branch is off by default; turn it on with:
An integer from 2 to 4 is the deepest level shown, true means 2 (h2 only),
and false turns the branch off; any other value warns and turns it off. It
applies only to type: book pages and only under the current page’s row, and
the outline on the right stays. Front matter or a section cascade can set the
same key, and sidebar_headings: false turns off an inherited setting.
Table of contents
The outline on the right lists the page’s Markdown headings. Which levels it
collects is Hugo’s own setting:
The outline always follows the reader: a continuous rail marks the current
section as the page scrolls, with no setting to turn on. Readers can collapse
the right column, and the browser remembers it. Below the xl breakpoint the
column hides and the outline moves into the sidebar drawer. An older
configuration may still set params.ui.scroll_spy or a page-level
scroll_spy; both are accepted and ignored.
To hide the outline on one page, set notoc: true in its front matter.
Only headings that reach Hugo’s table of contents appear. Headings produced by
Markdown-style shortcodes ({{%/* … */%}}) do; headings inside ordinary
shortcodes ({{</* … */>}}) usually do not, so write structural headings in
Markdown.
Section index style
A section with an _index.md lists its child pages automatically, either as a
list or as cards:
hugo.yml
params:ui:section_index:cards# list | cardssection_index_columns:2
list (default): each child’s title, then its description.
cards: a grid of cards showing each child’s title (or linkTitle),
description and icon; section_index_columns (default 2) sets the
columns.
A section can choose its own style in its front matter. An invalid value warns
and uses the default:
no_list: true lists no children, simple_list: true lists them as plain
bullets without descriptions, and a child with hide_summary: true leaves
itself out. Let the theme build these lists rather than writing them by hand,
because a hand-written list drifts out of step with the sidebar.
Page width
hugo.yml
params:page_width:normal# normal | wide | full
normal is a comfortable reading width, wide widens the content column and
full fills the window. Set it per page or, through a cascade, per section;
wide tables, large images and API references often need wide:
content/docs/api/reference.md
---title:API referencepage_width:wide---
Book pages also accept reading_width (slim, normal or wide), which
changes the measure of the text without changing the shell. An invalid value
for either key warns and uses normal.
Navbar and footer switches
The navbar and footer can be switched per page with top-level front matter
keys, not keys under ui. To change a whole section, set them once in its
cascade:
Page parameters — the front matter keys for per-page overrides
5.6 - Search
Add full-text search that runs in the reader’s browser, and control what it indexes and how it ranks results.
OINK’s search runs entirely in the reader’s browser. Hugo writes one JSON index
per language at build time, the browser downloads it on the first search, and
every query is answered locally, so there is no crawler, account, CDN or search
service to set up, and queries never leave the page. Search is off by default;
one line turns it on.
Readers search from the command palette;
Command palette covers how they open it and what else
it offers.
Turning on local search
hugo.yml
params:offline_search:true
Search then appears on the home page, on every page with a shell layout
(docs, book, blog, swagger or expo; see
Layouts and page types), and on landing pages while
params.ui.landing_search is on. Print output never carries it. Other pages
get no search dialog, index reference or engine at all: these are not hidden,
they are never generated.
hugo server builds the index too, so the preview searches exactly like
production. On a very large site, rebuilding the whole index slows every
preview noticeably, and you can skip it during preview:
hugo.yml
params:offline_search:true# skip index building during preview; only needed on very large sitesoffline_search_on_serve:false
Controlling index size
offline_search_index decides how much of each page goes into the index. That
is a trade between what readers can find and how much their browser downloads
on the first search:
A very large site where titles alone locate a page
heading
The above plus every heading in the page
When headings are specific enough
summary
The above plus description and summary
Sites with thousands of pages. This site uses it
content
The above plus the full plain text
The default, suitable up to a few hundred pages
offline_search_summary_length sets the length, in characters, of the excerpt
stored for each page (default 70), which a result shows when no passage
matches. offline_search_max_results caps the page results of one search
(default 10). Configuration has the full
definitions.
A large content index does not delay the first search. While a language’s
index stays within 2 MiB, it is published as one file. Above that, the build
moves page text into a second file, offline-search-body.<lang>.json, so the
first download holds only titles, headings, field entries, descriptions and
keywords, and the palette answers from those at once. It then fetches the page
text in the background when that file is 8 MiB or smaller, or waits for the
reader to choose Search page text when it is larger or the browser asks to
save data (Save-Data). To leave page text out altogether, use summary.
Adjusting ranking
A page can help readers find it through its own front matter:
search_keywords adds the words readers type that the page itself may never
use, as a string or a list. It usually helps more than a boost: a reader who
types pg or GUC now finds a page titled only “PostgreSQL parameters”.
Keywords rank just below the title and above the body.
search_boost multiplies a page’s score, both its field strength and its
section BM25 score, and defaults to 1.0. A value of 1.5 lifts a page
without ever letting a partial match beat a complete one. Zero, negative and
non-numeric values warn and count as 1.0.
Set a default for a whole section once with a cascade; a page’s own value
still wins over the inherited one:
content/docs/_index.md
---title:Docscascade:search_boost:1.25---
On this site, every page under docs/ lists its Chinese phrasing, its English
terms and the configuration keys it documents in search_keywords.
Keeping a page out of the index
content/internal/draft-plan.md
---title:Internal plansearch_exclude:true---
The index also leaves out pages with an empty body. Only search_exclude
works: the retired exclude_search and excludeSearch keys are ignored, so a
page that still uses them stays searchable; the migration checker reports
them.
The index is a static JSON file anyone can download; it is not access control.
Do not put content that should stay private on the site, and do not use
search_exclude to protect it.
Chinese, mixed queries, and identifiers
The engine scores the downloaded index with BM25 as it scans it, and builds no
index of its own in the browser. It splits text by each character’s Unicode
script rather than by the page’s language, so one query can mix English,
Chinese and code identifiers:
Unspaced CJK queries. Runs of Chinese, Japanese and Korean match through
overlapping character pairs, with no dictionary, so 数据库连接池超时 or
PostgreSQL备份 works without spaces. A single CJK character stays one
term, and a boundary between CJK and Latin text splits automatically.
search_keywords is still the place for synonyms and abbreviations.
Identifiers and symbol runs. Names with underscores, hyphens or dots,
paths, command options and runs of two or more symbols (shared_buffers,
pg_basebackup, --baseURL, /pg/data, ->>) match literally and are
never spelling-corrected.
Word boundaries, stemming and typos. Ordinary words match whole words
exactly, so port does not match support. Loose matches count for 0.7 of
the field’s weight: the prefix of a longer word, a Porter inflection of an
ASCII word, a four-character stem in other alphabets, a word of five or more
characters inside an underscore name or compound, and a spelling
correction. Spelling correction applies only to ASCII words of five or more
characters that appear in no form in the selected scope: one edit for 5–7
characters, two from 8, with a swap of adjacent letters counting as one.
Query terms and stop words. Case and Unicode width are normalized, and
up to 30 terms of a query take part. A short list of English function words
and six Chinese question words (为什么, 如何, 怎么, 怎样, 什么,
请问) score at 0.1 and are not required, unless the query consists of
nothing else.
The terms of a query may match in different fields of a page. Results rank by
these rules, in order:
A page that covers at least 90% of the query’s weight is a complete match,
and complete matches hide partial ones. When there is none, partial matches
appear in descending tenths of coverage, labelled with how many terms
matched.
Among complete matches, a page whose match fits in one section (plus
page-level fields) comes before one whose match spans several sections.
Field strength is the weighted mean of each term’s strongest field (title
10, keywords 8, tags and categories 6, headings and search entries 5,
description 3, body 1; loose matches × 0.7), multiplied by 1.5 when the
terms appear adjacent and in order, and then by search_boost.
Equal strength is broken by the best section’s BM25 score (k1 = 1.2,
b = 0.5) times search_boost, and after that by title and URL.
A boost cannot lift a partial match above a complete one. Results stay grouped
by content root in the navbar’s order; the result limit applies first, and the
ranking orders each group. A page found only through its keywords shows its
description or excerpt, never the keyword list.
Each page takes one result row, however many of its sections match. The row
names the best matching section or entry, shows up to 160 characters around
the hits with inflections and corrections highlighted as the page spells them,
and opens the rendered anchor. Every anchored field,
whether from {.fields} or fields/field, carries data-td-search-entry
automatically, so searching for a parameter name jumps straight to its
definition; your own markup with an id and a non-empty data-td-search-entry
works the same way. A match only in page metadata opens the page itself. The
heading and summary scopes can still land on headings and field entries,
but words that appear only in body text need content.
The palette’s Search in control narrows results to the current top-level
section (the home page has none); Command palette
describes it. While an input
method is composing, results and Enter wait until the text is committed. Empty,
loading, unavailable, result-count and partial-match states all have readable
text and are announced to screen readers.
Optional: hosted search
The theme also integrates two hosted search services, both off by default.
Each sends every query to a third party, so if you enable one, describe its
crawling, availability and privacy terms in the site’s privacy statement. A
site uses one search backend: when more than one of local search, Algolia and
Google is configured, the build warns
params: more than one site-search backend is configured.
All three values are required, and OINK never falls back to another project’s
public index. DocSearch’s script and styles ship with the theme, so nothing
loads from a CDN, but every query goes to Algolia. It needs real credentials
and an index, so this page shows no live demo.
Google Programmable Search
hugo.yml
params:gcs_engine_id:YOUR_ENGINE_ID
Results also need a page of their own:
content/search.md
---title:Search resultslayout:search---
The search box submits to <baseURL>/search/?q=…, where Google’s script
renders the results; the reader’s browser must be able to reach
cse.google.com. Because it depends on that service, this page shows no live
demo.
Verify
Build, and confirm there is one index per language:
hugo --printPathWarnings
ls public/offline-search-index.*
A development build names the file offline-search-index.zh.json; a
production build adds a fingerprint, as in
offline-search-index.zh.7ab….json. A missing file means that language’s
pages never reached an index.
When Chinese queries find nothing, inspect the index first:
The entry count should be close to the number of Chinese pages, and the
keywords and boost fields should show what the front matter set.
Open the site and press /. Search for an English word, then a
Chinese one. Results are grouped by content root, each group named after
the first breadcrumb segment.
For a subpath deployment such as https://example.com/docs/, open the
browser’s network panel and check that the index request includes the
subpath. An index request to the domain root returns 404 while the page
itself works, and this is the most common reason search returns nothing.
Related
Command palette — search’s entry point, and the commands and page actions beside it
Use one dialog for page search, page actions, and site commands. Open the palette, use its groups, and add custom commands.
The command palette provides one modal dialog for page search and site actions.
Use it to copy page Markdown, switch language or version, and open site links.
The theme assembles it with local search. If params.offline_search is off,
the page has no palette, index, or search engine. See Search.
On layouts where \ is hard to reach, use c
or type > instead.
/, \, f, and c are bare single keys.
They do not open the palette during typing. This applies to focus in an input,
textarea, select, or contenteditable, and to input-method composition. The
keys type ordinary characters instead. The modified
⌘/Ctrl + K can open the palette from a text box. It also remains inactive
during input-method composition. Another open native dialog or visible ARIA
dialog blocks every opening shortcut, including fixed-position dialogs.
Hidden ARIA dialogs do not block them.
Inside the palette, use ↑↓ to select an item. Press
Enter to run it. Press Esc to close the palette and return
focus to the opening control.
What the palette holds
With nothing typed, the palette lists four groups in a fixed order:
Quick links1
A few entry points chosen from the navbar’s top-level menu.
Decided by:params.ui.quick_links.
Page actions2
Copy Markdown, Open in ChatGPT / Claude, view Markdown source, view history, edit this page, create a child page, create docs/project issue, print the section, open the duo view (compare_translations).
Decided by: repository configuration, assistant_links, whether this page has a Markdown output, and for the duo view params.ui.compare plus a same-origin translation.
Preferences3
Switch version → switch language → switch style → switch theme.
Decided by: whether the site configures versions, languages, the preset menu (preset_menu), and the light/dark menu.
Commands4
Copy link (copy_link), open the GitHub repository, open the browsing history, then the site’s own commands.
Decided by: always available for copy_link, params.github_project_repo (falling back to github_repo), whether keyboard navigation is on, and ui.command_palette.commands.
The four preferences follow the navbar order: version, language, style, theme.
Selecting a preference such as “switch language” does not navigate immediately.
The palette expands its options in place. Select an option in a second action.
When you type text, page results appear first, grouped by content root. Each
group uses the first breadcrumb segment as its name. Groups follow the
navbar’s top-level menu order. Commands and actions appear together in the
final group.
A query starting with > lists commands and actions only and searches no pages.
Use it when you are unsure which menu holds a feature.
If the theme can explain why an item is unavailable, the item remains listed.
Without repository configuration, “edit this page” remains with an “unavailable”
note.
The palette also offers two adjacent Search in options for
all sections or the current top-level section. It filters page results before the
result limit, while commands and page actions remain available. The choice
persists only while this page stays loaded. Matching sections appear beside
page titles and open real heading anchors; multiple hits on one page share one
row. Partial matches show their term coverage. See
query semantics. Tab focuses the selected scope;
arrow keys switch it. The control disappears in command and preference-choice modes.
Quick links
Select quick links from Hugo’s main menu by identifier. You do not need to
define them again:
hugo.yml
params:ui:quick_links:[docs, blog]
Values use the identifier of entries in menus.main. If unset, the list
defaults to the documentation and blog sections (params.ui.docs_section and
blog_section). To configure the menu, see
Navigation and menus.
Custom commands
A site’s own commands go under params.ui.command_palette.commands, after the
built-in ones, in the order written:
hugo.yml
params:ui:command_palette:commands:- id:theme_issuestitle:OINK issuesdescription:Report or browse theme and documentation issuesurl:https://github.com/pgsty/oink/issuesicon:fa-brands fa-githubkeywords:[bug, support, roadmap]
This site uses the command above. Commands have seven fields. An unsupported
key or invalid record warns and discards that command:
id is required. It must start with a lowercase letter and contain only lowercase letters, digits, underscores, and hyphens. It must not duplicate a built-in action ID.
title supplies the displayed title. The description supplies the smaller line below it. The icon is one Font Awesome class pair.
keywords is an array of possible reader search terms. It participates in matching but is not displayed.
url and action are mutually exclusive and one is required. The url accepts a full http/https address, site path, or in-page anchor beginning with #. An address with a host opens in a new tab. The action references a built-in action ID.
Do not alias a built-in action with action:
Built-in actions are already in the palette, and wrapping one makes the same
feature appear twice under two names.
For a multilingual site, put commands under
languages.<lang>.params.ui.command_palette.commands. This lets you localize
titles and keywords. The default language’s list sets the order. An entry
with the same id in another language overrides only fields. A new id is
appended. Command order therefore remains the same across languages.
Configuration can supply only a link or built-in action reference. It cannot
inject a JavaScript callback. The palette reads a plain data manifest.
Page actions
The palette’s “page actions” and the documentation title’s split button share
one implementation. They use the same action descriptors, URL generation, and
executor. The button’s left half copies the page’s Markdown. Its right arrow
expands all actions.
To hide the button beside the title, set page_context_menu: false. The
corresponding actions stay in the palette:
hugo.yml
params:ui:page_context_menu:false
To hide the button on just one page, use page_context_menu: false in that
page’s front matter instead.
The assistant_links setting is off by default. Clicking an assistant link
sends the current page’s full URL, including query string and anchor, to a
third party. It never uploads the body. Enable links site-wide through
params.ui.page_context_menu.assistant_links. A page can only restrict that
policy with this front matter:
Page front matter
page_context_menu:assistant_links:false
Check the title menu and palette. Neither should offer assistant links on
that page. See AI-agent support for handoff behavior.
The links open ChatGPT and Claude.
links adds external actions that appear only in the menu beside the title, not
in the palette:
hugo.yml
params:ui:page_context_menu:links:- name:Ask in Discussionsurl:https://github.com/pgsty/oink/discussions/new?title={title}icon:fa-solid fa-comments
The three placeholders {url}, {title} and {markdown_url} are replaced with
the current page’s values.
Whether “edit this page”, “view history” and “open an issue” are available
depends on repository configuration. See
Repository links and page info. “Copy Markdown”
and “view Markdown source” require the page’s markdown output. See
AI-agent support.
How it relates to full-text search
The dialog uses two independent data sources:
Page results come from the local search index. If the index was not generated or fails to download, the palette still opens and runs commands. The page section reads “the page index is unavailable; actions still work”.
Commands and actions come from a JSON manifest embedded in the page and need no network.
The theme does not assemble the palette for print output. If offline_search
is off, there is also no palette. The keys f and c then
do nothing and do not affect normal typing.
Query-aware site actions
Trusted site JavaScript can register query-aware tail rows through
window.OinkCommandPalette.registerSearchTail. Feature-detect the hook before
calling it, because pages without local search do not provide it.
Load the integration after the theme scripts, for example through
layouts/_partials/hooks/body-end.html. This example assumes the site
implements openSiteAssistant and owns its provider settings:
if(window.OinkCommandPalette?.registerSearchTail){constunregister=window.OinkCommandPalette.registerSearchTail({id:'ask-site',rows(context){return[{id:'ask',title:'Ask the site',description:context.query}];},activate(row,context){context.handoff();returnopenSiteAssistant(context.query,{locale:context.locale,signal:context.signal,});},});// Call unregister() when removing this integration.
}
Rows follow native results and actions, including empty/error searches. They
are absent in empty, command, choice, and loading states. Keep rows() pure
and synchronous. All strings render as text. Activation receives the query
that created the row, not newer input. Before opening another coordinated
surface, use handoff(). The site then owns its focus and failure UI.
For non-UI actions, return the operation without calling handoff.
The Shell contract defines fields,
cancellation, validation, and lifecycle. YAML cannot contain callbacks. OINK
adds no remote service or telemetry by default.
Verify
Run from your site’s root after a production build. In the commands below, replace
public/docs/getting-started/index.html with an actual generated documentation
page in your site (including a language prefix if needed).
After a build, confirm the command manifest reached the page:
hugo --printPathWarnings
PAGE=public/docs/getting-started/index.html
test -f "$PAGE"&& grep -o 'td-action-manifest'"$PAGE"
This confirms that HTML contains the action data. The remaining steps check
the palette interface with local search enabled.
Open the site. Press ⌘/Ctrl + K without typing. Confirm this order: quick links, page actions, preferences, commands.
Type >. Confirm that only commands and actions remain. A new command should appear after “open the GitHub repository”.
Repeat step 3 in another language. Confirm that command titles change and order remains the same.
Open print preview (⌘/Ctrl + P). Confirm that it contains no palette.
Related
Search — where the palette’s page results come from
Configuration — full definitions of ui.command_palette and ui.page_context_menu
5.8 - Keyboard navigation
Use single-key shortcuts and understand when typing disables them. Disable shortcuts for the site or individual pages.
Your readers can work through your documentation without reaching for the
mouse: every interactive OINK page answers twenty-nine single-key shortcuts, ten
for moving around, nine for acting on the page and ten for changing the view.
Press ' on any page to see all twenty-nine; keys the current page
cannot use are dimmed. Shortcuts are on by default, step aside whenever the
reader is typing, and can be turned off for a site or a page.
Navigation
Key
Action
WS
Move to the previous / next entry of the sidebar tree
AD
Collapse / expand the section
EnterSpace
Open the focused tree entry
QE
Previous / next page in sidebar order
KJ
Previous / next heading of the page outline
X
Switch to the next language
R
Switch to the next top-level section
V
Switch to the next version
H
Open the browsing history
G
Go to the home page
Sidebar tree
The tree keys work on every page with a sidebar tree, and you do not have to
enter the tree first: with focus in the article, S moves from the
current page’s entry to the next one in a single press. The focused row is
tinted one step darker than the current-page row, so “where I am” and “where
the cursor is” stay distinguishable. When the sidebar sits in the phone drawer
or is collapsed on desktop, the first press opens it.
Once focus is in the tree, ↑↓←→ work like the letters; in the article the arrows keep native
scrolling. In a right-to-left language ← and →
follow the reading direction, while A always collapses and
D always expands.
From a page entry, A first moves to the parent section and a
second press collapses it. D opens a collapsed section, or steps
into its first visible child when it is already open. Sections without a page
of their own take focus through their disclosure button, which
Enter or Space toggles. Esc leaves the
tree and returns focus to where it was.
Reading
K and J visit the same targets as the right-hand
outline and land where an outline click would. Every jump takes 100 ms however
far it goes, and you can press again before it finishes. Deep inside a section,
K first returns to that section’s start. A page without headings
scrolls a short step instead. On the home page the two keys move between the
landing sections.
Q and E follow the order the sidebar shows, not
dates, and skip collapsed branches, so paging and tree focus always agree. A
section’s index page is an entry of its own: at a blog boundary the order runs
from the last post of one section to the next section’s index, then to its
first post. Without a sidebar tree, paging uses the page-end pager, then the
rel="prev" and rel="next" links in <head>.
Language, section and version
These keys work on every interactive page and do nothing when there is no
other choice:
X switches to the next language, wrapping after the last one.
It opens this page’s translation, or that language’s home page when the page
has none.
R cycles through the same-origin top-level navbar entries. It
skips external links and the navbar’s utility controls.
V opens the next version listed in params.versions that has a
URL, wrapping after the last one.
Browsing history
H opens a search-style list of the pages you have read on this
site, newest first. The page you are on is left out, so H then
Enter takes you back to the previous page.
Key
In the history list
Typing
Filter by title and path; every word must match
↑↓
Select an entry
Enter
Open it; Ctrl+ with Enter (⌘+ with Enter on macOS) opens it in a new tab
Shift+ with Delete
Remove the selected entry
Esc
Close the list
Clear history removes all stored visits, including the current page. The command palette also offers
a Browsing history command that opens the same list.
History keeps the last 100 pages in this browser’s localStorage, under a key
named after the site’s base path, such as td-history:/. Every language of the
site shares one list, and two sites on the same domain keep separate ones. OINK
never sends it anywhere. It is recorded only on pages where keyboard navigation
is on, and there is no separate switch for it.
G opens the home page of the current language. On the home page
itself it scrolls back to the top.
Actions
Key
Action
/F
Search
\C
Open the command palette with commands only
U
Edit this page
N
Create a child page
I
Create a docs issue
O
Expand or collapse everything that folds
P
Print this page
[
Open in ChatGPT
]
Open in Claude
Search and commands
/ opens the command palette ready to
search, and \ opens it with commands only.
Both keys belong to the palette, so they keep working when keyboard
navigation is off; F and C are the keyboard
navigation equivalents. ⌘+ with K on macOS and Ctrl+ with K
elsewhere open the palette from anywhere, even a text field, and close it
again. On layouts where \ is hard to reach, press C
or type > at the start of the search box.
The palette needs local search (params.offline_search: true); without it
these four keys do nothing.
Page actions
U, N and I run the same actions as the
page menu beside the title and open their target in a new tab. All three need
a repository configured for the site;
U and N also need a page with a source file, so
they do nothing on generated pages such as tag lists. P prints
the page, exactly like the browser’s print command.
[ and ] hand the page to ChatGPT or Claude in a new
tab. They work only when the site enables
params.ui.page_context_menu.assistant_links.
Expand or collapse all
O opens everything on the page that folds: the sidebar sections,
the right-rail groups (outline, backlinks, term clouds), collapsible callouts,
file trees, “show more” lists and long code blocks. When everything is already
open, it folds all of them instead, except the sidebar branch of the current
page, so you never lose your place. The line you are reading stays where it is
while the page above it grows or shrinks.
Menus and popovers such as navbar dropdowns are not folded content and stay
closed. Collapsed rails stay collapsed; restore them with their own buttons.
View
Key
Action
B
Open or close the Duo View
Z
Turn Zen Mode on or off
M
View the page’s Markdown source
T
Switch to the next visual style
Y
Switch color mode: light, dark, system
L
Switch the index layout: list, cards, table, gallery
;
Switch the gallery layout: wall, cards, seamless
,.
Smaller / larger gallery images
-=
Narrower / wider reading column
'
Open or close the shortcut help
Zen Mode and Duo View
Z hides the navigation shell so only the text remains: the
navbar and footer on the home page, and also both rails and the floating
buttons on documentation pages. The choice lasts for the browser tab and is
restored before the first frame, so paging with QE keeps it without a flicker. At phone width the top bar stays,
because it is the only way back to the navigation. While the shell is hidden,
the tree keys do nothing.
B opens the Duo View when
the site sets params.ui.compare: true and the page has a translation, and
closes it again from either pane.
M opens the page’s Markdown output in a new tab on sites that
publish it.
Appearance
T steps through the visual styles the site offers in
params.ui.preset_menu and wraps after the last one; it does nothing when the
site offers a single style. Y steps through light, dark and
system color modes and does nothing when the dark palette is off
(params.ui.dark_mode disabled). Both work
on every interactive page and remember the choice like the Appearance menu does.
Index and gallery layouts
On blog, release and case index pages with params.ui.blog_index_toggle,
L cycles the index through list, cards, table and gallery. On an
Expo album, and on an index while its
gallery view is showing, three more keys
control the grid:
Key
Gallery action
;
Cycle the layout: wall, cards, seamless
, or <
Shrink the target image size by 20 px, down to 160 px
. or >
Enlarge the target image size by 20 px, up to 360 px
The toolbar follows each change, the grid reflows at once, and the choice is
remembered: td-expo-mode and td-expo-size for Expo albums,
td-blog-gallery-mode and td-blog-gallery-size for index galleries. Clicking
a layout icon or dragging the size slider does not stop these keys.
Page width
On wide screens the reading column keeps its page width even when the window
has room to spare. - and = (or +)
narrow and widen it by 100 px at a time on documentation, book, blog and Expo
pages:
The column never gets narrower than 600 px and never wider than the space
between the rails. Widening until it touches the rails makes it fill that
space on any screen size.
The width applies to every page of the site in this browser and is restored
before the first frame. It replaces each page’s page_width and the Book
content measure. Printing ignores it.
A step that reaches the page’s own width stops there and forgets the stored
width (td-shell-article-w in localStorage), so stepping back always
returns every page to the width its author chose.
Expo viewer
An Expo image opens in a viewer with its own keys for moving, zooming and
changing images, listed in the Expo guide. Page
shortcuts pause while the viewer is open and resume when it closes. The viewer
keys work even when keyboard_nav is off.
Shortcut help
' opens all twenty-nine shortcuts in a centered dialog: navigation,
actions and view side by side (ten, nine and ten rows). Rows the current page cannot run
stay in place but are dimmed, and screen readers hear them as unavailable, so
the grid keeps the same shape everywhere. The dialog opens from anywhere: in
the middle of a long page, in Zen Mode, or on pages without a footer
(footer_style: none). ', Esc, the close button or
a click outside the dialog closes it.
The question-mark button at the end of the footer’s bottom bar offers the same
sheet. Hovering or focusing it previews all twenty-nine shortcuts directly
above the footer (three columns side by side on wide screens, wrapping cleanly
on narrower screens), with unavailable rows already dimmed; clicking it opens
the centered modal dialog with the Enable shortcuts toggle, and closing the
dialog returns focus to the button.
With keyboard navigation off and local search on, the button keeps only the
two palette keys, / and \, and opens no dialog.
Keys left free
? and the digits are deliberately unbound, and modified letters keep their usual meaning except for the exact search chord
Ctrl+ with K or ⌘+ with K. Use the character printed by
your keyboard layout. For example, German Shift+ with 7 opens search.
The gallery and width keys also accept Shift to produce ,, ., ;, <, >, = or +.
When shortcuts stand down
Every binding is a single key, so each one steps aside when it could collide
with typing or an overlay:
Focus is in a text field: <textarea>, <select>, contenteditable, or an
<input> you type into, such as text, search, email, password or number.
Non-text controls such as gallery layout radio buttons and the size slider
keep the page shortcuts and their own arrow keys.
Focus is inside a map or an audio or video player, which keeps its
own keys.
An input method is composing, which matters on every Chinese, Japanese or
Korean site.
A modifier key is held. ⌘+ with C still copies,
Shift+ with M does nothing, and Shift+ with ↓ stays a
browser action.
The command palette, the browsing history, the shortcut help, the Expo
viewer, another open dialog or a visible ARIA dialog owns the keyboard.
Hidden ARIA dialogs do not block shortcuts.
Comments load in an iframe, so their keystrokes never reach the page.
Focus order and accessibility
Skip link: the first Tab on a page reveals “Skip to
content”, which passes the navbar and sidebar in one step and marks the
article title.
Real focus: tree navigation moves the actual DOM focus, so a screen reader
announces the link name and its “current page” state, Enter
keeps the link’s native behavior, and the Tab order is unchanged.
Hidden content: a collapsed sidebar or closed drawer leaves the Tab order,
while the button that restores it stays reachable. Clicking the article, a
table or a code block does not leave a large outline behind for the next key.
High contrast: under forced-colors the focused row and the selected
history entry are outlined in the system highlight color.
Reduced motion: with prefers-reduced-motion, heading jumps and paging
land instantly.
The keycaps in the shortcut help are the same as the
Kbd component you write in pages.
Turning it off
To turn off single-key shortcuts for yourself, open shortcut help and uncheck
Enable shortcuts (enabled by default). At the start of any page with these shortcuts, Tab
past Skip to content to reach the same checkbox. This also works on pages
without a footer. Space toggles the checkbox. Your choice applies across the
site’s languages in this browser. Ctrl+K or ⌘K still opens the search palette.
Site-wide:
hugo.yml
params:ui:keyboard_nav:false
For one page, such as an interaction-heavy demonstration, or for a whole
section through cascade:
The key takes a boolean only; see Configuration for
the complete definition. A page with keyboard navigation off ships no keyboard
runtime at all: no shortcuts, no browsing history recording and no restored
page width. /, \ and ⌘+ with K belong to
search and keep working, and the footer’s collapse arrow is unaffected.
Verify
Build your site, then replace public/docs/getting-started/index.html below
with a documentation page your site actually generates, including any language
prefix.
Confirm that the help button is in the page:
hugo --printPathWarnings
PAGE=public/docs/getting-started/index.html
test -f "$PAGE"&& grep -c 'td-shell-keyboard__trigger'"$PAGE"
With keyboard navigation off and no local search, the button is not
generated.
Open a documentation page and press ': three columns
appear, with dimmed rows for features this page lacks. Press it again to
close the dialog.
With focus in the article, press S a few times. The sidebar
focus moves down from the current page and the article stays still. Then
press E and check that pages follow the sidebar order.
Read two pages, then press H and Enter: you are
back on the first one.
Press O twice. Every sidebar section opens, then everything
folds again except the branch of the current page.
On a wide window, press = and -. The column
widens and narrows, and keeps its width after a reload.
Click in the search box and press J. The letter is typed and
the page does not scroll. Repeat with an input method.
Configuration: the complete definition of ui.keyboard_nav
5.9 - Languages
Add a second language end to end, keep heading anchors aligned across translations, and let readers compare two languages side by side.
OINK uses Hugo’s multilingual model as it is: a languages block in
hugo.yml, and each translation saved beside its original with a language
suffix. Adding a language touches five places: the configuration, the
translated pages, the menus, the home page data and, only if you want to
reword them, the theme’s interface strings. The language picker, hreflang
links and per-language search follow from those without further setup.
Enable a second language
hugo.yml
defaultContentLanguage:enlanguages:en:label:Englishlocale:en-USweight:1title:Acme DB Docsparams:description:Documentation for the Acme DB time-series databasezh:label:简体中文locale:zh-CNweight:2title:Acme DB 文档params:description:Acme DB 时序数据库文档time_format_default:2006年1月2日time_format_blog:2006年1月2日
label is the name in the language picker, written in that language:
简体中文, not Chinese.
locale is the standard language tag used for <html lang>, the
hreflang alternate links and Open Graph metadata.
weight orders the languages, lowest first, in the picker and in its
one-click cycle.
params overrides site parameters for this language; any key not set here
keeps the global value. Date formats usually need a per-language value.
The default language is served without a path prefix (English at /docs/…)
and every other language under its own (Chinese at /zh/docs/…). To prefix
the default language too, add defaultContentLanguageInSubdir: true; on a
live site this changes every URL, so set up redirects at the same time.
Translate the pages
Save each translation beside its original with the language code before the
extension. Hugo pairs files that share a base name, so these are one page in
two languages:
content/docs/
install.md#English
install.zh.md#Chinese
_index.md
_index.zh.md
Page bundles work the same way, with index.md and index.zh.md in one
directory. Inside a bundle, a resource without a language suffix is shared by
every language and a suffixed one belongs to that language only. Reference a
suffixed resource without its suffix, , and
Hugo picks the file for the current language:
content/docs/install/
index.md#English page
index.zh.md#Chinese page
topology.webp#used by both languages
screenshot.zh.webp#used by the Chinese page only
A bundle that has only index.zh.md needs the .zh. suffix on every
resource. Unsuffixed resources belong to the default language, which has no
page in that bundle, so the Chinese page would not see them.
Translate what readers see and keep what Hugo uses for structure identical:
Translate: title, description, summaries, menu labels, tag names,
image alt text, callout bodies and reader-facing shortcode parameters.
Keep identical: dates, weight, aliases and anything else that affects
routing or order; a different weight puts the page in a different sidebar
position in each language.
Leave untranslated: commands, configuration keys, file names, URLs,
version numbers, product names and shortcode names.
Menus, home page and interface strings
Three things live outside content/ and need one copy per language.
Use the same identifier in every language, because the command palette’s
quick links and the grouping of search results are matched by it. The full
menu syntax is in Navigation and menus.
Home page data is one file per language, data/home/en.yaml and
data/home/zh.yaml; a language without a file falls back to en.yaml. See
Home and landing pages.
Interface strings, such as the search placeholder and the page-action
labels, are already translated: the theme ships complete, native catalogs for
32 locales (ar, az, bg, bn, de, en, es, et, fa, fi, fr,
he, hi, hu, it, ja, ko, nl, no, oc, pl, pt-br, ro,
ru, sr-cyrl, sr-latn, sv, tr, uk, zh, zh-cn and zh-tw).
zh and zh-cn are Simplified Chinese and zh-tw Traditional. To reword a
string, create a file of the same name in the site’s own i18n/ with only the
keys you change; key names are in the theme’s i18n/en.yaml, and any
placeholder such as {{ .Count }} in the original must stay in your version.
i18n/en.yaml
ui_search:Search the docs
Align heading anchors
Hugo derives a heading’s ID from its text, so a translated heading gets a
different ID: /docs/install/#prerequisites and /zh/docs/install/#前置条件
are the same section under two anchors. A deep link copied from one language
then fails in the other, every cross-reference has to be written twice, and
Duo View cannot keep its two panes at the same section.
Give the translated heading the original’s ID explicitly:
install.zh.md
## 前置条件 {#prerequisites}
Take the ID from the English page’s rendered HTML rather than guessing it from
the heading text, because inline code, badges and shortcodes in a heading
change the generated ID. Keep the same headings, in the same order, with the
same IDs on both sides; a section that exists in only one language gets its own
stable ID that does not collide with the other’s. Adding {#id} when you
write a page costs far less than retrofitting it.
To check every pair in CI, the OINK documentation site runs
check-doc-translations.mjs,
which compares source structure and rendered heading IDs. It is written for
that repository’s content sections and EN/ZH file names, so adapt both before
running it on another site.
Missing translations and the language picker
The language picker’s icon is itself a link to the next language by weight,
wrapping round after the last, so a bilingual site switches with one click.
Hovering over it or focusing it opens a menu of every language; on a touch
screen a tap switches directly.
The menu always lists every configured language. Choosing one opens the
translation of the current page when there is one, and that language’s
home page when there is not. The home page beats a 404, but readers may not
notice they have moved, so treat “every page has a translation” as a rule to
check rather than relying on the fallback.
A missing translation is never filled in with the original
If a page has no Chinese version, the Chinese site has no such page: its
sidebar, search index and page order leave it out.
Search engines see only real translations: hreflang lists the current page
and its actual translations, never the home page fallback. See
canonical URLs and language alternates.
Local search also works per language, so a search on a Chinese page finds
Chinese content, including unspaced Chinese, mixed-language queries and
technical identifiers; see Search.
Duo view
Duo View lets a reader open a page beside one of its translations, which helps
anyone checking a translation or reading in a second language. Turn it on
with:
hugo.yaml
params:ui:compare:true
On Docs, Book and blog pages with a published translation on the same site,
an Open duo view button appears beside the page actions. Readers can also
start Duo View from the command palette, or press B when
keyboard navigation is on (try it on this page), and press B
again to return. The current page stays on the side where reading starts and
the other pane loads the translation; on a page with more than two languages,
readers pick the target language from the toolbar menu. Below 900px the view
becomes a single pane with a language toggle bar.
The Sync Scroll switch keeps both panes at the same section by matching
heading IDs, which is why aligned anchors matter here. When some
headings have no counterpart, or the pages share none, it estimates the
position between matching headings or from overall progress, and an orange
! beside the switch says which; hover, focus or tap it to read the note.
When heading IDs are duplicated or ordered differently between the languages,
Sync Scroll turns itself off and both panes scroll independently.
Duo View adds no pages to the build: only when a reader opens it does the
browser load the two existing HTML pages, in same-origin frames. Pages without
a translation, drafts, home page fallbacks and translations hosted on another
domain are left out automatically. To keep one language out entirely, both as
the page being read and as the translation shown, set compare: false under
languages.<lang>.params.ui.
Before enabling it in production, check two things:
Analytics snippets in hooks/head-end.html run again inside each pane unless
you guard them with window.OinkComparePane; see
Analytics.
Your Content Security Policy must allow frame-src 'self', and the server
must not send X-Frame-Options: DENY or frame-ancestors 'none'; see
Content Security Policy.
<html dir> follows this setting and the theme adds Bootstrap’s RTL
stylesheet. The theme’s own CSS uses logical properties, such as
margin-inline-start rather than margin-left, so the layout mirrors by
itself. Use logical properties in your own CSS too, or your elements will sit
on the wrong side in RTL.
Verify
Build from the site root and confirm that both languages produced output.
These paths assume English at / and Chinese at /zh/; the index check
applies only with local search on:
hugo --printPathWarnings
ls public/index.html public/zh/index.html
ls public/offline-search-index.*
Check the hreflang links of a translated page against
SEO behavior: they list only
real translations, each blog pagination page has its own canonical URL, and
pages after the first omit language alternates.
# Replace with a page your site actually generates.PAGE=public/zh/docs/getting-started/index.html
test -f "$PAGE"&& grep -o '<link[^>]*hreflang[^>]*>'"$PAGE"
On a translated page, switch language from the picker and confirm that the
same document opens; on an untranslated page, confirm that the other
language’s home page opens rather than a 404.
Search for the same concept in each language and confirm both return
results.
Publish documentation for several product versions side by side, with a version switcher and a banner that marks unmaintained versions as archives.
A site needs versioned documentation when readers run different releases of
your product at the same time and those releases differ in ways a reader acts
on: commands, configuration keys, defaults. If most readers can move to the
latest release, or old releases differ only in fixed bugs, keep one site and
mark the exceptions in the text; a single site is easier to maintain and to
search.
OINK treats each version as a separate site: its own Hugo build, usually from
its own Git branch or tag, published at its own address. The theme connects
those sites with a version menu in the navbar and an archive banner on the
versions you no longer maintain.
The version switcher
List the versions under params.versions. When the list is not empty, a
branch icon in the navbar opens the version menu, and an icon-only menu in the
footer’s bottom bar opens upward with the same entries.
hugo.yml
params:# the version this site isversion:v2.1# the menu's accessible name and tooltip (default: Version)version_menu:v2.1versions:- version:v2.1url:https://docs.example.com- version:v2.0url:https://v2-0.docs.example.com- version:v1.9url:https://v1-9.docs.example.com
An entry shows its version, or its name when it has one. The entry whose
version equals params.version, or whose url equals the site’s baseURL
(a trailing slash aside), is marked as the current one.
An entry without a url is a gray item that cannot be clicked, which makes a
group heading, and name: '---' draws a divider (a url on a divider warns).
name accepts inline Markdown:
The same list feeds “switch version” in the
command palette, so the menu and the palette always
agree.
The trade-off in page-for-page links
By default a menu entry opens the target version’s home page.
version_menu_pagelinks: true appends the current page’s path to the target
URL instead, so switching version keeps the reader on the same document. The
risk is a 404: documentation structure changes between versions, and a page
added in v2.1 does not exist in v1.9. This site leaves the option off.
When most versions share a structure and one does not, turn the option on and
opt that one entry out:
hugo.yml
params:version_menu_pagelinks:trueversions:- version:v2.1url:https://docs.example.com- version:v1.9url:https://v1-9.docs.example.compagelinks:false# restructured since; go to its home page
pagelinks: false is the only per-entry setting; an entry cannot turn page
links on when the site-wide option is off. Decide by how stable the structure
is rather than by how far apart the version numbers are: one extra click from
a version’s home page costs the reader less than a 404.
The archive banner
When you stop maintaining a version, mark its site as a snapshot so that
readers arriving from a search engine know to look for something newer:
With archived_version: true, every page of the site, blog and landing pages
included, opens with a banner saying that version v1.9 is no longer actively
maintained and that this is an archived snapshot, with a link to
url_latest_version. The text comes in the site’s language, so you write none
of it. The version number in the banner is params.version; without it the
build warns and leaves the banner out, so set both. A url_latest_version
that fails the theme’s URL check warns, and the banner appears without the
link.
params.version versus params.versions
The two keys look alike but describe different things:
params.versions is a list of sites: the versions in the menu and where
each one lives.
params.version names the version this build is. It marks the current menu
entry, supplies the banner’s version number, and is the fallback when a
data/download/*.yaml file omits version (see
Releases and downloads).
params.version is a label for readers and need not be a Git ref. When
content needs a release tag that resolves, such as the version in an install
command, declare a separate parameter for it instead of reusing
params.version. Both keys are defined in
Configuration.
Deployment layouts for multiple versions
Subdomain
baseURL: https://v1-9.docs.example.com/
Versions are fully independent; each needs its own DNS record and certificate.
Subpath
baseURL: https://docs.example.com/v1.9/
One domain collects all search ranking; the host must route each path to a different build.
Build each version on its own: check out its branch or tag, build with that
version’s hugo.yml, and publish to its address. Because the menu is part of
each build, adding a version means updating params.versions on every branch
you still publish and rebuilding those sites; an old site that is not rebuilt
keeps its old menu. Archived sites carry the same list plus
archived_version: true.
On a subpath deployment, baseURL must include the path segment
Otherwise the search index, page actions and asset links all point at the
domain root. The page looks correct, but search returns nothing, which makes
this the most common subpath failure. See Deploy for
the rest of the host setup.
Verify
Run these from your site’s root after a production build. Replace
public/docs/getting-started/index.html with a documentation page your site
actually generates, including the language prefix if it has one.
Confirm that the version menu reached the page:
hugo --printPathWarnings
PAGE=public/docs/getting-started/index.html
test -f "$PAGE"&& grep -c 'nav-version-menu'"$PAGE"
With params.versions empty or unset there is no menu at all.
No result means that no entry’s version equals params.version and no
entry’s url equals baseURL.
Follow each menu link. With version_menu_pagelinks on, switch from a page
that an older version lacks and check that the reader lands somewhere
acceptable.
On an archived site, open any page and check that the banner is at the top,
in the site’s language, with a working link to the current version.
Press ⌘/Ctrl + K and check that “switch
version” lists the same versions as the menu.
Configuration — full definitions of version / versions / archived_version
5.11 - Taxonomies
Use tags and categories to index pages across directories, with automatic term pages, term cards, rail clouds, and navbar panels.
The directory tree gives each page one place; tags and categories give it more.
A PostgreSQL backup guide can live under “Operations” and still be one click
away from the “backup” tag, so readers who think in topics rather than in your
folder structure find it too. Declare the taxonomies in hugo.yml and tag your
pages; OINK generates the term pages, the term cards, the clouds in the right
rail and the navbar panel without a template of your own.
This page is an example: the “Categories: Customization” line under its title
and the counted chips under the outline in the right rail come from its
section’s category, with no configuration on the page itself.
Enabling a taxonomy
Taxonomies are a Hugo feature, so there is no theme switch. Write
taxonomies: at the top level of hugo.yml, with the singular name as the
key and the plural as the value:
hugo.yml
taxonomies:tag:tagscategory:categories
The list is complete, not added to Hugo’s defaults: once you write taxonomies:, tags and categories exist only if you list them.
The plural is also the URL segment: /tags/, /categories/.
disableKinds: [taxonomy, term] turns all taxonomies off.
tags, categories, modules, authors and series, and their singular
forms, have translated names in every theme language file. Any other taxonomy
is named after its plural (products becomes “Products”). To choose the name
yourself, write title / linkTitle in content/<plural>/_index.md and its
translations, such as _index.zh.md; that name takes precedence:
content/modules/_index.md
---title:Product moduleslinkTitle:Modules---
Tagging a page
The front matter key is the plural (the value side of taxonomies), and
its value is always a list, even with a single term:
content/docs/ha/patroni.md
---title:Patroni high availabilitydescription:Managing PostgreSQL failover with Patroni.categories:[High availability]tags:[PostgreSQL, Patroni, failover]---
When a whole section shares a category, set it once in the section index’s
cascade instead of on every page:
All six documentation sections of this site do this. A page’s own
categories: replaces the cascaded value rather than merging with it, so to
add a category next to the section’s, list both.
The term line on a page
Documentation and blog pages list their terms under the title and summary,
each linked to its term page; on this page that is “Categories: Customization”.
To style the line, target its container .taxonomy-terms-article and the
.taxo-<plural> class each taxonomy adds.
By default the line shows every taxonomy except authors and series,
whose terms already appear in the byline and the series strip; listing them
again as chips would say the same thing twice. To show only some taxonomies, in
a fixed order, name them in page_header; naming authors or series there
brings them back:
hugo.yml
params:taxonomy:page_header:[categories]
page_header cannot hide the line; see Limits. The key is listed in
Configuration.
Two taxonomies the theme knows by name
authors and series are ordinary Hugo taxonomies with no theme parameters of
their own. Declaring them is the whole switch, because the theme has a
dedicated presentation for each:
What the declaration turns on: portraits and linked names in the article head, names on list rows, and one <dc:creator> per author in the feed.
The term page becomes: the author’s profile. The display name is linkTitle, or title if absent; description is the short introduction and the body the long one; the featured-image resolver picks the portrait.
series
What the declaration turns on: a strip above the article body naming the series, this article’s position and the next part, with the whole list behind a <details>.
The term page becomes: the series introduction, listing its members in reading order rather than newest first.
Writing a blog covers both in full, with the front
matter each needs. Two design choices are worth knowing in advance:
There is no data/authors file. The term page is the profile, so there is never a second source to disagree with it.
Series members are ordered for reading: members with a series_weight come first in ascending order, then the rest by ascending date. Hugo cannot be given that order for a term page, so the theme computes it once and both the strip and the term page use the result.
Term and taxonomy pages
Each taxonomy generates two levels of page:
Taxonomy list/categories/
A heading with the taxonomy’s icon, its localized name (“Categories”) and the number of terms, then one card per term, most-used first, each with its icon (an author’s portrait), name and page count.
Term page/categories/customization/
A heading with the term’s title and page count, plus a “Categories” kicker linking to the list when breadcrumbs are off. The member pages follow, newest first, styled like a blog list.
Term cards appear only on the taxonomy list page; term pages show the rail
cloud instead.
Hugo does not transliterate, so a Chinese term gets a Chinese URL: the address
bar shows 定制站点 and the HTML carries it percent-encoded. For ASCII URLs, use
English terms and give each a display name with title in
content/categories/<term>/_index.zh.md, Hugo’s
term page content file
mechanism.
A term page has no place of its own in the content tree, so it borrows one.
When all its members belong to one top-level section, it shows that section’s
sidebar tree and root link, so a reader who clicks a documentation tag stays in
the documentation navigation. When the members span sections, it shows the
site-level tree.
The rail cloud
The right rail of documentation, blog and term pages has one group per
taxonomy under the outline, with counted, collapsible chips. A group appears
whenever the taxonomy is declared and has terms in the current scope. To hide
the clouds and the taxonomy switcher, set toc_taxonomies: false in a page’s
front matter, or params.ui.toc_taxonomies: false in hugo.yml for the whole
site. This changes only the rail: the page keeps its terms, byline, series and
membership.
Taxonomy list pages and term pages start the rail with a taxonomy switcher: one
row per declared taxonomy with its icon, name and term count, linking to its
list page, with the current one highlighted. A site with a single taxonomy has
no switcher. A list page counts its clouds across the whole site and leaves
out its own taxonomy, whose terms are already the cards beside it.
Elsewhere the counts are per top-level section, not site-wide. The theme
first looks for a section named after the page’s type, so a type: docs page
counts within /docs/; otherwise it uses the page’s own top-level section.
“Tags: release 4” on a blog page therefore means four posts in the blog, not
four pages on the site.
Each taxonomy has two built-in icons: one for its group heading and one for
each term chip.
Taxonomy
Group icon
Term icon
categories
fa-solid fa-folder-open
fa-solid fa-folder
tags
fa-solid fa-tags
fa-solid fa-tag
modules
fa-solid fa-cubes
fa-solid fa-cube
authors
fa-solid fa-users
fa-solid fa-user-pen
series
fa-solid fa-book-bookmark
fa-solid fa-book
Any other
fa-solid fa-shapes
fa-solid fa-shapes
Override them by plural name. A string sets both icons; a map with taxonomy
and term sets them separately, and a key you leave out keeps its built-in
icon. Each value is one Font Awesome class pair:
A main-menu entry that points at a taxonomy list page opens a panel of term
chips with their counts, most-used first. You write no dropdown entries for it:
The older url: /tags/ form works too, because the theme resolves a URL entry
to the site page it names before checking whether that page is a taxonomy, so
an existing menu needs no rewrite. Other menu options are in
Navigation and menus.
Bilingual terms
Hugo counts and links taxonomies per language: /categories/ and
/zh/categories/ are separate trees, and a Chinese page belongs only to the
Chinese one. Write the terms in each language’s front matter:
The same string in both languages, such as release, still makes two term pages, /categories/release/ and /zh/categories/release/, each counting only its own language. Using English terms on Chinese pages for the sake of consistency therefore gains nothing and shows English chips to Chinese readers.
Taxonomy names are translated for the built-in plurals, but term names are not: a term is exactly the string in front matter. Write 高可用 on an English page and its chip shows 高可用.
Running a multilingual site is covered in Languages.
Switching by content type
The rail clouds are a display setting. To keep them in the documentation but
hide them throughout the blog, set the switch on the blog index and cascade it
to its pages:
content/blog/_index.md front matter
toc_taxonomies:falsecascade:toc_taxonomies:false
Which pages belong to a taxonomy is a separate choice, made by the terms you
assign. This site, for example, uses categories for sections and tags only on
the blog:
Content
categories
tags
Effect
content/docs/**
Section-level cascade (the six sections)
none
The term line has one row, Categories
content/blog/**
Per post (release, oink)
Per post (Oink, Release)
Two rows in the term line, two chip groups in the rail
To take a whole section out of a taxonomy, delete categories from its index’s
cascade. To take out one page, write categories: [] in its front matter; the
empty list overrides the cascade.
Verify
On a page of your own that has terms assigned, check that:
the title area shows the taxonomies chosen by params.taxonomy.page_header;
with toc_taxonomies on, the right rail shows term groups with counts, and turning it off hides the clouds but keeps the page’s terms;
your taxonomy list page (for example /categories/) lists the terms, and each opens a page of its members.
From your site’s root, replacing both example paths with your own, language
prefix included:
hugo --printPathWarnings
PAGE=public/docs/getting-started/index.html
TAXONOMY_DIR=public/categories
ls "$TAXONOMY_DIR"test -f "$PAGE"&& grep -o 'taxonomy-term'"$PAGE"
Limits
page_header: [] does not hide the term line: an empty list counts as unset, so every taxonomy is listed. To remove the line, stop tagging those pages, or hide .taxonomy-terms-article in assets/css/project.css.
toc_taxonomies: false hides the rail clouds, but no setting limits how many terms a visible cloud shows.
Term pages are not paired across languages, so switching language on a term page does not necessarily lead to the same term in the other language.
Related
Page parameters — categories / tags and the other front matter keys
Blog posts — how the blog list works with taxonomies
Configuration — full definitions of params.taxonomy.* and params.ui.taxonomy_icons
5.12 - Repository links and page info
Connect “edit this page”, “open an issue”, and “view history” to your repository. Show last-modified information, contributors, and feedback at the page end.
A reader who spots a mistake should be one click away from fixing it, and a
reader who lands on a page should be able to tell how current it is. Point
OINK at the GitHub repository that holds your content, and the page action
menu at the right of the breadcrumb row gains Edit this page, View edit
history and issue links, while the end of each page shows when it last changed
and in which commit.
Configure links with four keys
hugo.yml
params:github_repo:https://github.com/pgsty/oink.pgsty.com# the documentation source repositorygithub_project_repo:https://github.com/pgsty/oink# the product repository (optional)github_branch:main# defaults to maingithub_subdir:''# path from the repository root to the Hugo site root
With these settings, this page’s action menu points to:
github_repo is the repository that holds your content, not the theme’s; pointing it elsewhere sends readers’ fixes to the wrong place. Without it, the first four entries above are unavailable.
github_project_repo is optional: a second repository where readers report bugs in the product rather than in the documentation. It alone controls Create project issue, and it is also where the navbar’s GitHub button points. Leave it out if your readers would not know which repository to choose.
github_branch (default main) is the branch your content is edited on, not a deployment or Pages branch.
github_subdir is the path from the repository root to the Hugo site. Leave it empty when the site is at the root; set it to website when the repository holds code with the site in website/.
Each key can be set for the site, for one language, in a section cascade, or
in a page’s front matter, so one site can draw content from several
repositories. The full definitions are in
Configuration.
Content from another repository
When a section is copied or mounted from an upstream repository, its edit and
history links should lead to that repository. Override the repository keys in
the section’s cascade, and use path_base_for_github_subdir to strip or
replace the prefix of each page’s source path before it is appended to
github_subdir. For files copied into the site, that path is relative to the
site root:
content/reference/api/client.md then maps to docs/api/client.md upstream.
For a directory mounted from outside the site, match its absolute source path,
not the mount target inside Hugo. Paths are compared with / separators on
every platform, Windows included, and keep their filename case:
With github_subdir: docs, /srv/upstream/docs/api/client.md maps to
docs/api/client.md. The result must be a non-empty path inside the
repository. When an external file matches no mapping, or the result is
absolute, starts with a drive letter, is . or climbs out with .., the page
gets no Edit, View edit history or Create child page entry; its issue links
still follow their own repository settings.
path_base_for_github_subdir is a regular expression. When upstream files have
different names from the local ones, give a from / to pair instead; this
maps each section’s _index.md to the upstream README.md:
OINK keeps .md and .zh.md side by side in one directory, so both languages
share a path prefix and the expression needs no language directory. After
changing it, click Edit this page on a leaf page and on a section index, in
every language: an expression that strips too much produces URLs that look
right and return 404.
Turning individual entries off
Every entry in the menu has a stable action ID, listed in
the page action menu. When your
Git host does not support an action, hide its entry with CSS:
The command palette uses the same IDs and still offers an entry hidden this
way. CSS can hide a link but cannot correct its target, so when a target is
wrong for the whole site, remove the configuration key it comes from instead.
To drop the whole menu from one page, set page_context_menu: false in its
front matter; see Page parameters.
Create child page opens a new file prefilled from the theme’s
assets/stubs/new-page-template.md. Put your own file at the same path in your
site, assets/stubs/new-page-template.md, to prefill your own skeleton.
Last modified
The last-modified line comes from Git history, not file modification times,
which a checkout resets. Turn on Hugo’s Git support:
The end of the page then reads “Last modified August 17, 2026 · (a1b2c3d)”, and the commit part links to …/commit/<hash>.
lastmod_commit chooses that commit part:
Value
What is shown
subject (default)
The commit subject plus the abbreviated hash
hash
commit a1b2c3d
none
The date only, with no commit link
Any other value warns (invalid params.ui.lastmod_commit) and uses subject.
In CI, set fetch-depth: 0 on the checkout step: a shallow clone, the default
in GitHub Actions, contains only the latest commit, so every page shows that
commit’s date or none at all. Deploy has the
complete workflows. A file you have not committed yet has no Git date, so a new
page previewed locally shows no last-modified line. If your build has no Git
history at all, leave the line off rather than substituting the build time,
which says nothing about when the content changed.
The line belongs to the page’s annotation block, which is on by default;
annotation: false turns the block off for one page. The same block also shows
where a page came from, driven by its front matter with no template override:
Upstream attribution: on a page derived from someone else’s work, set upstream_link with the four required keys upstream_name, upstream_copyright, upstream_license and upstream_notice. The page end then names the work, its copyright holder and license, and links to the full notice. Add upstream_modified: true to say the page was changed downstream.
Translation notice: set params.ui.translation_notice to the language code of the authoritative version, and translated pages link back to the original. A page written natively in its own language opts out with translation_notice: false.
Both families are defined in full in
Page parameters. To change the block
itself, override the narrowest of three partials:
layouts/_partials/annotation-items.html
Add, remove or reorder the lines, keeping the theme’s markup, icons, print rules and accessible label
layouts/_partials/page-meta-lastmod.html
Replace the markup those lines render as
layouts/_partials/page-annotation.html
Replace the block’s outer container
What the page end is made of
Every reading layout ends a page with the same five blocks, always in this
order:
Order
Component
Theme default
Page switch
1
Share
Off (params.ui.share is empty)
share: false, or the page’s own list
2
Feedback
Off
feedback: true / false
3
Annotation
On
annotation: false
4
Pager
On for docs / book / blog
pager: false
5
Comments
On when fully configured
comments: false
The order follows what a reader does after the last paragraph: pass the page
on, say whether it helped, check where it came from, move to the next page,
join the discussion. Share comes first because a reader who wants to pass a
page on has decided that before being asked whether it helped. The share bar is
configured in Writing a blog, the pager in
Navigation and menus, and comments in
Comments.
The feedback widget
The feedback widget asks “Was this page helpful?” with Yes and No buttons, and
after No offers four optional reasons, so you learn which pages fail readers
without running a survey. It is off by default:
hugo.yml
params:ui:feedback:enable:truereasons:true# whether to ask for a reason after "no"
A blog usually keeps just comments, so you may prefer to turn the widget on for
the documentation section only, with a cascade:
content/docs/_index.md
---title:Docscascade:feedback:true---
One click completes it: there is no text box, no submit button and no sign-in.
The browser keeps the choice in localStorage per page and language, so a returning reader sees it and can change it.
When the site has Google Analytics (gtag), the widget sends a docs_feedback event with result (solved / not_solved), page_path and language. Choosing a reason sends a second event that adds reason and refinement: true, so it is not counted twice. Without analytics the widget still works and reports nothing; it needs no backend.
When the page has comments, an “Add details in the comments” link appears under the answer. The widget never writes a comment on the reader’s behalf.
This page turns the widget on in its front matter, so you can try it at the end
of the page.
The contributor wall
The contributors shortcode shows a grid of GitHub avatars for the people
behind a project. It reads a file in your site’s data/ directory and never
contacts GitHub at build time:
data/contributors.yaml
items:- github:Vonngname:Ruohang Fengrole:Theme author- github:pgstyname:Pigstyrole:Project organization- github:gohugoiorole:Static site generatoravatar:/icons/logo.svg
Source
{{</* contributors */>}}
github is required and must be a valid GitHub username; a repeated username warns and is skipped.
name defaults to the username, and role is optional.
url defaults to https://github.com/<github>.
avatar is optional. Without it the entry shows an initial and the page makes no network request; with it, the value must be an http(s):// URL or a path from the site root.
For several lists, keep one data file per list and name it with data=;
class= adds classes for your own CSS:
Source
{{</* contributors data="maintainers" */>}}
In Markdown and RSS output, the grid becomes a list of
- [@handle](url) — role lines.
This site has no data/contributors.yaml
The example therefore does not render on this page. Add a data file to
data/ to render it.
Verify
From your site’s root, build and list the action links of a page whose source
belongs to the configured repository. Replace the example path with one of
your own pages:
hugo --printPathWarnings
PAGE=public/docs/getting-started/index.html
test -f "$PAGE"&& grep -o '<a[^>]*data-td-action[^>]*>'"$PAGE"
The link with data-td-action="edit_page" points to github.com/<your repository>/edit/<branch>/<source path>, and every segment of the source path matches the real file.
A section index (_index.md) gets a correct source path too.
The page end shows a last-modified line, except on a new page that is not committed yet.
Related
Page parameters — annotation / feedback / pager / page_context_menu and the other page switches
Configuration — full definitions of github_*, ui.lastmod_commit and ui.feedback
AI-agent support — the Markdown and assistant entries in the action menu
5.13 - Print
Print one page with the browser’s Cmd/Ctrl+P. Use the print output format to combine a section into one continuous document.
Documentation ends up on paper more often than you might expect: a runbook
taken into a server room with no network, a chapter handed out at a training,
a PDF attached to a change request. Any single page already prints cleanly
with the browser’s Cmd/Ctrl+P: the navbar, sidebar, outline and buttons
carry Bootstrap’s d-print-none class and stay off the paper, so the theme
needs no “print this page” button. For a whole section or book, turn on the
print output format. Every section then gets a print view that joins its
pages, in sidebar order, into one document with a table of contents, ready to
print or save as a PDF.
Enabling whole-section print
The theme defines the print output format but leaves it to the site, because
it adds a page per section to every build. Add it to section in your
hugo.yml:
Each key under outputs replaces the list for that page kind rather than
adding to it, so keep every format the kind already had (here HTML, RSS
and markdown); a format you leave out is no longer generated.
Each section’s print view lives under _print, which comes right after the
language prefix:
Readers reach it through Print entire section in the page action menu, or
by searching the command palette for the same action (print_section). It
prints the section the page belongs to: from /docs/customize/print/ it
prints the whole Customization section, not just this page.
The structure of a print view
A print view contains, from top to bottom:
A notice: “This is the multi-page printable view of this section. Click here to print. Return to the regular view of this page.” It appears on screen only, never on paper.
The section title and summary.
A table of contents for the whole section, numbered 1:, 2:, 2.1: by level and linked to anchors in the document.
Every page in turn, titled “number - title” (for example “1 - Configuration”), with its description as a standfirst and its body unchanged.
Pages follow the sidebar order (weight), with subsections expanded in place.
Every page after the first starts on a new sheet. The first page does so only
when the section index’s own body is longer than 50 words, so that an index of
one sentence does not waste a sheet. To change the threshold:
hugo.yml
params:print:section_break_wordcount:120
To leave out the table of contents for the whole site:
hugo.yml
params:print:toc:false
or for one section, in its index’s front matter:
content/docs/components/_index.md
---title:Componentsprint:toc:false---
Excluding pages
Some pages add nothing on paper: a page of links, a redirect note, a single
large screenshot. Set no_print to leave one out:
content/docs/about/showcase.md
---title:Showcaseno_print:true---
no_print affects only the section print view; the page itself still prints
with Cmd/Ctrl+P. Sidebar dividers (sidebar_divider) are left out
automatically, but when a divider is a section, its child pages stay in the
print sequence.
How components look in print
On paper, nothing can be clicked or expanded, so the same rule applies to the
section print view and to a single page printed from the browser: interactive
components become static, and collapsed content is printed open.
The print view keeps the outline source and loads no runtime. A browser-printed page shows the rendered map without its floating notes, or the source if it has not mounted
The print view keeps the fenced source and draws no chart. A browser-printed page shows the rendered chart, or the declared options / DSL if it has not mounted
Numbered place list with coordinates and links; no Leaflet map canvas
Cards / steps / badges / keys
Static, with content unchanged
Besides the shell, print leaves out the page action menu, the feedback widget,
heading anchor links and inline copy buttons. Before printing a page with
diagrams from the browser, wait until they have finished drawing.
Browser print styles
A set of @media print rules, shared by single pages and section print views,
lays the page out for paper:
A4 paper with 18mm 16mm 20mm margins, 10.5pt body text, and the light palette even when the reader browses in dark mode.
Text uses the --td-print-font-family typography token; see Brand and appearance.
Headings stay with the text that follows them (break-after: avoid-page), and paragraphs and list items keep at least three lines together at a page break.
Tables, images, blockquotes, callouts, cards and tabs avoid breaking across pages where they can. Code blocks may break, and long lines wrap rather than being cut off.
A closed <details> always prints open, so collapsed callouts and file tree directories show their content.
Links are dark blue and underlined, without the URL printed after them. If your readers need the addresses on paper, add them:
Put any other print styling in a @media print block in
assets/css/project.css; no template change is needed.
Copying into rich-text editors
Readers also copy articles into WeChat, Word or an email. When they copy part
of an article and paste it into a rich-text editor, they get typeset text in
the same light palette print uses, without the page background, dark-mode
colors, heading anchors, copy buttons or line numbers. Selecting the whole page
(⌘/Ctrl+A) copies only the article: title,
description and body.
Headings, lists, quotes, callouts, tables and code blocks keep their
structure, with sizes in pixels, so editors that drop stylesheets still show
them correctly.
Code blocks keep their syntax colors. Copied in dark mode, a code block stays
a dark card while the prose around it is dark text on white.
A few words selected inside one paragraph copy without formatting and take
the style of the document they are pasted into.
Pasting as plain text is unchanged.
To restyle the pasted result, override the print palette, for example
--td-print-ink or --td-print-quote-line, in assets/css/project.css. To
keep the browser’s own copy behavior, set rich_copy: false for the site, or
in a page’s front matter for that page:
hugo.yml
params:ui:rich_copy:false
Each editor filters pasted HTML in its own way, so check an important article
in the editor you publish to.
Replacing the print templates
To change the structure, for example to add a running header or a different
numbering, override the narrowest partial under layouts/_partials/print/:
print/render.html
The section view’s skeleton: notice, table of contents, the pages in order
print/page-heading.html
The title and standfirst at the top of the document
print/content.html
How one page appears inside the section view
print/toc-li.html
One row of the table of contents
The last three can also be overridden for one content type: a file such as
print/page-heading-blog.html or print/content-book.html takes precedence
over the generic partial for pages of that type.
A whole book (type: book) prints through its own path, which keeps chapter
numbers, figure numbers and cross-references continuous across the book; see
Books.
Verify
From your site’s root, build and check that a section where you enabled
print has its print view. Replace the example path with that section’s
output, including its language prefix if it has one:
hugo --printPathWarnings
PRINT_PAGE=public/_print/docs/index.html
test -f "$PRINT_PAGE"
Then open Print entire section on the running site:
The print view contains the section’s pages, without those marked no_print: true.
Cmd/Ctrl+P shows no notice, navbar or buttons in the preview.
On a page with tabs and a collapsed callout, every panel is open in the preview.
In a saved PDF, the page breaks fall where you want them; if not, adjust section_break_wordcount.
Related
Books — numbering, indexes and print for a whole book
Configuration — full definitions of outputs and params.print.*
5.14 - AI-agent support
Publish a Markdown copy of every page and an llms.txt index, so AI agents and chat assistants can read the site without scraping its HTML.
More and more of your readers arrive through a language model: a coding agent
looking up an option, or a person pasting a page into a chat to ask about it.
An HTML page is a poor source for them, because the sidebar, scripts and
styles have to be stripped away before the content appears, and what survives
is a lossy copy. OINK can publish the same content as plain Markdown instead,
so a model reads exactly what you wrote and spends its context on the content.
Three outputs do this: a .md file beside every page, an llms.txt index at
the site root that tells an agent what the site contains, and a
Copy Markdown button on each page. All three are files written at build
time, so they need no runtime service and no content negotiation. The theme
turns none of them on; you list them under outputs. Two more outputs serve an
agent that reads more than one page: a full-text bundle per top-level section
and a navigation tree per language.
A .md per page
markdown is one of Hugo’s built-in output formats. Add it to every page kind
that should have one:
This is the configuration this site uses. Each key under outputsreplaces the list for that page kind rather than adding to it, so keep
every format the kind already had, such as RSS and print; a format you
leave out is no longer published.
The Markdown file sits at the page URL plus index.md:
The file holds the source you wrote, not a conversion of the rendered
HTML. The title becomes an H1 and the description a blockquote, then the
body follows as written, with shortcodes expanded in place into their Markdown
forms:
the start of /docs/customize/print/index.md
# Print
> A single page goes to the browser's Cmd/Ctrl+P; a whole section becomes one continuous document through the print output format.
---
LLMS index: [llms.txt](/llms.txt)
---
Printing one page needs no configuration: the shell (sidebar, outline, navbar,
buttons) all carries `d-print-none`, so the browser's `Cmd/Ctrl+P` yields a
clean body.
Native Markdown components keep their source: callouts, tables, field lists,
image attribute lines, code fences and data fences reach the model exactly as
you wrote them. A section index adds a Section pages: list of links to its
children after the body, and when backlinks
are on, a page ends with a Backlinks: list. Every list and label in the file
is in the page’s language.
Each shortcode has a defined Markdown form. A badge
becomes emphasized text or a link, a key becomes
Ctrl + K, tabs become consecutive **Label**
subsections, and fields become an item list. Each
component page gives its own form in its Output section.
The LLMS index: line appears only when the site publishes llms.txt, so the
file never links to something that does not exist.
llms.txt
llms.txt is a convention for a small plain-text map
at the site root: an agent fetches one file and learns what the site contains
and where the Markdown versions are. Add the LLMS output format to the
home page to publish it:
hugo.yml
outputs:home:[HTML, markdown, LLMS]
A multilingual site gets one per language, /llms.txt and
/zh/llms.txt, each generated from the site’s structure:
/llms.txt (excerpt)
# OINK
> A local-first Hugo theme for technical documentation
## Site index
- [Home page](https://oink.pgsty.com/index.md)
- [navigation.json](https://oink.pgsty.com/navigation.json)
- [Docs](https://oink.pgsty.com/docs/index.md): Build a technical content site…
- [Blog](https://oink.pgsty.com/blog/index.md): Oink engineering notes, design stories, and reading shell guides
## Documentation index
- [Introduction](https://oink.pgsty.com/docs/about/index.md): A local-first Hugo documentation framework that evolved from Docsy…
- [Highlights](https://oink.pgsty.com/docs/about/features/index.md): Compare OINK with an ordinary Hugo theme…
- [Cases](https://oink.pgsty.com/docs/about/showcase/index.md): Find the OINK production case closest to your site…
- [Get started](https://oink.pgsty.com/docs/start/index.md): Start from the official OINK Starter…
…
## Full-text bundles
- [Docs](https://oink.pgsty.com/docs/llms-full.txt)
## Site locales
- [English](https://oink.pgsty.com/index.md)
- [简体中文](https://oink.pgsty.com/zh/index.md)
Site index lists this language’s home page, its navigation.json when
the site publishes one, and the entries of the main menu (menus.main),
linking each entry’s Markdown version when it has one and adding its
description.
Documentation index lists every page of the documentation section, each
indented under its subsection and followed by its description.
Full-text bundles appears when at least one section publishes a bundle.
Site locales lists every configured language.
Menu entries that point off the site, such as GitHub or an issue tracker, are
left out: they are navigation, not content. So to improve llms.txt, edit the
main menu and each page’s description; the template rarely needs to change.
Full-text bundle
A .md per page suits an agent that knows which page it wants. An agent that
needs the whole manual would otherwise crawl it page by page. The LLMSFULL
output gives it one file instead: an llms-full.txt per top-level section,
holding every page of that section in reading order.
You turn it on in the section index’s own front matter, not in the site
configuration:
Front matter outputs replaces the site-level list for that page, so repeat
the formats the section already had; leave out markdown or print and the
section index loses them. Front matter is per language, so a bilingual site
repeats the line in _index.zh.md to get the Chinese bundle.
Each language gets one file at the section root, /docs/llms-full.txt and
/zh/docs/llms-full.txt, in the order of the sidebar and pager: the explicit
data/docs_nav.json tree for a docs or book section that has one, and the
weighted content tree otherwise. Pages hidden from the sidebar with toc_hide
are left out of the bundle too.
A separator line with the source URL introduces each page, and the body that
follows is byte for byte that page’s own .md:
/docs/llms-full.txt (excerpt)
================
Source: https://oink.pgsty.com/docs/customize/print/index.md
================
# Print
> A single page goes to the browser's Cmd/Ctrl+P; a whole section becomes one continuous document through the print output format.
…
================
Source: https://oink.pgsty.com/docs/customize/agents/index.md
================
# AI-agent support
…
Source: points at the page’s Markdown output, or at its HTML URL when the
page publishes no .md.
Only a top-level section can publish a bundle. Listed further down the tree,
LLMSFULL produces a warning (“LLMSFULL output requires a top-level section”)
and no file. Every published bundle is listed under ## Full-text bundles in
that language’s llms.txt, so an agent finds it in the file it already reads.
The sidebar is the site’s table of contents, and an agent that can read it can
plan which pages to fetch before fetching any. The NAVJSON output publishes
that tree as navigation.json, one file per language at the language root.
Turn it on for the home page:
hugo.yml
outputs:home:[HTML, markdown, LLMS, NAVJSON]
This produces /navigation.json and /zh/navigation.json, built from the same
tree as the sidebar and pager: the explicit data/docs_nav.json tree for a
docs or book section that has one, and the weighted content tree
elsewhere:
/navigation.json (excerpt)
{"baseURL":"https://oink.pgsty.com/","language":"en","root":{"children":[{"children":[{"description":"Publish a Markdown copy of every page and an llms.txt index…","id":"/docs/customize/agents/","kind":"page","markdown":"https://oink.pgsty.com/docs/customize/agents/index.md","title":"AI-agent support","url":"https://oink.pgsty.com/docs/customize/agents/"}],"id":"/docs/","kind":"section","title":"Docs","url":"https://oink.pgsty.com/docs/"}],"id":"/","kind":"home","title":"OINK","url":"https://oink.pgsty.com/"},"schemaVersion":1}
Key
What it holds
id
The page path without its language prefix. The same page has the same id in every language
url
The absolute URL of this language’s HTML page
markdown
The absolute URL of the page’s .md, present only where the page publishes one
title
The navigation title (linkTitle, falling back to title)
description
The page’s description, where it has one
kind
home, section, or page for real pages. external or link for placeholders
children
The ordered children, where the node has any
Array order is part of the contract. The theme has already applied the
sidebar order and does not serialize weight, so a consumer that sorts the
array again ends up with an order that no longer matches the sidebar.
Placeholder rows keep the sidebar’s structure. A manual_link entry becomes
an external node with the URL as written, and a manual_link_relref entry
becomes a link node with the resolved reference. Neither is a page, so
neither has an id or a markdown URL. Sidebar dividers and pages Hugo never
renders are left out, while their children stay in place.
The format is versioned: schemaVersion is 1, and the theme repository
publishes its JSON Schema as
schema/nav.v1.schema.json.
Validate the file against it if you consume it. When a language publishes
navigation.json, its llms.txt lists the file in the site index.
The page-action menu at the right end of the breadcrumb row has four entries
for agents and chat assistants:
Entry
What it does
When it appears
Copy Markdown
Copies this page’s .md to the clipboard. It prefetches on hover, so the copy feels instant
This page has a markdown output
View markdown
Opens the .md in a new tab
This page has a markdown output
Open in ChatGPT
Opens ChatGPT with a prompt about this page
assistant_links: true
Open in Claude
Opens Claude with a prompt about this page
assistant_links: true
The first two come with the markdown output. Copy Markdown is also the
left half of the split button, shown as a clipboard icon that briefly turns
into a check mark after a successful copy.
The two assistant entries are off until you turn them on:
When a reader clicks one, the page builds a prompt from the full URL in the
address bar, including the real domain, query string and anchor. In English
the prompt reads “Read from so I can ask questions about it.”, and the
other site opens with it. Only
the URL leaves your site; the page body is never uploaded, and the assistant
fetches the content itself. Keep confidential information out of URLs, and
mention this third-party hand-off in the site’s privacy statement.
A page can narrow the site policy but not widen it. In front matter,
page_context_menu: { assistant_links: false } removes the assistant links
from that page, while true has no effect when the site has not turned them
on. page_context_menu: false removes the whole menu from a page. See
Page parameters.
Your own entries go in params.ui.page_context_menu.links. This site uses one
to add a Markdown index entry that opens llms.txt, and sets it per
language so that the label is translated:
The command palette offers the same assistant actions, from the same action
list; see Command palette.
Opting a page out of .md output
Set outputs in the page’s front matter. It replaces the whole list, so name
only the formats you want to keep:
content/legal/terms.md
---title:Terms of serviceoutputs:[HTML]---
To drop only Markdown and keep a section’s feed and print view, list the rest:
content/blog/_index.md
---title:Blogoutputs:[HTML, RSS, print]---
Customizing the output
Most problems with these files are content problems: when llms.txt reads
badly, fix the main menu and the description fields before you touch a
template. When you do need a different shape, the theme renders the .md
output with layouts/all.md, llms.txt with layouts/index.llms.txt, and the
two optional outputs with layouts/list.llmsfull.txt and
layouts/index.navjson.json. A file of the same name under your site’s
layouts/ replaces the theme’s, but a narrower override is usually less work
to maintain:
Per content type: a typed path such as layouts/blog/single.md or layouts/docs/list.md affects only that kind of content, the way the theme’s own print templates specialize (layouts/blog/single.print.html). Check Hugo’s template lookup order for your combination.
Per shortcode: a site shortcode can have an output-format-specific template that gives it a more machine-readable form in Markdown.
Per page: for a handful of important pages, writing the content by hand is cheaper than changing a template.
Replacing index.navjson.json makes you responsible for the nav.v1 format:
your output must still validate against schema/nav.v1.schema.json for
consumers that check it.
Verify
Run these from your site’s root after enabling the Markdown and LLMS outputs.
Set PAGE_MD to the generated Markdown file of a real page; the paths assume
a docs section, so adjust them and any language prefix to your site:
hugo --printPathWarnings
PAGE_MD=public/docs/getting-started/index.md
ls "$PAGE_MD" public/llms.txt
# Only if you enabled LLMSFULL on docs and NAVJSON on home:ls public/docs/llms-full.txt public/navigation.json
Against a running preview or the production site, use your own base URL and
page path. BASE_URL includes any deployment subpath and, for a translated
site, the language prefix:
BASE_URL=https://your-site.example/
PAGE_PATH=docs/getting-started/index.md
curl -fsS "${BASE_URL}${PAGE_PATH}"| head -5
curl -fsSI "${BASE_URL}llms.txt"| head -3
# Only if you enabled LLMSFULL on docs:curl -fsS "${BASE_URL}docs/llms-full.txt"| head -3
Then check four things:
The page’s HTML <head> has rel="alternate" type="text/markdown";
Clicking the copy button beside the breadcrumbs and pasting gives Markdown, not HTML;
llms.txt contains no off-site links;
If you enabled them, every page in llms-full.txt starts with a Source: line, and a page has the same id in every language’s navigation.json.
Limits
The theme produces four kinds of machine-readable file: a .md per page, llms.txt, and, when you enable them, llms-full.txt per top-level section and navigation.json per language. sitemap.xml remains Hugo’s own.
Bundles belong to top-level sections, and there is no whole-site llms-full.txt. An agent that wants everything reads the section bundles that llms.txt lists.
LLMS, LLMSFULL and NAVJSON get no <head> alternate link and no page action. Agents find them at their conventional paths and through llms.txt.
Serving Markdown from the page URL itself when a client sends Accept: text/markdown is content negotiation, which belongs to your web server or host, not the theme.
The Markdown output is built from the source, so anything drawn only in the browser, such as a chart rendered at runtime, appears in the .md as its fence source, not as a picture.
Configuration — full definitions of outputs and params.ui.page_context_menu.*
6 - Operations
Take a finished site from your machine to a live address and keep it running there.
Once the content is written, this section gets it online and keeps it there:
previewing changes on your machine, building and hosting the output, adding
comments and analytics, upgrading the theme, and finding out why a build or a
page went wrong.
Watch your changes render as you save with hugo server, then build the public/ directory you deploy.
Two commands cover daily work. hugo server rebuilds the site every time you
save and reloads the browser for you; hugo writes the finished site to
public/, the directory you deploy:
Terminal
hugo server # preview at http://localhost:1313/hugo --cleanDestinationDir --gc --minify --printPathWarnings # build public/ for deployment
Neither needs Node.js, npm or a CDN. The tools they do need, Git, Go and Hugo,
are listed in Get started.
The preview server
Run hugo server from the site root, the directory that holds hugo.yml, and
open http://localhost:1313/. Each save, and each switch of Git branch,
triggers a rebuild and a browser refresh. The first start is slower because
Hugo downloads the theme module into its cache; later starts read the cache.
The switches worth knowing
-D / --buildDrafts, defaultoff
Also builds pages with draft: true
-F / --buildFuture, defaultoff
Also builds pages whose date / publishDate is in the future
-E / --buildExpired, defaultoff
Also builds pages whose expiryDate has passed
--disableFastRender, defaultoff
Re-renders the whole site on every change instead of only the pages Hugo thinks changed
-M / --renderToMemory, defaultoff (writes to disk)
Serves from memory and writes nothing to public/
-N / --navigateToChanged, defaultoff
Sends the browser to the page you just saved
--bind, default127.0.0.1
The listen address; use 0.0.0.0 to reach the server from your LAN or from outside a container
-p / --port, default1313
The listen port
--minify, defaultoff
Minifies the preview as well, to reproduce production rendering
--printPathWarnings, defaultoff
Warns when two pages write to the same output path
A good combination while writing:
Terminal
hugo server -DFE \
--disableFastRender --renderToMemory --minify \
--printPathWarnings --logLevel info
-DFE is short for -D -F -E, so drafts, future-dated and expired pages all
appear while you work on them. --renderToMemory keeps those pages out of
public/, so a later deploy cannot pick them up by accident.
A change that did not take effect
By default Hugo re-renders only what it judges affected by a change, and edits
to layouts, configuration, data/ or an included file sometimes slip past
that judgment. When a page looks unchanged:
Restart with --disableFastRender.
Force a browser reload (Cmd/Ctrl + Shift + R) to rule out the browser cache.
The server listens on 127.0.0.1 only, so a phone or another computer cannot
reach it. Bind to every interface and give the address the other device will
use:
Terminal
hugo server --bind 0.0.0.0 --port 1313 --baseURL http://192.168.1.10:1313/
Without --baseURL, the page opens but its absolute links, the stylesheet and
the search index among them, still point at localhost.
Production build
Build what you deploy with hugo, never with hugo server:
Terminal
hugo --cleanDestinationDir --gc --minify --printPathWarnings
The output in public/ is self-contained, so you can copy it anywhere
without the source tree. Each switch earns its place:
--cleanDestinationDir
Deletes files the current build did not write, so a page you removed does not stay live
--gc
Removes processed resources in resources/_gen that nothing references any more
--minify
Minifies the HTML, CSS, JS and XML output
--printPathWarnings
Warns when two pages claim the same output path, the most common silent error on a multilingual site
A successful build ends with a Total in … line. Read any warnings before you
deploy: each one names a setting the theme ignored, and the build kept going
with a safe default.
Two settings matter as soon as the output leaves your machine. baseURL
decides every absolute link, including a subpath such as /docs/; see
Getting baseURL right. The build environment,
production for hugo and development for hugo server, decides whether
pages ask to be indexed and whether analytics load; see
Keeping preview deployments unindexed.
Previewing in a container
A container is optional. It helps when a team wants everyone on the same
toolchain, or does not want Hugo installed on every machine.
docker build -t oink-hugo .
# preview: mount the site source, and the Go module cache with itdocker run --rm -it -p 1313:1313 \
-v "$PWD:/src"\
-v "$HOME/go/pkg/mod:/root/go/pkg/mod"\
oink-hugo
# production build: override the default server commanddocker run --rm --user "$(id -u):$(id -g)"\
-v "$PWD:/src"\
oink-hugo --gc --minify
Set HUGO_VERSION to the release your team builds with (OINK is tested on
0.170+). A site still pinned to OINK 1.5.1 or older needs a different
package; see Upgrade.
Go is in the image because Hugo needs it to download a theme installed as a
Hugo Module. A site that uses a submodule, an offline archive or a plain clone
can drop Go and get a much smaller image. Nothing in the image needs Node.js,
npm or PostCSS, and the build fetches no browser assets, so for a
network-isolated environment you only have to mirror the base image and the
Hugo and Go packages.
Do not let root write public/
A container runs as root unless told otherwise, and a public/ written by
root cannot be deleted from the host without sudo. Map your user ID with
--user "$(id -u):$(id -g)", as the production build command above does.
Clearing caches
Hugo keeps intermediate output in three places. Clear the smallest one that
explains the symptom:
public/, HoldsThe previous build’s output
A deleted page is still live. hugo --cleanDestinationDir does this as part of the build
resources/_gen/, HoldsProcessed images
You changed image processing, fonts or the accent color and the page still looks old
hugo mod clean, HoldsThe Hugo Module cache
You changed the theme version and the old one still resolves. Add --all to clear the whole module cache
Terminal
rm -rf public resources/_gen
hugo mod clean # only the modules this project useshugo mod clean --all # the whole module cache; the next build downloads again
List both public/ and resources/ in .gitignore. They are regenerated on
every build, and committed copies go stale and bloat the repository.
Previewing against a theme checkout
When you change the theme and the site together, point the preview at your
local theme checkout for one command with HUGO_MODULE_REPLACEMENTS. go.mod
stays untouched, so the substitution cannot be committed by accident:
Terminal
HUGO_MODULE_REPLACEMENTS='github.com/pgsty/oink -> /absolute/path/to/oink' hugo server
From scratch shows the
directory layout and the Go workspace alternative.
A replacement hides the version you pinned
While the variable is set or a Go workspace is active, every build uses the
local checkout, whatever go.mod says, and a CI job can inherit either. To
build the published release, unset HUGO_MODULE_REPLACEMENTS, set
GOWORK=off and HUGO_MODULE_WORKSPACE=off, look for permanent replace
directives in go.mod and the Hugo configuration and for a _vendor/ copy,
then confirm the exact version with hugo mod graph in that same
environment. Never commit a workspace file that names a path on your
machine.
Verifying an offline build
If the site must work in a network-isolated environment, test both the build
and the browser with the network cut off:
Start from a verified theme archive and an empty module cache (hugo mod clean --all).
Block outbound HTTP, HTTPS and the Go module proxy.
Run the production build hugo --gc --minify --printPathWarnings.
Browse pages in every language: a documentation page, a blog page, the home page, the 404.
Use search, the light/dark toggle, diagrams and the content components the site relies on.
Check every subresource origin and confirm that no unexpected remote host appears.
For the last step, run the output checker from a theme checkout of the same
release your site pins. It needs only Python 3. Replace both paths and use the
base URL you built with:
The script reads every href, src, srcset, poster and form action in
the HTML, print, Markdown and RSS output. Each must be a site-relative path or
use http, https, mailto or tel, and inline on* handlers and
javascript: URLs are rejected. An <iframe>, <script>, <link>, <img>,
<video>, <audio>, <embed>, <object> or <source> that points to
another host is an error. If the site embeds third-party content on purpose,
pass --third-party; if its languages live on several domains, list the extra
first-party hosts with --allow-host.
A pass covers that build only. Run the check again after every theme upgrade.
Verify
Start from empty caches so nothing stale hides a problem:
Terminal
rm -rf public resources/_gen
hugo --gc --minify --printPathWarnings
The build passes when it ends with Total in … and reports no ERROR. Then
check:
The log shows no npm, PostCSS, Autoprefixer or asset-download step. One that appears comes from leftover Docsy configuration.
public/ contains sitemap.xml and robots.txt, and robots.txt reads Allow: /.
With local search enabled, public/ holds an index per language, named offline-search-index.<language>.<hash>.json in production (development builds omit the hash). Open search and confirm that the URL in the page’s data-td-index-src attribute returns 200.
In hugo server, a documentation page, a blog page, the home page and the 404 render correctly in every language and in both color schemes.
After deployment, repeat the checks on the live site with the
deployment checklist. For a build that fails
or looks wrong, see Troubleshooting.
Related
Deploy — getting public/ to GitHub Pages, Cloudflare or elsewhere
Troubleshooting — build, language, search and platform faults
Publish public/ to GitHub Pages, Cloudflare Pages or any static host, with the right baseURL, CI settings, security policy, checks and rollback.
An OINK site builds to a directory of static files, so any host that serves
files can serve it, with no Node runtime, server-side rendering or build
plugin. Deploying comes down to three things: run the
production build, publish public/,
and set baseURL to the address readers will use. A site created from the
OINK Starter already has GitHub Pages and Cloudflare Pages workflows that do
all three.
Getting baseURL right
A wrong baseURL is the most common deployment fault, and a quiet one: pages
open, but the search index returns 404, page-action links point elsewhere and
some assets fail to load.
At the root of a domain:
hugo.yml
baseURL:https://docs.example.com
Under a subpath such as https://example.com/docs/, include the path:
hugo.yml
baseURL:https://example.com/docs/
You can also override it at build time, which lets one source tree deploy to
several addresses:
Terminal
hugo --gc --minify --baseURL "https://example.com/docs/"
Do not fix a subpath with canonifyURLs
Leave canonifyURLs at Hugo’s default, false. OINK’s templates and
content links resolve against baseURL, so a wrong path means a wrong
baseURL. Turning on canonifyURLs also rewrites relative links that were
already correct, which makes the fault harder to find.
With local search enabled, open search on the deployed site and watch the
index request in the browser’s Network panel: it must carry the right language
and subpath and return 200. Take the URL from the page’s data-td-index-src
attribute instead of guessing it, because production filenames include a
content hash (offline-search-index.<language>.<hash>.json).
Choosing a host
GitHub Pages
If the source lives on GitHub, one Actions workflow builds the site and
publishes it through the Pages deployment API, with no gh-pages branch to
maintain. The OINK Starter ships this file; copy it only when you assemble a
site yourself.
.github/workflows/github-pages.yaml
1name:Deploy to GitHub Pages 2 3on: 4push: 5branches:[main] 6workflow_dispatch: 7 8permissions: 9contents:read10pages:write11id-token:write1213concurrency:14group:github-pages15cancel-in-progress:false1617env:18# a workspace from a sibling checkout must never take part in a CI build19GOWORK:off20HUGO_MODULE_WORKSPACE:off21HUGO_CACHEDIR:${{ github.workspace }}/.hugo_cache2223jobs:24build:25name:Build Pages artifact26runs-on:ubuntu-latest27steps:28- name:Check out source29uses:actions/checkout@v730with:31fetch-depth:03233- name:Set up Go34uses:actions/setup-go@v735with:36go-version:stable37cache-dependency-path:go.sum3839- name:Configure GitHub Pages40id:pages41uses:actions/configure-pages@v64243- name:Install Hugo44uses:peaceiris/actions-hugo@v345with:46hugo-version:latest4748- name:Record build tool versions49run:|50 go version
51 hugo version5253- name:Download OINK54run:go mod download github.com/pgsty/oink5556- name:Build57run:|58 hugo --cleanDestinationDir --gc --minify --environment production \
59 --printPathWarnings \
60 --baseURL "${{ steps.pages.outputs.base_url }}/"6162- name:Upload Pages artifact63uses:actions/upload-pages-artifact@v564with:65path:public6667deploy:68name:Deploy69environment:70name:github-pages71url:${{ steps.deployment.outputs.page_url }}72runs-on:ubuntu-latest73needs:build74steps:75- name:Publish76id:deployment77uses:actions/deploy-pages@v5
Build settings for CI explains each setting; keep them when you edit
the file. One is specific to GitHub Pages: --baseURL takes the address that
configure-pages computes, https://<OWNER>.github.io/<REPO>/ for a project
site, so you never hard-code it.
In the repository, set Settings → Pages → Build and deployment → Source to
GitHub Actions, push to main, and watch the first run on the Actions tab.
For a custom domain, enter it under Custom domain on the same settings page,
configure DNS as prompted, and set baseURL in hugo.yaml to the new domain.
If your publishing process needs a CNAME file, put it at static/CNAME;
Hugo copies it unchanged into public/.
Cloudflare Pages
The OINK Starter ships .github/workflows/cloudflare-pages.yaml, a Direct
Upload workflow: the production build runs in GitHub Actions with the same
build settings as the GitHub Pages workflow, and Wrangler uploads the
resulting public/ to a Cloudflare Pages project. It is the recommended path
for Starter sites.
Create a Direct Upload Pages project. Its name defaults to the
repository name; to use another, set the repository variable
CLOUDFLARE_PROJECT_NAME.
Add the repository secrets CLOUDFLARE_ACCOUNT_ID and
CLOUDFLARE_API_TOKEN. The token needs Account → Cloudflare Pages → Edit.
Run Deploy to Cloudflare Pages once by hand. To deploy every push to
main, set the repository variable CLOUDFLARE_PAGES_ENABLED=true.
The canonical URL defaults to https://<project>.pages.dev/. When a custom
domain becomes production, set CLOUDFLARE_SITE_URL to it.
Cloudflare’s Git integration also works, with Cloudflare running the build:
set the build command to hugo --gc --minify --printPathWarnings, the output
directory to public, and HUGO_VERSION to a current release such as
0.170.1 (OINK is tested on 0.170+, while Cloudflare’s default image ships
an older Hugo). Choose one mode per project, Git integration or the
Direct Upload workflow, and build preview deployments with their own URL and a
non-production environment.
On a custom domain, Cloudflare can mistake module@version in an install command for an email address. This documentation site adds no-transform to the HTML response’s Cache-Control header in static/_headers. After deploying, open an install example on the production domain with JavaScript disabled and copy the command. Cloudflare email obfuscation
Others
Netlify — set the build command to hugo --gc --minify, the publish
directory to public, and the HUGO_VERSION environment variable. The same
settings can live in the repository:
netlify.toml
[build]command="hugo --gc --minify --printPathWarnings"publish="public"[build.environment]# override the platform's default with a current Hugo release (tested on 0.170+)HUGO_VERSION="0.170.1"
A theme installed as a submodule needs recursive submodule checkout enabled;
one installed as a Hugo Module needs Git and Go in the build image. Build
previews with the same Hugo release as production, unless the preview exists
to test an upgrade.
Vercel — set the build command to hugo --gc --minify, the output
directory to public, and the HUGO_VERSION environment variable. There is
no npm install step.
Any static server (Nginx, Caddy) — serve an unchanged copy of public/.
The example serves /var/www/oink/current, a symlink to a release directory
that the offline packaging steps below create:
After a build, hugo deploy compares the bucket with public/, uploads only
what changed, and invalidates the CDN cache when cloudFrontDistributionID is
set. Without --target it uses the first target; run it with --dryRun first
to see what it would change. The Hugo binary must be built withdeploy (check
hugo version), and the cloud credentials come from the provider’s standard
environment variables or configuration file; on AWS, confirm access with
aws s3 ls first.
Offline packaging — for a network-isolated server, build on a connected
machine with the target’s baseURL and carry the output over as one archive.
Give every archive a new release name:
Terminal
hugo --cleanDestinationDir --gc --minify --baseURL "https://docs.internal.example.com/"&& tar -czf oink-site-20260929-01.tar.gz -C public .
On the Linux host you need write access to /var/www/oink and GNU mv;
current must be absent or a symlink, and current.next must not exist.
Unpack each release into a new directory and switch current to it:
The chain switches current only after the directory was created, the
archive extracted and index.html found, and the final mv replaces the link
in one step, so readers never see a half-written site. Never unpack over an
existing release directory, and keep the previous one: it is your
rollback. A different baseURL means a new build, not an edit
of the output.
A host without Go — a theme installed as a Hugo Module needs Go in the
build environment. Where the platform has none, install the theme as a Git
submodule (run git submodule update --init before the build) or commit an
offline archive under themes/oink/; see
From scratch and other install methods.
Build settings for CI
These settings belong in any CI build of an OINK site, whichever host
receives the output. The Starter’s workflows already contain them.
fetch-depth: 0 on checkout — with enableGitInfo, last-modified dates and contributor lists come from Git history, and a shallow clone gives every page the same date.
Go, then go mod download github.com/pgsty/oink — Hugo needs Go to fetch a theme installed as a Hugo Module. A submodule install checks out with submodules: recursive instead, and an offline archive is committed under themes/oink/; either way, drop both Go steps.
GOWORK: off and HUGO_MODULE_WORKSPACE: off — keep a developer’s Go workspace out of the build, so CI builds the release pinned in go.mod and nothing else.
Hugo latest — OINK uses plain CSS and is tested on Hugo 0.170+, so CI can follow current releases. A site still pinned to OINK 1.5.1 or older cannot; see Upgrade.
--environment production and the real --baseURL — the environment decides indexing and analytics (see below), and baseURL every absolute link.
--printPathWarnings, and no --panicOnWarning — OINK’s warnings are deliberate: a mistyped key or an incomplete integration warns and falls back to a safe default so the site still builds. Turning warnings into errors with --panicOnWarning or HUGO_PANICONWARNING would fail builds that are fine. Read the warnings in the build log instead.
Keeping preview deployments unindexed
Hugo’s -e / --environment changes how OINK builds, not what the site
contains. Only a production build:
writes Allow: / and a Sitemap: line to robots.txt (other environments write Disallow: /);
renders the Google Analytics snippet;
fingerprints the theme’s scripts and stylesheets and adds SRI integrity attributes.
hugo defaults to production, even on a preview host, so build pull-request
previews and staging sites with another environment:
Terminal
hugo --gc --minify --environment staging --baseURL "$PREVIEW_URL"
The output then asks search engines to stay away and sends nothing to an
analytics service.
Content Security Policy
The theme’s scripts, fonts and icons are all served from your own origin, but
script-src 'self'; style-src 'self' alone still blocks parts of an ordinary
OINK page. The theme writes small inline scripts that set the color mode and
the page shell’s state before the first paint, inline styles for the
initial canvas, theme colors and font roles, and style attributes on some
components; Markmap adds inline configuration and styles. OINK ships no
ready-made policy, CSP hashes or nonce injection, so derive the policy from
your own built output.
Features you enable add their own requirements:
Inline HTML and scripts that authors write under renderer.unsafe: true are the site’s to review.
ECharts $fn: callbacks and custom themes: the site registers its functions on window.OinkEchartsFunctions and its themes on window.OinkEchartsThemes, so the registering script’s origin belongs in script-src.
Analytics scripts: the script you insert, and the host it reports to.
Local PlantUML rendering: same-origin scripts, wasm-unsafe-eval in script-src to compile WebAssembly, and blob: in img-src. No rendering-service origin is needed.
Interactive maps (params.map): your tile and dark_tiles hosts in img-src.
Video platform players (params.video_embeds): the enabled player origins (https://www.youtube-nocookie.com, https://player.bilibili.com, https://player.vimeo.com) in frame-src, plus any remote media, poster, subtitle track or social-avatar hosts in media-src, img-src and connect-src.
Duo view and ReDoc API references render in same-origin frames, so frame-src (or child-src) must allow 'self', and responses must allow same-origin framing (no X-Frame-Options: DENY or frame-ancestors 'none'). Duo view also adds an inline bootstrap script to every HTML page, which changes the script hashes.
Hash each inline script and style block you allow from the final deployed
bytes, or have the host inject a fresh nonce into both the policy header and
the matching tags on every response. A <style> nonce does not cover
style="…" attributes, which need style-src-attr of their own. Hashes
change with content, configuration, minification and theme upgrades, so
recompute them after each.
Start from a minimal policy that covers only the features you have reviewed,
and add permissions one at a time: keep ECharts options as pure data when no
callback is needed, review author-written inline scripts, and add a remote
origin only for an integration the site explicitly enabled. The output
checker in Verifying an offline build lists
every subresource origin, which is a good starting inventory. Ship the policy
as Content-Security-Policy-Report-Only first, and enforce it only after
light/dark startup, shell state, menus and every enabled component work in
the browser.
Acceptance checklist
Go through this table after each deployment. The first four rows can be
checked in the build output; the rest need the real URL.
The build succeeded and you read its warnings
The log of a build with --printPathWarnings ends with Total in …
baseURL is correct
<link rel="canonical"> in the page source points at the real production address, subpath included
Sitemap
<baseURL>/sitemap.xml resolves; on a multilingual site it is an index pointing at /en/sitemap.xml, /zh/sitemap.xml and so on
robots
<baseURL>/robots.txt reads Allow: / with a Sitemap: line; a preview deployment reads Disallow: /
Search index
With local search enabled, the URL in data-td-index-src returns 200, its filename carries a hash, and site search returns results
Markdown output
Where the site enables markdown under outputs.page, appending index.md to a page URL returns plain text
llms.txt
Where the site enables LLMS under outputs.home, the root of every enabled language serves llms.txt
Every language
Documentation, blog and home pages open in each, and the language switcher lands on the matching page rather than the home page
Appearance and interaction
The light/dark toggle, the print view and common components (callouts, tabs, code-block copy) work
404
A path that does not exist shows the site’s own 404 page
The switches for sitemap.xml, robots.txt, .md and llms.txt are in
Configuration, and the agent-facing outputs are
described in AI-agent support.
Rollback
Roll back a static site by publishing the last known-good build again. Never
patch files on the production host, because the next deploy silently undoes
the patch and nothing records what changed.
GitHub Pages: find the last successful Deploy to GitHub Pages run under Actions and choose Re-run all jobs, or git revert the faulty commit and push.
Cloudflare Pages, Netlify, Vercel: pick the last good deployment in the platform’s list and promote it with Rollback or Publish deploy.
Your own static server: point current back at the previous release directory kept by offline packaging. Do not extract the old archive over the new files; paths that only the newer release added would stay live.
On the Linux host, with the same symlink and GNU mv prerequisites as above,
replace the example with the release you kept:
Configuration — baseURL, outputs and the other site keys
6.3 - Comments
Add a comment thread to each page with giscus and GitHub Discussions, choose which pages carry one, and match it to the site’s colors.
Comments give every page its own discussion thread at the end, with no
comment server to run. OINK uses giscus, which stores
each page’s thread as a GitHub Discussion in a repository you choose: readers
sign in with GitHub to post, and you moderate in GitHub Discussions like any
other discussion. The theme has no comment backend of its own and bundles no
other provider.
The repository must be public, because visitors cannot read the Discussions
of a private one.
Comments load a third-party service
A page with comments loads a script and an iframe from https://giscus.app,
so they cannot work in a network-isolated environment. Comments stay off
until you configure them; once on, mention giscus and GitHub in the site’s
privacy policy if it has one.
Enabling it site-wide
The whole configuration lives under params.comments. Replace the four
placeholders with the values giscus.app generates for your repository, as the
next two sections describe:
repo, repoId, category and categoryId are required and must all
describe the same repository and Discussion category. If any of them is
missing or blank, the build prints one warning and renders no comments, so
read the build log before you publish. type accepts only giscus; any other
value also warns and renders nothing. The key names match Hextra’s
params.comments, so a configuration moved from Hextra works unchanged.
Every other key has a default, listed in
Configuration: mapping
(pathname), inputPosition (top), theme (auto), loading (lazy),
strict, reactionsEnabled, emitMetadata, term, lang, lightTheme,
darkTheme, ariaLabel and errorMessage. The giscus switches accept a YAML
boolean or giscus’s own 0 / 1.
Preparing the GitHub repository
Choose a public repository to hold the threads. The site’s own source repository works.
Under the repository’s Settings → General → Features, turn on Discussions.
Install the giscus GitHub App on that repository. Without it, visitors can neither comment nor react.
Pick a Discussion category. giscus recommends one of the Announcements type, where only maintainers and the giscus bot can open a Discussion, so readers cannot start stray threads.
The repository ID and category ID are public identifiers, not credentials.
Never put a personal access token, an OAuth secret or a password in the Hugo
configuration: it is published with the site’s source.
Generating the configuration
Open giscus.app, enter the repository, the mapping and
the category, and the page generates a <script> block. Copy four of its
attributes into the OINK configuration:
data-repo
repo
data-repo-id
repoId
data-category
category
data-category-id
categoryId
mapping decides which Discussion belongs to which page. OINK’s default,
pathname, suits a site whose published paths are stable, and lets one
repository serve several domains or preview environments.
Settle the mapping before launch. If you change it, or move a page, after
comments exist, giscus looks for a different Discussion: the old comments are
not deleted, but the page no longer finds them. When a URL has to change,
keep a redirect or rename the Discussion at the same time.
Per-page control
A page’s comments front matter overrides the site switch in either
direction, and the value nearest the page wins.
To allow comments on a few pages only, set enable: false site-wide but keep
the rest of the configuration, then turn comments on per page:
content/blog/2026-roadmap.md
---title:2026roadmapcomments:true---
To keep comments everywhere except a few pages, leave the site switch on and
turn them off where discussion does not belong:
content/about/security.md
---title:Security policycomments:false---
For a whole section, use a cascade. This site sets comments: true in the
cascade of content/docs/_index.md, which is why a giscus thread appears at
the end of this page:
If the site also sets services.disqus.shortname, a working giscus
configuration takes precedence and Disqus does not load, and comments: false
on a page turns off both. When a required giscus key is missing, giscus is
skipped with a warning and Disqus loads instead.
Multilingual text
The giscus interface follows the page’s language. Simplified, Traditional and
Hong Kong Traditional Chinese each map to their own giscus locale, and
languages giscus does not support fall back to English. Set lang only when
the automatic choice is wrong.
OINK adds two strings of its own, the comment section’s accessible label and
the message shown when loading fails, and translates both in every interface
language it ships. To change their wording, set ariaLabel and
errorMessage per language; a language layer needs only the values that
differ, and the repository keys stay in params.comments:
hugo.yml
languages:en:params:comments:giscus:ariaLabel:DiscussionerrorMessage:The discussion could not be loaded. Please try again later.zh:params:comments:giscus:ariaLabel:讨论errorMessage:讨论区加载失败,请稍后重试。
Following light and dark
With theme: auto, the comment frame follows the reader’s light/dark choice
and visual preset, using stylesheets the theme ships to match each preset the
site offers.
To use other colors, set lightTheme and darkTheme, each to a giscus
built-in theme name or to the URL of a stylesheet on your site, such as
/css/giscus-brand-dark.css served from static/. They then apply under
every preset. A fixed theme name in theme stops the frame from following
the toggle at all.
Site-hosted giscus stylesheets must be readable cross-origin
The giscus frame runs on giscus.app and reads its stylesheet from your
site, the theme’s own or yours, so the response must allow cross-origin
reads. Configure Access-Control-Allow-Origin on the production host. For
hugo server, this site adds Access-Control-Allow-Origin: '*' under
server.headers in hugo.yml.
Privacy and CSP
OINK never asks for or stores a reader’s GitHub password or token; signing in and posting happen entirely on giscus and GitHub.
The comment loader is a same-origin script that the theme adds only to pages with comments enabled.
The giscus script is requested when the reader comes within a scroll of the comment section, or is already past it; with loading: lazy the iframe waits the same way. A visit returning from GitHub sign-in, and a site that sets loading: eager, request it at once.
Under a strict Content Security Policy, allow giscus in both script-src and frame-src. Merge these into your existing policy rather than replacing it; the general rules are in Content Security Policy.
If the script fails to load or never creates its iframe, OINK ends the
loading state and shows errorMessage in a live status region, so the page
never hangs on “loading”.
Verify
Terminal
hugo --minify # a missing required key prints a warning and disables commentshugo server --disableFastRender
Open a page that should have comments. giscus appears at the end with “Sign in with GitHub”, in the page’s language.
Switch between light and dark. With theme: auto, the comment section follows.
Open a page with comments: false and confirm that no comment section appears there.
Post a test comment, then check on GitHub that a Discussion appeared in the chosen category and that you can manage it.
Until the first comment or reaction creates a page’s Discussion, a “discussion
not found” message in the browser console is expected.
When comments do not appear, check in this order: build warnings about the
four required keys; params.comments.enable and type; the page’s comments
front matter; whether the repository is public, has Discussions on and has
the giscus App installed; and the browser console and response headers for a
CSP block on giscus.app. When existing threads go missing, restore the
original mapping and page path first.
Connect Google Analytics or another service if you want visit counts, and check the canonical, hreflang, social-card, sitemap and robots output search engines read.
An OINK site reports nothing to anyone until you connect an analytics
service: Google Analytics through one Hugo setting, anything else through a
one-file hook. The theme loads no analytics, form or advertising script of
its own, so the decision, and the line in your privacy statement, are yours.
Search-engine metadata, by contrast, needs no setup. Every page gets a
canonical link, hreflang links to its translations, a robots meta tag and
Open Graph and Twitter cards; your part is a correct baseURL and a
description on each page.
Connecting Google Analytics
Put your GA4 measurement ID in Hugo’s service configuration:
hugo.yml
services:googleAnalytics:id:G-YOUR_MEASUREMENT_ID
The snippet loads only in production builds, so hugo server reports
nothing. hugo builds for production by default, even on a preview host, so
build pull-request and staging deployments with another environment, as
Keeping preview deployments unindexed
shows. Without an ID nothing loads, and a Universal Analytics UA- ID is no
longer accepted: it produces a build warning instead of a snippet.
Use only this key; the top-level googleAnalytics key is deprecated. If you
do not want analytics, delete the block rather than leaving a placeholder,
because a placeholder ID still loads Google’s script.
Google Analytics leaves your network
Once configured, page views and events go to Google, which rules it out for
a network-isolated site, and a strict Content Security Policy has to allow
it; see Content Security Policy.
Connecting another analytics service
Plausible, Umami, Matomo and similar services need only their script on the
page. The theme renders two hook partials for exactly this, so you add a file
to your site and leave the theme untouched:
layouts/_partials/hooks/head-end.html, InsertedBefore </head>, ahead of the Google Analytics snippet
Analytics scripts, cookie-consent scripts, meta tags the theme does not write
layouts/_partials/hooks/body-end.html, InsertedAfter all the page’s other scripts
Third-party code that affects interaction rather than the first paint
For Plausible, use the domain registered in your own account:
Keep the hugo.IsProduction guard. Without it, every local preview by every
author reports visits to your analytics account.
head-end runs before Google Analytics
A cookie-consent script placed in head-end.html therefore runs first and
can stop analytics from starting.
The “was this page helpful?” widget is separate and off by default. It makes
no request of its own and records answers through your Google Analytics
integration when one exists; see
Repository links and page info.
Duo view panes
If you enable Duo view
(params.ui.compare), opening it loads both pages in same-origin frames. The
Google Analytics integration (services.googleAnalytics.id) skips those
panes, so opening the reader does not count two extra page views. To do that,
OINK renders the snippet from its own pane-aware template instead of Hugo’s
built-in one, so an override at layouts/_partials/google_analytics.html has
no effect while Duo view is on.
Scripts in head-end.html still run in every pane. Check
window.OinkComparePane before recording a page view:
Server and CDN logs see the pane requests too; they carry the query
oink_compare_pane=1, which you can filter on.
Page descriptions
<meta name="description"> takes the first non-empty value of:
The page’s description front matter
The page summary Hugo computes (.Summary)
params.description in the site configuration
So one description per page is the only SEO work an author has to do, and
it pays three times: as the snippet under the search-engine result, as the
card subtitle on its section’s index, and as the preview in site search.
content/docs/install.md
---title:Install PostgreSQLdescription:Install PostgreSQL 18 from the official packages on Debian, Ubuntu or RHEL and start the first cluster.---
On a multilingual site, write the description in each language instead of
copying the English one, and set the site-wide fallback per language too:
hugo.yml
languages:en:params:description:A Hugo theme for engineering docszh:params:description:为工程而设计的 Hugo 文档主题
canonical and hreflang
Every page gets one canonical link, plus an hreflang alternate for each
translation that actually exists. Nothing needs configuring:
The hreflang codes come from each language’s locale (en-US and zh-CN
on this site), and the links follow Hugo’s translation pairing. A page
without a translation gets no hreflang or og:locale:alternate for the
missing language, even though the language switcher still offers that
language’s home page.
Each page of a paginated blog index has its own canonical URL. From page 2
on, it carries no hreflang alternates, because the languages can have
different numbers of posts and their page boundaries do not line up.
Canonical links are built from baseURL. A wrong baseURL sends search
engines to addresses that do not exist, which is harder to notice than a
failed build, so go through the
deployment checklist before launch. Language
configuration itself is covered in Languages.
Social cards
The theme calls Hugo’s built-in Open Graph and Twitter card templates, which
fill in the title, description, URL, language and site name:
rendered output (this page)
<metaproperty="og:title"content="Analytics and SEO"><metaproperty="og:type"content="article"><metaproperty="og:url"content="https://oink.pgsty.com/docs/admin/analytics/"><metaproperty="og:locale"content="en_US"><metaproperty="og:locale:alternate"content="zh_CN"><metaname="twitter:card"content="summary">
To show an image when the link is shared, set images in the page’s front
matter:
For a site-wide fallback image, set the same key under params:
hugo.yml
params:images:[/images/social-card.webp]
With an image, twitter:card becomes summary_large_image and the output
gains og:image and twitter:image. This site sets neither key, which is why
the output above has no image tags.
Sitemap
Hugo writes the sitemap itself; on a multilingual site it writes an index
that points at one sitemap per language:
the structure under public/
sitemap.xml ← the index, pointing at the two below
en/sitemap.xml
zh/sitemap.xml
The site default and the per-page override are both Hugo’s own keys:
Search engines treat changefreq and priority as hints and may ignore
them. What matters more is checking before launch that drafts, private
content and non-canonical copies stay out of the sitemap, and that every
language has its own.
robots.txt and staying unindexed
Hugo writes robots.txt only when the site asks for it:
hugo.yml
enableRobotsTXT:true
The theme supplies the content, which depends on the
build environment:
The page’s robots meta tag follows the same rule: index, follow in a
production build, noindex, nofollow otherwise and always in print output.
The theme has no per-page noindex switch. To keep a page out of search
engines reliably, do not publish it: use draft: true or Hugo’s build
options. If the page must be published yet unindexed, write your own tag in
the head-end.html hook; the page then carries two robots tags, and each
search engine decides how to combine them.
Checking indexing
A week or two after launch, confirm that search engines see the site you
think you published:
Crawl permission: <baseURL>/robots.txt reads Allow: /, not Disallow: /.
Page inventory: <baseURL>/sitemap.xml opens; follow it to a language sitemap and check the page count.
Indexed pages: a site:yourdomain search returns about the right number. The order of magnitude is enough.
Canonical addresses: results open the canonical URL, not a version with ? parameters or an old domain.
Submission: add the site to Google Search Console and Bing Webmaster Tools and submit the sitemap.xml address, which gets it crawled sooner than waiting.
Verify
Run this from the site root, with PAGE set to a page your site generates
(including any language prefix):
Terminal
hugo --gc --minify --printPathWarnings
PAGE=public/docs/getting-started/index.html
test -f "$PAGE"# Canonical should use the real production address; production robots allow indexing.grep -o '<link[^>]*canonical[^>]*>'"$PAGE"grep -o '<meta[^>]*robots[^>]*>'"$PAGE"cat public/robots.txt
head -5 public/sitemap.xml
# No match is expected when Google Analytics is not configured.grep -o '<script[^>]*googletagmanager[^>]*>'"$PAGE"
In the browser’s Network panel, confirm that analytics requests carry your
measurement ID or registered domain. A deployment built with
--environment staging must make no analytics request, and a site with no
analytics configured makes none in either environment, though other
integrations you enabled still contact their own services.
Related
Deploy — baseURL, the checklist and unindexed preview deployments
Languages — language configuration decides hreflang and translation pairing
AI-agent support — the .md output and llms.txt written for models
Configuration — services, sitemap, enableRobotsTXT and the rest
6.5 - Upgrade
Move a site to a newer OINK release, or migrate it from OINK 0.4 or Docsy, with a rollback path at every step.
Upgrading OINK means changing the release your site pins and checking what
the new release renders differently. Most content needs no edits. Where a
release retired a syntax or an interface, its section below says whom that
affects and what to change, and a migration tool rewrites old shortcodes in
bulk, dry run first. Do the work on a branch, so that abandoning an upgrade
costs nothing but the branch.
Upgrade Hugo and OINK together
OINK 1.6.0 and newer use plain CSS and are tested on Hugo 0.170+, so the
build compiles nothing. OINK 1.5.1 and older need Hugo’s Extended edition,
which ended with Hugo 0.169, so a site on an older release cannot follow
Hugo past 0.169 until it upgrades; see
Staying on 1.5.1 or older.
Read the release notes first
Each release’s notes list its changes, breaking changes and upgrade steps.
Before you change the pin, read the notes of every release between yours and
the target:
They tell you which content needs editing, which configuration keys are gone
and which defaults changed, so a page that looks different after the upgrade
comes with an explanation.
Upgrading the Hugo Module
Pin a published release tag, or an immutable commit you chose deliberately,
never a branch or @latest, so that building the same site commit always
produces the same site. Check that the tag is published and resolves before
you pin it:
Terminal
hugo mod get github.com/pgsty/oink@v1.8.0 # the published release taghugo mod tidy
hugo mod graph | grep github.com/pgsty/oink
The module graph must show exactly that version; a commit you chose appears in
go.mod as a Go pseudo-version. Commit go.mod and go.sum. For the tag
above, go.mod reads:
If you also preview against a local theme checkout, that replacement
overrides the pin; see
Previewing against a theme checkout
before you trust a build.
For a Git submodule, confirm that it has no local edits, fetch the tags and
check out the exact release rather than following a remote branch:
Commit the new submodule pointer once the site passes. For an offline archive
or a clone, replace themes/oink/ with the complete tree of the new release
and confirm that theme: still matches the directory name. The trade-offs
between install methods are in
From scratch and other install methods.
What to do after upgrading
Terminal
rm -rf public resources/_gen
env -u HUGO_MODULE_REPLACEMENTS GOWORK=off HUGO_MODULE_WORKSPACE=off \
hugo --gc --minify --printPathWarnings --logLevel info
This clears caches that may still hold output of the old release, builds with
the pinned release only, with no local replacement or workspace, and prints
informational messages along with the warnings. Hugo’s deprecation notices
among them say what a future Hugo will remove; resolve them before you
upgrade Hugo itself, since how urgent each one is depends on the feature.
Once the build passes, look at the result: the home page, a documentation
page, a blog page and the 404, in every language and both color schemes, the
print view, and everything the site customizes.
Verify
A passing build does not finish an upgrade. Check each surface the site uses:
Documentation / Book
Sidebar order, paging, headings, page actions, numbering and cross-references
Blog
Chronological paging, RSS ownership, navbar and footer
Home / landing
Content with JavaScript off, the compact menu, print
Release pages
Derived download URLs, checksums, publication state
Components
One page for each component the site uses most
Accessibility
Keyboard-only use, focus order, both color schemes, forced-colors mode
Deployment
Every internal link and asset keeps the base path prefix
Then run the checks a site can run:
the production build, the output trust check and, for a book, the anchor
check. Deploy a preview and open its pages in a browser at the real URL,
watching the network requests. Merge the upgrade only after that review, and
smoke-test production once it is live.
Rollback
To roll the theme back, restore the previous pin:
Terminal
hugo mod get github.com/pgsty/oink@v1.6.0 # example: the site's last known-good taghugo mod tidy
rm -rf public resources/_gen
hugo --gc --minify
Keep the pre-upgrade module pin, site commit and known-good deployment artifact, and restore all three together.
Never roll back part of it. Old layout copies over a new theme make a mixture that is harder to diagnose than either complete release.
Keep the upgrade branch and what you learned verifying it. A rollback restores production first; it does not throw the upgrade work away.
Republishing the previous deployment itself is covered in
Deploy.
Six visual presets and distinct dark modes. Paper returns to its classic
warm-paper and link-blue look (#f7f6f3, #21201c, #2b5f8c, IBM Plex Sans
over Hei). github and news join the preset list, ink is redesigned as a
written page (Palatino, Kai, Fangsong/Song and vermilion; silver and gold on
indigo-violet in dark mode), and Dark Terminal is calibrated as a restrained
phosphor screen. To offer all six styles, set
params.ui.preset_menu: [paper, slate, github, ink, news, terminal]. See
Brand and appearance.
Appearance trigger and menu layout. Three, five or six presets arrange in
three columns above the three Color cards, with Style (T) and Color (Y)
legends when keyboard navigation is on. When the menu offers Color, the navbar
trigger shows the reader’s choice. Light uses a sun, Dark a moon, and System a
half-filled circle even when the system switches between light and dark.
Unified audio and video controls. Local audio and video files replace
native browser controls with the theme’s .td-media__controls row, featuring
a single three-color progress bar, playback speed toggle, volume slider, and
captions and fullscreen controls for video. Sites with custom CSS targeting
the former .td-media__progress element should update to
.td-media__controls and .td-media__seek.
Quoted posts as > [!SOCIAL] callouts. Quoted social posts use the
> [!SOCIAL] Markdown callout form with a trailing block attribute line
({avatar="…" date="…" url="…" platform="…"}), keeping the quote readable as
an ordinary blockquote in plain Markdown; see
Social. If a site has legacy social shortcode
calls, convert them with
python3 bin/migrations/oink06.py migrate --site <dir> --only social --write
from the theme repository, then run
python3 bin/migrations/oink06.py check --site <dir> to list any call it
left unchanged.
Upgrade to 1.7.0
Sites already on 1.6.0 need no template or stylesheet migration. Review the
1.7.0 release notes and check these behavior and appearance
updates before pinning v1.7.0:
Paper accent and preset typography. Paper moves to an ivory canvas (#faf9f5) and a clay UI accent (#9b4a28, dark #de8460) while keeping blue underlined links in prose. To keep Paper’s previous blue accent, set params.ui.theme_color: '#2b5f8c'. Terminal now sets screen prose in IBM Plex Mono (keeping IBM Plex Sans in print), and an explicit params.ui.fonts.ui or fonts.body reaches the headings in every preset unless fonts.heading names its own face. See Brand and appearance. OINK 1.8.0 returns Paper to its 1.6.0 look and adds preset: news, which grew out of this 1.7.0 look and is the closest choice for a site that preferred it; see Upgrade to 1.8.0.
Updated single-key shortcuts. The shortcut map reorganized into twenty-nine bindings (10 navigation, 9 actions, 10 view): Zen Mode moves from H to Z (H opens local browsing history), language cycling is X, preset cycling is T, color mode is Y, blog index layout is L, version cycling is V, language home is G, command-only palette stays on \ (with C), and [ and ] trigger ChatGPT and Claude. G no longer opens the focused tree item (Enter and Space still do), and the home page’s N section alias is gone (J remains). Update any site-specific help copy or keyboard tests that mention pre-1.7 keys; see Keyboard shortcuts.
Typeset copy. Copying article prose now emits clean print-palette rich text by default so editors such as WeChat no longer keep page canvas backgrounds. Set params.ui.rich_copy: false (or front matter rich_copy: false) if your site needs the browser’s default HTML copy.
New opt-in components and CSP. Timeline, Update, Social, and local Video/Audio work without external requests. If you enable params.map or params.video_embeds, allow your tile origin in img-src and enabled video hosts in frame-src; see Deploy.
Archived-version banner. Sites with params.archived_version: true now receive a styled role="note" notice and require a non-empty params.version (omitting it warns once and drops the empty banner).
Upgrade to 1.6.0
Every site moving to 1.6.0 needs this section. The release keeps the
github.com/pgsty/oink module path but deliberately retires Sass,
Bootstrap’s JavaScript and Lunr, which is what lets Hugo 0.170 and newer
build the theme. Read the 1.6.0 release notes, then check
each item:
Toolchain. Use a current Hugo release (tested on 0.170+; no Extended edition or Sass compiler needed). Remove extended: true from CI workflows once every branch you build uses OINK 1.6.0 or newer.
Stylesheets. Convert retired assets/scss/_*_project*.scss files to plain CSS in assets/css/project.css, change hard-coded /scss/*.css paths to /css/*.css, and switch custom-shell layouts to partial "css/bundle.html". See Retired SCSS hooks.
Bootstrap JavaScript. Remove dependencies on a theme-provided window.bootstrap or on data-bs-toggle hooks, listen for td:tab-shown instead of shown.bs.tab on Landing download tabs, and change .dropdown-menu selectors on version lists to .td-version-menu__list. See Bootstrap’s JavaScript.
Local search. Remove site-script dependencies on window.lunr and call OinkSearchEngine.create(documents, maxResults). A content index over 2 MiB now moves page text into offline-search-body.<lang>.json. See Local search without Lunr.
Markmap 1.1.0. Migrate the legacy Markmap 0.18 YAML keys to foldLevel, wrapWidth, levelGap, siblingGap and colorDepth; the old names warn and are ignored. See Markmap migration.
ReDoc 3.1.0. Each specification now renders in its own same-origin reader frame, so a Content Security Policy that restricts frames must allow frame-src 'self'. ReDoc 2’s hide-hostname, hide-logo, suppress-warnings, lazy-rendering and native-scrollbars defaults are gone with its v2 API; if you override the redoc shortcode or its styles, port those overrides to the ReDoc 3 API. Rename the specification extension x-code-samples to x-codeSamples. Old links to operations still redirect, but ReDoc 2 deep links to schemas and to individual security schemes have no ReDoc 3 equivalent, so update any link that points at one.
Components that load on approach. Asciinema, ECharts, Infographic, Markmap and giscus now load as the reader nears them. If your own browser tests assert rendered charts, maps or players, scroll the component into view first.
Retired SCSS hooks
If your site has assets/scss/_variables_project.scss,
_variables_project_after_bs.scss or _styles_project.scss, convert them
by hand, once. The theme’s stylesheet is plain CSS and the build runs no Sass
compiler, so each of these files is ignored with one build warning, and until
you convert them the site builds with the theme’s default styles only.
Move the rules in _styles_project.scss, and in the partials it imports,
to assets/css/project.css as plain CSS. Native CSS nesting is fine. Write
out what only Sass understands: variables, mixins such as Bootstrap’s
breakpoints, @extend, and nested selectors that build a class name with
&-.
For each Sass variable you assigned in the two variable hooks, set what it
used to change. Colors and fonts have their own settings; see
Brand and appearance. For anything else,
override the custom property or the theme rule the variable fed.
Build the site and compare the pages that matter. project.css loads after
the theme’s stylesheet, so a theme rule of equal specificity no longer
overrides your rule. Check elements that also carry a theme modifier class,
and check each visual preset you offer.
Delete the three SCSS files and the partials only they imported. From then
on, edit the project stylesheet.
If your own templates compiled the theme’s SCSS partials, ask for a
theme stylesheet by name instead.
Bootstrap’s JavaScript
If your layouts, shortcodes or content use Bootstrap’s dropdowns, tabs,
modals or any other Bootstrap script, load Bootstrap yourself: the theme no
longer provides window.bootstrap or activates Bootstrap’s script hooks. To
find what depends on it, search for bootstrap., data-bs-toggle,
data-bs-dismiss, data-bs-target and .bs. event listeners. Replace each
with an OINK component, or load your own Bootstrap bundle in
layouts/_partials/hooks/body-end.html. The color-mode attributes
data-bs-theme and data-bs-theme-value still work.
On OINK Landing download tabs, listen for td:tab-shown instead of
shown.bs.tab; the event bubbles from the channel panel that just became
visible. The version lists in the footer and drawer use
.td-version-menu__list, so update custom .dropdown-menu selectors for
them. The version trigger reports its state through aria-expanded; observe
that attribute where a script listened for *.bs.dropdown.
Local search without Lunr
If your site uses local search, its configuration, index files and front
matter keys are unchanged. After upgrading, check three things:
The theme no longer ships Lunr. If your own layouts or scripts used
window.lunr from the theme’s copy, load Lunr yourself.
If you call OinkSearchEngine.create directly, drop the Lunr argument:
create(documents, maxResults).
Results rank differently. A short word no longer matches inside another
word, so port no longer returns pages that only say “support”, and
Chinese, Japanese and Korean queries no longer need spaces between words.
Try the searches your readers use most.
A content index larger than 2 MiB is now published as two files: the index
keeps titles, headings and keywords, and offline-search-body.<lang>.json
holds the page text, which the palette loads after the first results. If you
set offline_search_index: summary only to stay within the size budget, you
can return to content. A script of your own that read body from a large
index must read the second file and join it by ref. An index within 2 MiB
is unchanged.
Fields are now search results: a query for a parameter name opens its entry
in a fields list or {.fields} table, with no change on your part. To keep
an established anchor, give the field an id. To make your own markup
searchable the same way, give the element an id and
data-td-search-entry="Title". The Shell contract
lists the rules.
Staying on 1.5.1 or older
If a site, or a branch you still build, stays on OINK 1.5.1 or older, its
build compiles Sass and needs Hugo’s Extended edition, which ended with Hugo
0.169; those releases fail to build on Hugo 0.170. Everywhere that site
builds, use the Extended edition at a release no newer than 0.169:
Locally, hugo version must print extended.
In GitHub Actions, give peaceiris/actions-hugo an exact release and the Extended edition:
In the container image, install hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.deb instead of hugo_${HUGO_VERSION}_linux-${TARGETARCH}.deb, with HUGO_VERSION no newer than 0.169.
resources/_gen/ also holds the CSS the build compiled, so clear it when a font or accent-color change does not show up.
Upgrade to 1.5.1
A site that leaves params.ui.compare unset needs no changes: 1.5.1 builds
exactly the same pages and outputs. The release stabilizes the opt-in
Duo view introduced in 1.5.0 and
fixes RSS, print, navigation, validation, search and accessibility behavior;
see the 1.5.1 release notes.
If you turn on params.ui.compare: true:
Keep explicit {#id} heading anchors aligned across translations, so Sync Scroll can match sections.
Set languages.<lang>.params.ui.compare: false for any language that should neither show the reader nor appear as a target language.
Guard custom analytics in head-end.html with window.OinkComparePane so pane loads are not counted twice. A local override of Hugo’s google_analytics.html partial is not used while compare is on; see Analytics and SEO.
Allow same-origin frames (frame-src 'self') in your Content Security Policy, and make sure the server does not forbid same-origin framing with X-Frame-Options: DENY or frame-ancestors 'none'.
Open a translated Docs, Book or blog page and check that Open duo view (renamed from Open bilingual view in 1.5.1) loads the target language, syncs scrolling across shared headings, and switches cleanly on narrow screens.
Upgrade to 1.4.0 and 1.3.1
If your site uses PlantUML, 1.4.0 can render it in the browser with no extra
software or rendering service. To switch, keep params.plantuml: true or
plantuml.enable: true and remove svg_image_url; the two bundled browser
scripts take over. To stay in server mode, keep a non-empty endpoint, because
an empty endpoint now selects local mode. To turn rendering off, set
params.plantuml: false or plantuml.enable: false. Before switching an
existing diagram collection, review the
unsupported includes, libraries and CSP requirements.
Beyond that, 1.4.0 keeps the Hugo-only build and adds unified diagram
reading, richer local search, the opt-in table reader and the gallery blog
layout (1.4.0 release notes). After pinning it, review
navigation, image viewing and reader settings. If you install the theme as a
source copy, refresh the copied files as well; changing go.mod does not
update a vendored copy.
1.3.1 repaired Markmap text contrast and the fixed table of contents'
clearance above the footer, and added opt-in layouts for technical tables and
long FileTree comments. Existing content keeps its appearance; turn on
technical table layout or FileTree
wrap=true only where the full technical text has to show. A site that offers
all four styles keeps preset: paper with the explicit
[paper, slate, ink, terminal] menu. The 1.3.1 notes
describe these fixes and credit their contributor.
Upgrade to 1.2.0
Paper became the default appearance
If the site must keep its existing look, set params.ui.preset: slate
before adopting 1.2.0. preset_menu: true turns on reader choice and still
defaults to false. Ink and Terminal appear only when you name them as the
preset or in the menu list, and their buttons carry no experiment badge.
Review custom dark brand selectors as described in
Brand.
Apart from the appearance change, 1.2.0 needs no content migration. Check:
The chosen preset, the light/dark icons, keyboard and mobile menus, saved preferences, and custom font and accent overrides. Sun means light and moon means dark, and switching styles must not change the saved light/dark preference.
Explicit navigation, hidden subtrees, page links, Blog pagination canonicals, and SEO alternates for pages without translations.
CJK search summaries that match only keywords, and outline links whose headings contain a literal percent sign. Compare the Edit, History and Create-child links for content on Windows or in mounts; mappings must yield repository-relative paths.
Landing content with JavaScript disabled or blocked, preserved metric formatting, dialogs and keyboard shortcuts, the copy fallback, Draw.io controls, and numbered equations at narrow widths.
Diagram endpoints and resource alt metadata in a production build: malformed values now warn and fall back safely. To disable rendering on purpose, use params.plantuml: false or params.drawio.enable: false.
The revised PDF and migration tools, if you publish PDFs or convert content. Review PDF remote-resource opt-ins and migration diffs, including code examples nested in lists.
Upgrade to 1.1.0
If your site is on 1.0.x, no source migration is needed, and the module’s Go
1.27.0 directive is unchanged from 1.0.0; toolchain details are in the
1.1 release notes. What changed is behavior, so review the
surfaces the site uses before choosing the new pin:
Languages
All 32 interface catalogs share one native-message schema. Check the site’s language labels, plural counts and RTL direction; authored translations remain the site’s responsibility.
Taxonomies
Root pages become term-card directories with a taxonomy switcher. Review taxonomy-template or CSS overrides, author portraits and localized breadcrumbs.
Sidebars
Cached trees keep each page’s effective settings and work without JavaScript. Test collapse, hover restore, the mobile drawer and keyboard focus; hidden content must leave the focus order.
Groups
sidebar_divider: true keeps a section’s children. Add build.render: never only if you mean to omit the group’s own outputs, then check child navigation, breadcrumbs, paging, Print and Book contents.
Root menus
An explicit sidebar_root_menu: false now applies to self-root sections too. The current linkable root stays visible as a location marker.
Custom scripts
Feature-detect OinkSidebar and OinkCommandPalette.registerSearchTail if an integration must also support 1.0.0. Restore branch state through the API rather than by changing classes or ARIA attributes.
Copying articles
With image zoom on, copying an image and its caption yields plain text and rich HTML. Preview instructions must stay out of the copied article, and zoom and its keyboard controls must still work.
Print and Redoc
Check page and Book aggregate Print, heading and tab links, and local Redoc specifications under the real deployment prefix. Local specification paths are rooted under static/.
params.ui.image_zoom and params.offline_search stay off by default, and
the new search hook enables no remote provider and adds no query telemetry.
params.ui.scroll_spy and the page-level scroll_spy are still accepted and
do nothing in 1.x, so removing an obsolete patch does not disable normal
outline tracking.
If the site keeps its own copies of theme code, such as an image-zoom script
or a sidebar partial, compare them with the new implementation and update or
remove them; otherwise the old copy keeps overriding the upstream fix. The
details are in content groups, the
sidebar contract,
search actions and
image zoom.
Upgrade from 0.4
If your site started on OINK 0.4 and a page gained or lost a feature after
upgrading, check these changed defaults first:
Sequential paging is on. docs, book and blog pages end with previous / next links; documentation follows the sidebar tree and blog posts follow time. Set pager: false on a page that stands outside any sequence.
The navbar appears on every layout. Its compact state is one row of icon navigation with no second mobile accordion menu, so remove local scripts and tests that depend on the old mobile menu. To hide the navbar for a section, set navbar_enabled: false in a cascade.
The footer defaults to fat across the site and accepts only fat, slim or none. Footer data lives in data/footer/<language>.yaml, or data/footer.yaml on a single-language site; a footer key left in data/home warns and names the new location.
Single-key navigation is on: / opens full search and \ opens command-only mode. Update training material that describes the old behavior. Page actions moved to a split button beside the breadcrumbs.
The code block DOM changed: a .td-code wrapper now encloses the original .highlight, and both .highlight and .chroma remain. In site CSS, replace a child selector such as .td-content > .highlight with the descendant selector .td-content .highlight.
The two ICP footer keys footer_icp and footer_icp_url became one string that accepts inline Markdown:
Mathematics needs Goldmark passthrough in the site’s own configuration, because Hugo does not merge a theme’s markup settings. If the site uses \(…\), \[…\] or $$…$$, enable passthrough in its hugo.yml; see Math.
If your content still uses 0.4 shortcodes such as alert, tabpane or
imgproc, convert them with oink06.py instead of editing hundreds of files
by hand. It ships in the theme repository and needs only the Python standard
library:
Terminal
git clone https://github.com/pgsty/oink
cd oink
# 1. read-only inventory: what several sites would change, exportable as Markdown / JSONpython3 bin/migrations/oink06.py report --sites ~/sites/product-docs ~/sites/handbook --md report.md
# 2. dry run: prints a diff and counts per file, writing nothingpython3 bin/migrations/oink06.py migrate --site ~/sites/product-docs
# 3. apply: written atomicallypython3 bin/migrations/oink06.py migrate --site ~/sites/product-docs --write
# 4. check for residue: exit code 1 while legacy syntax remainspython3 bin/migrations/oink06.py check --site ~/sites/product-docs
A dry run is the default and only --write changes files, so run it, read the diff, then write.
A second run must change nothing. If a second --write still reports changes, a transformation has not converged; stop and inspect those files.
Text inside code fences is left alone, so documentation that shows the old syntax stays intact.
A construct the tool cannot express is left unchanged and reported with file:line and a reason, as a list for manual work rather than a failure.
To convert one class at a time, pass --only with keys from the last column
of the syntax map:
Afterwards, rebuild, read the warnings and look at the rendered pages. The
tool guarantees valid syntax; whether each page still says what you meant is
yours to check.
The 0.4 → current syntax map
{{%/* alert color= title= */%}}, {{%/* details */%}}, {{%/* pageinfo */%}}, hand-written <details><summary>, The current form> [!TYPE] Title / > [!DETAILS]-
callout
{{</* tabpane */>}} + {{%/* tab header= */%}}, {{</* code-group */>}} + {{</* code-tab */>}}, The current formAdjacent fences with {tab= group= value=}; tabs in running text use {{</* tabs */>}} + {{</* tab */>}}
tabs
{{</* filetree */>}} with filetree/folder and filetree/file, The current formThe filetree data fence
filetree
{{</* gallery */>}} with gallery/image, The current formThe gallery data fence
gallery
{{</* echarts */>}}, {{</* infographic */>}}, The current formData fences of the same name ($fn: is unchanged; a js subfence moves to window.OinkEchartsFunctions)
datafence
doc-cards / doc-card, nav-cards / nav-card, card / cardpane, doc-carousel, The current form{{</* cards */>}} + {{</* card */>}}, or a link list with {.cards}
cards
{{</* imgproc */>}}, {{</* image */>}}, The current form with the attribute line {command= options= caption=}
image
{{</* readfile file= */>}}, The current form{{</* include file= */>}}
include
The fence attribute {filename="x"}, The current form{title="x"}
fencetitle
{{</* badge outline= */>}}, The current formDrop the outline parameter
badge
{{</* example */>}} + a fence, {{</* book-figures kind="tbl" */>}}, The current form{{</* eg */>}}…{{</* /eg */>}}, {{</* book-tables */>}}
eg
{{%/* _param x */%}}, iframe, conditional-text, blocks/*, netlify, a kindless xref, The current formReported only; handle by hand
reportonly
Each page under Components describes the new form and its
parameters.
Migrating from Docsy
If your site runs on Docsy, most of it carries over. OINK is a hard fork of
Docsy and keeps its content model, td- naming and most front matter, so the
migration is mainly deleting the site’s copies of the shared shell and letting
the theme supply it. The prose stays as it is.
Pin the target version. Point go.mod at an OINK release tag, or use a complete versioned archive. While you evaluate, an uncommitted go.work can point at a local checkout.
Inventory the overrides. Sort every site-level file under layouts/, assets/ and static/ into four groups: copies of the shared shell (delete once verified), components OINK already provides (delete or rename mechanically), brand customization (keep, in the smallest suitable hook), and business-specific data and interaction (keep in the site). Delete in reference order rather than emptying layouts/ at once, because the home or download page may still call a partial you plan to remove.
Move the configuration. title, languages.*, github_repo, github_branch, page_width and params.ui.* keep their meaning and position; OINK adds no namespace of its own. Turn on search and the logo with these keys:
hugo.yml
params:logo:img/product.svgoffline_search:true
Rename Docsy’s camelCase search keys yourself: offlineSearch,
offlineSearchIndex, offlineSearchMaxResults, offlineSearchOnServe and
offlineSearchSummaryLength all become their underscored forms. OINK
ignores the old names without a warning, so search stays off silently
until you rename them.
Fonts and styles. Docsy’s SCSS hooks in assets/scss/ are no longer compiled, so its Sass variables, including the font variables and the Google Fonts switches, have no effect. Convert the hooks as described in Retired SCSS hooks. OINK bundles IBM Plex Sans, Inter, Chakra Petch and IBM Plex Mono, and no preset requests Google Fonts. To change fonts, use the token layer; see Brand and appearance.
Convert the shortcodes. Docsy’s alert, pageinfo, tabpane and card families all have a current counterpart; convert them in bulk with the migration toolkit, one --only class at a time.
Delete one group at a time and build after each. Rehearse on a scratch copy first, recording the theme commit, Hugo version, removed files and generated HTML file count; once the result is equivalent, repeat the steps on the production branch.
The “delete once verified” group in step two is usually:
layouts/baseof.html and the shared docs and blog baseof*.html;
the navbar, footer, sidebar, TOC, search and head CSS partials and their hooks;
the old brand documentation shell partials;
copies of the asciinema, echarts, infographic, doc-carousel, details, tab / tabpane, card and param shortcodes;
the JavaScript, Lunr copy, carousel code and SCSS that served only those implementations;
PostCSS and Autoprefixer steps that no site asset needs any more.
Two problems tend to surface after the deletions.
A site script reports $ is not defined. Docsy loaded jQuery in every page’s
<head>; OINK does not need it and does not bundle it. If your site still
needs it, load it from the site:
A home page built from Docsy’s blocks/* fails with
template for shortcode "blocks/cover" not found, because OINK has no such
shortcode family. Build the home page from sections in
data/home/<language>.yaml, or set layout: landing on the page; see
Home and landing pages.
Find the cause and fix of a build, language, search or hosting problem from its symptom, and check a site before you publish it.
When a build fails or a page looks wrong, start from a clean production build
and read the first error, because later errors usually follow from it:
Terminal
rm -rf public resources/_gen
hugo --gc --minify --printPathWarnings --logLevel info
That one Hugo command is the whole build of an OINK site. If the log shows npm,
PostCSS, Autoprefixer or a browser-asset download, the site still carries
upstream Docsy’s build steps; see Migrating from Docsy.
Build
Symptom
Cause
Fix
Build fails on an older Hugo release
The Hugo that runs is older than the tested 0.170+ releases
Check hugo version and update to a current release (0.170+). If several Hugo binaries are installed, check PATH and the version configured in CI before installing another
TOCSS-DART: … You need to install Dart Sass
The site pins OINK 1.5.1 or older, which compiles Sass, and Hugo 0.170 or newer no longer has a built-in Sass compiler
Upgrade the site to the current OINK release, see Upgrade to 1.6.0, or build it with Hugo Extended 0.169 or older until you do
module "github.com/pgsty/oink" not found
The theme did not resolve
Hugo Module: check hugo mod graph, go.mod, go.sum, and unexpected workspaces or replacements. Submodule: confirm that CI runs git submodule update --init before Hugo. Archive / clone: theme: must match the directory name under themes/
Module download hangs or times out
The Go module proxy is unreachable
Hugo downloads modules through Go, so GOPROXY applies. In mainland China, use export GOPROXY=https://goproxy.cn,direct. In an isolated environment, use an offline archive or commit themes/oink/
{.cards}, {.steps}, {caption=…} appear as literal text
Goldmark block attributes are off
Set markup.goldmark.parser.attribute.block: true in the site’s own hugo.yml; Hugo does not merge a theme’s markup settings. Copy the whole block from the three Goldmark prerequisites
An image with an attribute line is wrapped in <p> and the caption does nothing
markup.goldmark.parser.wrapStandAloneImageWithinParagraph: false is missing
A {{</* tabs */>}} has no matching {{</* /tabs */>}}
Add the closing marker at the file:line:column the error names
template for shortcode "tabs" not found
The body calls a shortcode that does not exist, or quotes shortcode syntax without escaping it
Correct a misspelled name. To show shortcode syntax as text, put /* and */ inside the opening and closing markers, so Hugo does not treat it as a call
... attributes: unknown attribute "witdh" at ...
An attribute-line key is misspelled or not permitted
Correct the key; the warning lists the allowed ones. Until then the theme ignores the attribute, and it always drops style and on*
shortcode "field": unsupported parameter "colour" at ...
A shortcode parameter name is wrong
Correct the parameter the warning names, with its file and line. Until then the theme ignores it, so the preview keeps working
invalid params.ui.page_width "widee" (allowed: normal | wide | full) -- using "normal"
A configuration or front matter value is outside its allowed set
Correct the value the message names. Until then the theme uses the fallback it names and keeps building; see Configuration principles
A page setting has no effect and nothing is reported
The key was written inside a ui: block in front matter
Put page keys at the top level of front matter, without the ui. prefix of the site key. A front matter ui: block is ignored silently. See Page parameters
The build passes but production is missing a feature
A warning turned the feature off
Read the build warnings. An invalid value, a missing required giscus key or an unsupported comments.type switches that feature off instead of failing the build
Site styles disappear after an upgrade, with a stylesheet: assets/scss/… is ignored warning
Both shortcode errors end with the file:line:column to fix:
build output
ERROR error building site: assemble: failed to create page from pageMetaSource /a:
"…/content/docs/x.md:4:1": failed to extract shortcode:
shortcode "tabs" must be closed or self-closed
ERROR error building site: assemble: failed to create page from pageMetaSource /a:
"…/content/docs/x.md:4:5": failed to extract shortcode:
template for shortcode "tabs" not found
Language
Symptom
Cause
Fix
A translated page does not appear
Four possibilities, in order
① hugo.yml has languages.zh with a weight; ② the filename is page.zh.md, with zh lowercase; ③ the translation’s front matter has no draft: true and no future date; ④ routing metadata matches the source file
Switching language lands on the home page
Hugo found no translation
The switcher falls back to the target language’s home page when a page has no translation. Add the translation file to link the two pages
An anchor link opens the page but does not scroll
The translated heading text differs, so the generated ID does too
Set the English ID explicitly on the translated heading: ## 安装 {#installation}. If a heading contains a shortcode or inline HTML, read its ID from the English page’s rendered HTML instead of guessing
Menus or home page sections are untranslated
They live in configuration and data files, not pages
Menus are in languages.<lang>.menus, home sections in data/home/<lang>.yaml, interface strings in i18n/<lang>.yaml. See Languages
Search
Symptom
Cause
Fix
A search box that never returns results
No index was generated
Check params.offline_search, then open search and find the request for the page’s data-td-index-src URL in the network panel. Production uses offline-search-index.<language>.<hash>.json; development omits the hash. If the index is missing only under hugo server, also check offline_search_on_serve
The index file returns 404
A wrong baseURL
On a subpath deployment, a wrong baseURL is the most common cause. Check the requested index URL in the browser’s network panel; see Deploy
Search fails under hugo server but works in a build
The site turned the preview index off
params.offline_search_on_serve defaults to true, so the preview matches production. Remove an explicit false
Chinese queries find nothing
Usually the page is missing from the index, or its text sits in the split body file
Open the Chinese page’s data-td-index-src URL, and data-td-body-src if the index is split, to confirm the page was indexed, and check the offline_search_index scope. See Chinese, mixed queries, and identifiers
A new page is not found while old ones are
The index is build output
Rebuild. Under hugo server, wait for the rebuild after editing
params.search.algolia requires explicit appId, apiKey, and indexName values
The three Algolia keys are incomplete
Give all three explicitly; the theme never falls back to another project’s DocSearch credentials. If you do not want Algolia, delete the block
The command palette finds no content
Commands and full-text search are separate
Without an index the palette still opens, says the index is unavailable, and runs page actions and commands. See Command palette
Platform
Symptom
Cause
Fix
A 404 or missing styles on GitHub Pages
A project site’s URL carries the repository path and baseURL does not
Pass --baseURL "${{ steps.pages.outputs.base_url }}/" from the workflow instead of hard-coding the address. See the complete workflow in Deploy
“Last modified” and contributors are empty on GitHub Pages
The checkout is shallow
Add fetch-depth: 0 to actions/checkout, because enableGitInfo reads the complete history
A Cloudflare Pages build fails with Hugo template errors
The build image’s default Hugo is outdated
Set HUGO_VERSION to a current release (for example 0.170.1) in both the Production and Preview environments, and set SKIP_DEPENDENCY_INSTALL=1
The host’s build cannot fetch the theme
The build environment has no Go
Hugo Modules need Go. If the platform does not provide it, use a submodule or commit themes/oink/
CI output differs from local
go.work took part in the CI build
Set GOWORK: off and HUGO_MODULE_WORKSPACE: off in CI so it uses only the version pinned in go.mod
A preview deployment got indexed
The preview was built in the production environment
Drop --environment production from preview builds; a non-production build emits noindex and Disallow: /. See Analytics and SEO
macOS reports too many open files
Live preview watches more files than the shell limit allows
Exclude generated and irrelevant directories from the watch first, since they are the usual cause; raise ulimit -n only if that is not enough
Slow, or missed changes, under WSL
The site sits on a Windows mount point
Keep the site inside the Linux filesystem; change notifications and permissions across filesystems break live reload
Bootstrap / Font Awesome / Mermaid assets are missing
An incomplete copy of the theme
Do not substitute a CDN URL. Confirm that assets/third_party/, static/webfonts/ and VENDOR.json are present, and download the same pinned release again if anything is missing
Checks a site can run
Run the build on every change. The two scripts come from a checkout of the
theme repository at the release your site pins, shown as /path/to/oink, and
need only Python 3; replace the site path and base URL with your own.
A production build, Commandhugo --printPathWarnings
Every href / src in all four outputs is site-relative or uses http(s) / mailto / tel; no javascript: URLs or inline on* handlers; a cross-site <iframe>, <script> or <img> needs an explicit --third-party. Details in Verifying an offline build
Book anchors, Commandpython3 /path/to/oink/bin/check-book.py --site-public /path/to/my-site/public
For a site with a book: every cross-reference target exists, kind and number agree, and IDs are unique within each page
Read the build’s warnings: each one names the key, the rejected value and the
default the theme used instead, and
When a value is wrong explains why OINK
warns rather than failing the build.
Diagnostic habits
When no row matches:
Reproduce the problem with one known Hugo version and record its hugo version output, so the version cannot change between runs.
Compare the development and production configuration; a problem that appears only online is often an environment difference.
Separate theme behavior from a site override with a minimal page. Put the suspect content on a page of its own, then re-enable site overrides in batches until one batch brings the problem back.
Look at the failing page’s browser console and network panel, especially the paths of any 404 resources.
Getting help
When you open an issue, include the complete hugo version output, the theme
version from hugo mod graph | grep oink, the first complete error, and a
minimal page or site that reproduces it. With those four, nobody has to ask
you for more details first.
Languages — language configuration and the anchor alignment process
7 - Design and development
OINK’s contracts, accepted decisions, dated research, and active proposals in one bilingual section.
OINK 1.8.0 contract
These contracts describe OINK v1.8.0. Release acceptance checks the published
module with replacements and workspaces disabled.
This section explains how OINK works and why it has its present shape. It brings
together current contracts, the reasoning behind accepted decisions, evidence
from alternative designs, and ideas that remain proposals. The other guides on
this site explain how to build and maintain a site with OINK.
Reading this section
Layer
Meaning
Contracts
Normative behavior that compatible implementations must preserve
Decisions
Accepted rationale and boundaries that explain current behavior
Research
Dated, non-normative evidence that may need to be refreshed
Proposals
Draft PRDs and RFCs; publication here is not proof of implementation
Accepted and active PRDs for theme roadmap, local search, visual presets, content components, and the CLI roadmap
Create each new OINK PRD or RFC as an English and Chinese page pair under
content/docs/design/proposals/. Do not create another repository-local
plan/, plans/, or proposal/ tree. After acceptance, update the
implementation, its checker, and the applicable contract, then record the
accepted rationale under Decisions. Retire the draft from active use while
preserving it in Git history and the changelog.
Expo contract
The Expo contract describes the image-album layout
introduced in OINK 1.3.0. Its accepted decision records the
content model and the revisions to the earlier Muse experiment. The
authoring guide explains album setup and viewer controls.
The contract, accepted decision, and authoring guide describe the same
released content model and controls.
Authority and maintenance
This directory owns the English and Chinese design text for maintainers; the
theme repository owns the executable facts. Within the theme, hugo.yaml
defines published defaults, while each resolver and checker defines the input
shapes it accepts. layouts/ and assets/ define rendered behavior, and check
scripts with tests/goldens/ define validation. VENDOR.json records bundled
versions, licenses, files, and checksums.
When public behavior changes, update the implementation, its checker, and both
language versions of the applicable contract in the same delivery.
Tests should check behavior and output without requiring exact prose.
OINK v1.8.0 uses plain CSS and is tested on Hugo 0.170+ (no Sass
compiler or Extended edition). It does not test older Hugo releases in CI:
development and checks use the installed Hugo, and CI installs latest.
Neither theme.toml nor module.hugoVersion declares a minimum Hugo version
(dropped in v1.8.0; the v1.7.0 tag still carried one, which Hugo reported only
as a warning). See
Runtime dependencies and 1.8.0 baseline.
Do not enable --panicOnWarning or HUGO_PANICONWARNING. Warnings remain
visible and are reviewed. Invalid-input tests verify their specific warning
and safe fallback output directly.
OINK v1.8.0 contains no Sass: its stylesheet is plain CSS that Hugo
concatenates; see Plain CSS stylesheet delivery.
Ordinary consumers need no Dart Sass, LibSass, or other Sass executable—a site
build needs only the Hugo binary. Releases up to v1.5.1 compiled main and ReDoc
styles with Hugo’s built-in LibSass (requiring Hugo Extended 0.168.0 and Go
1.27.3). Later changes must preserve this Hugo-only dependency boundary. Update
requirements, checkers, and both language contracts together; historical release
and research records retain their original tools.
Go resolves Hugo Modules and is not needed for a prepared classic theme copy;
user documentation does not prescribe a Go version.
Repository and assembly
The repository root is a complete Hugo Module theme. It is not a site or npm workspace.
Hugo renders templates and publishes the theme’s stylesheets. Committed browser runtimes and third-party assets need no network fetch during normal builds.
Public bilingual documentation, examples, and browser tests belong to the sibling oink.pgsty.com repository.
The theme keeps only narrow internal regression fixtures under tests/site/. It has no separate public example site.
Generated public/ and resources/ directories are never source.
Vendored runtimes, font families, and Font Awesome glyph definitions are supported distributions. Do not remove them as dead code.
VENDOR.json and bin/check-vendor.py verify their integrity.
OINK includes the complete supported Font Awesome distribution because consumer content can use icons absent from theme templates.
The official compiled Font Awesome CSS is a stable, fingerprinted vendor stylesheet.
It loads before fingerprinted main.css, the theme’s stylesheet, and the site’s own styles.
Site style changes therefore preserve the icon distribution’s fingerprint, while cascade order still lets sites override its styles.
Capability styles, including KaTeX, DocSearch, Swagger, Asciinema, and Leaflet, stay separate and load only when used.
Fingerprints permit immutable URLs. The deployment host controls their HTTP cache headers.
Hugo types docs, book, blog, and swagger select reading shells. params.ui.shell_types may add types.
Landing uses layout: landing. There is no article type or second blog shell.
The shell contract defines immersive pages as a blog presentation.
layouts/_partials/shell/config.html resolves shared shell settings.
Layouts must render through content/render.html before scripts.html because render hooks and shortcodes register capability flags in the Page Store.
Override the narrowest partial. Keep similar base templates separate when merging them would change Hugo lookup precedence.
Runtime dependencies and 1.8.0 baseline
The Hugo toolchain applies to development and CI. The stylesheet
is plain CSS that Hugo concatenates, and the consumer SCSS hooks are retired;
see Plain CSS stylesheet delivery. Contributor browser checks
use Node 26.13.0 and npm 12.2.2; these are not consumer build dependencies.
Blog cards, galleries and external rows read authored fallback summaries through
RawSummary. Hugo’s plainify supplies improved spacing between HTML
blocks; summaries and word counts follow that behavior. Publication CI pins
Pandoc 3.13, EPUBCheck 5.4.0 and Chrome headless shell 157.0.8103.50, with Java 27.
The search close button’s localized accessible name includes its visible
Esc label and exposes aria-keyshortcuts="Escape" for speech and keyboard access.
The refreshed runtime set (26 vendored dependencies in VENDOR.json) includes
DocSearch 5.2.0, Mermaid 12.4.0, KaTeX 0.19.1,
Markmap 1.1.1, Swagger UI 5.36.0, ReDoc 3.2.0, Asciinema 3.19.0,
Infographic 0.2.20, Pako 3.0.3, idb-keyval 6.3.0, PlantUML core 1.2026.10, Viz.js 3.31.0
(Graphviz 16.1.0 and Expat 2.8.5), and Leaflet 1.9.4 (BSD-2-Clause). Font Awesome 7.3.1, Bootstrap 5.3.8,
ECharts 6.1.0, and the font packages remain current
stable releases. VENDOR.json remains the exact inventory.
The main stylesheet retains Bootstrap’s component CSS, including modals,
offcanvas panels and carousels, for use in site-owned markup. A site that uses its JavaScript components
loads its own bundle. The theme no longer vendors bootstrap.bundle.js or
Popper. base.js owns the version disclosure and both main and chrome
include its styles. landing.js enhances the server-rendered download
channels. See the upgrade guide for
changes to site event listeners and CSS selectors.
Mermaid explicitly defaults to layout: dagre, theme: default, look: classic;
the new ELK/neo/color-theme defaults do not silently redraw existing content.
Mermaid 12 needs a browser supporting ES2024 (Safari 17.4 or newer). Loading or
rendering failures retain source. KaTeX 0.19.1 CSS/fonts retain the class
normalization for formulas generated by Hugo’s embedded renderer.
A page with a formula publishes KaTeX’s twenty woff2 faces and a stylesheet that names only those;
the woff and ttf copies stay in the module, unpublished.
DocSearch uses the keyword-search bundle and adapts the existing indexName
setting to the upstream indices API. Ask AI is not enabled.
Markmap uses a local ESM graph built from @markmap/core, parse, render,
view and plugin-math 1.1.1. Its D3 primitives, highlighting and lazy MathJax
are bundled; the old global autoloader, standalone D3 and WebFontLoader are
retired. Every relative chunk is published together. See the
Markmap migration before updating content.
The adapter names SVG link overlays from the parsed Markdown labels and restores
those names and visible keyboard focus across animated folding and redraws.
Included Markmap fences register their capability on the host page.
Notes support keyboard opening and Escape with focus restoration, even if an SVG
redraw replaced the original marker. A document
canvas measures labels after fonts load, avoiding Firefox’s OffscreenCanvas
system-font mismatch.
Opening a note finishes any focus-induced page scroll before showing its panel,
so smooth scrolling cannot immediately dismiss it. Open notes follow live color
and preset changes and are hidden in browser print.
Note links use the article’s link color and remain underlined. After printing,
focus returns to the prior note control, or its marker if the panel closed.
If a note chunk fails to load, the affected map restores its complete Markdown
source and keyboard focus; other maps remain independent.
Each ReDoc reader has a separate local HTML document, ES module and hash router.
Multiple readers cannot take over article anchors or each other’s navigation.
Telemetry is disabled; the two vendor brand images are inlined to eliminate
otherwise automatic CDN requests. Specification URLs remain explicit author
input and can be remote when embedded by a same-origin .td-redoc__frame with
the matching authored URL; direct navigation to the local reader asset accepts
only same-origin specifications. A direct specification link remains outside the frame.
The frame permits downloads and new tabs for links chosen by the reader.
Static outputs contain only that link. See API authoring.
Asciinema retains a recording link before JavaScript enhancement, when its
bundle is unavailable, or if initialization, recording fetch or parsing fails.
A failed active player returns keyboard focus to the link. One failed player
does not stop other components from mounting.
Maintainer builds live in bin/vendor/. Copy that directory outside the theme,
run npm ci --ignore-scripts and node build.mjs, then review the generated
assets, bundled-package inventory, licenses and hashes before importing them.
import-redoc.py makes the two documented image substitutions in the original
npm bundle. The lockfile pins transitive dependencies, including idb-keyval
inside the SVG loader. None of these tools run in an ordinary Hugo build.
Plain CSS stylesheet delivery
The theme contains no Sass, and nothing compiles its stylesheet. The source is
the plain CSS layer files under assets/css/td/. assets/css/td/bootstrap/
holds Bootstrap 5.3.8 as built for the theme, split by Bootstrap component: it
carries the theme’s palette, and theme selectors that share a Bootstrap rule
are written into that rule. The font-face layers are
assets/third_party/inter/{normal,italic}.css and
assets/third_party/ibm-plex-sans/{normal,italic}.css.
layouts/_partials/css/layers.html lists the layers of each stylesheet in
cascade order; a later layer wins a tie in specificity.
layouts/_partials/css/bundle.html takes a name and returns that stylesheet as
a Hugo resource: its layers concatenated with resources.Concat and published
as css/<name>.css. An unknown name warns.
Stylesheet
Consumer
main
Every theme page; 123 layers. head-css.html publishes it as css/main.css, or minified, fingerprinted and with an integrity attribute in production
redoc.css
Pages that register ReDoc. It is the single file assets/css/td/redoc.css, outside the layer lists, published the same way as css/redoc.css
chrome
A site-owned shell that does not load main: tokens, typography, the six palettes, the site navbar, and the language, theme and appearance controls
landing
Landing sections for a site-owned shell, loaded after chrome. The development version includes the dark Chroma palette for source panels. The visual presets follow the sections so their equal-specificity overrides take effect
search, compare
The command palette with local search, and Duo View, for a site-owned shell
The four smaller stylesheets have no source of their own: each lists layers
that main also loads. A site layout asks for one by name and applies its own
minification and fingerprint:
There is no compiler, no build step and no generated file in Git; editing a
layer is the whole change. A layer is flat CSS that concatenates: no @import,
no // comment, and every value written out. A value that was a Sass variable,
such as the 50px navbar height, is repeated where it is used, so change every
occurrence together. No layout may call toCSS, css.Sass or PostCSS.
The layers reference fonts as ../webfonts/…, so every stylesheet is published
under css/, one directory below the site root. Font Awesome’s stylesheet is
published there as css/fontawesome.css. Releases up to 1.5.1 publish
scss/main.css, scss/fontawesome.css and scss/redoc.css; a site layout
that names those paths must follow.
A site’s own rules are plain CSS: assets/css/project.css, then every
assets/css/project/*.css in path order. The theme concatenates them into one
stylesheet, published as css/project.css after main.css and before the RTL
artifact, and minified and fingerprinted in production. Hugo does not transform
it. The three SCSS hooks, _variables_project.scss,
_variables_project_after_bs.scss and _styles_project.scss, are ignored;
each present file warns once per build and the page keeps the theme’s styles.
Consumer Sass variables no longer reach Bootstrap, the font roles or any other
theme rule.
bin/check-stylesheets.py owns this contract. It fails when a .scss file
exists under assets/, when a layout calls a stylesheet compiler, or when the
layer lists and the layer files disagree: every listed layer must exist, and
every layer file must be listed. It then builds probe sites with an empty
PATH and checks that they publish the layers in their listed order, that
production output is minified, fingerprinted and carries an integrity
attribute, that each retired SCSS hook warns and reaches no output, and that
the four smaller stylesheets are published for a site-owned shell.
The conversion changed no rule. On 2026-11-23, with Hugo 0.170.1, the
production main stylesheet was byte-identical (556,437 bytes) to the last one
compiled from Sass, and the regression fixture’s 683 output files were
identical apart from the stylesheet path. The four smaller stylesheets now
reuse main’s layers, so they gained selectors (Bootstrap’s heading, .small
and .mark class variants, and a few .td-content ones); no rule or
declaration changed. Published v1.5.1 fails on Hugo 0.170, because Hugo then
requires Dart Sass. The upgrade guide
describes how to convert existing hooks.
Configuration and diagnostics
Theme policy uses params.ui.*. Integrations with multiple settings, such as comments.giscus, plantuml, and drawio, remain top-level.
Boolean features use bare booleans unless they have multiple settings.
Page overrides omit the ui. prefix. Thus params.ui.image_zoom becomes image_zoom, never a front matter ui map.
hugo.yaml declares published defaults. The owning resolver and checker define optional configuration shapes or ranges.
For invalid input, warn with the value, allowed shape, and safe fallback. Then apply the fallback or omit the unsafe feature.
Ordinary builds and previews remain usable.
The theme never calls errorf. check-params.py enforces this rule.
Do not add speculative validation for unreachable states.
There is no generic registry of renamed keys.
If a transition needs a migration diagnostic, add a targeted warning to its resolver and a negative test that verifies the warning and fallback.
Never read removed keys as a compatibility path.
Network-capable features require explicit configuration and remain disabled when that configuration is invalid.
OINK 1.4.0 renders PlantUML locally when it is enabled without an endpoint;
an explicit plantuml.svg_image_url keeps server mode. Draw.io requires
drawio.drawio_server. Algolia requires appId, apiKey, and indexName.
Maps require map.tiles (an HTTPS template with {z}, {x} and {y}) and
map.attribution; the theme names no tile service. Video-platform players load
only for platforms listed in video_embeds, and only after a reader’s click.
Incomplete configuration warns and sends no request.
Draw.io loads only if rendered content has PNG or SVG candidates. It inspects each distinct image URL once.
Diagram endpoints must be strings with an HTTP(S) URL containing a host or a same-site path.
Unsupported schemes, protocol-relative URLs, backslashes, whitespace, and same-site references without paths warn and disable the integration before runtime selection.
Self-contained PlantUML (since OINK 1.4.0)
plantuml: true or plantuml.enable: true
without an endpoint selects browser rendering. The two pinned local assets
(@plantuml/core 1.2026.10 and Viz.js 3.31.0) load only on HTML pages with
PlantUML fences. Normal builds and readers need no Java, Graphviz executable,
npm installation, CDN or rendering service. A nonempty endpoint still selects
server mode and retains its validation and svg behavior; invalid endpoints
do not fall through to local mode. No optional libraries, themes, include files
or external resources are downloaded by local rendering. Generated SVG is
displayed as a Blob image, never inserted into the page DOM. Failed input or
loading keeps readable source; dedicated Print, Markdown and RSS keep source
without a runtime.
Fixed in OINK 1.3.0
Editor URLs retain their query parameters and fragments when embedding
options are added. Messages must come from the active editor frame and its
configured origin; unrelated or malformed messages are ignored. Diagram
data is sent only to that origin. Exports must be PNG or SVG data URLs.
Lazy diagram loading in OINK 1.4.0
The small Mermaid/local-PlantUML scheduler appears only on HTML pages using
these diagrams. Large engines load as visible diagrams approach the viewport.
Engines are shared, with serial main-thread rendering; no Worker, dependency
or build step is added. Scroll/size checks replace IntersectionObserver when
unavailable. Ordinary browser printing cannot wait for asynchronous rendering:
completed diagrams show images and the remainder retain source. Dedicated
outputs are unchanged.
Asciinema, ECharts, Infographic, Markmap, and Map (Leaflet) follow the same rule on HTML pages.
The page publishes each engine without requesting it.
A component on screen, within a short scroll below, or anywhere above the reader loads its engine and mounts.
One further down waits, a hidden one waits until it is shown, and a Map configured with loading: click waits for an explicit click.
Mounting above the reader would move the text being read, so everything above is due at once.
Until it mounts, a player is its recording link, a Markmap is its source, a geographic Map keeps its numbered place list, and a chart or infographic is an empty frame.
Ordinary browser printing cannot wait for a script: a mounted component prints as it is,
and an unmounted chart or infographic prints its declared options or DSL, as the Print output does.
If an engine cannot load, the chart or infographic shows that source, the player keeps its link, and a geographic Map hides its canvas while keeping its place list.
An engine a site has already loaded itself is used without a second request.
Giscus is requested the same way, when the reader comes within a scroll of the comments or is already past them.
A visit returning from sign-in, whose session is still in the address, and a site that sets loading: eager request it at once.
Interface localization
Available since OINK 1.1
OINK 1.1.0 expands the native interface catalogs to the complete locale set
below. Consumer-authored content still needs its own translations.
OINK ships native interface catalogs for the 31 locale filenames present in
google/docsy@64f51c5,
plus generic zh as the Simplified Chinese default:
ar az bg bn de en es et fa fi fr he hi hu it ja ko nl no oc pl pt-br ro ru
sr-cyrl sr-latn sv tr uk zh-cn zh-tw
These catalogs cover theme UI strings; sites translate their own content.
New Docsy locales do not enter OINK automatically: they need a complete OINK catalog and the same review as existing locales.
i18n/en.yaml defines the message schema. Each of the 32 OINK bundles has exactly these keys and native interface text.
An English value may remain only as a reviewed product name, punctuation token, conventional abbreviation, or word shared by the target language.
There are no generated English fallback blocks.
zh and zh-cn use Simplified Chinese. zh-tw uses Traditional Chinese.
Every Hugo release the theme supports accepts locale: zh for the generic zh language
alongside regional Chinese catalogs. A site may also select locale: zh-CN.
Neither choice changes the i18n/zh.yaml filename.
Runtime placeholders such as %s, {count}, and {{ .Count }} may move for natural grammar. Their bytes must stay identical.
Values are strings or Hugo plural-message maps. Plural maps use supported locale categories: zero, one, two, few, many, and other.
other is required. Each form must be a string with the same placeholders (except reviewed lexical plural forms such as Arabic dual two, which express the count natively without repeating the raw digit).
Catalogs contain no hidden bidirectional controls.
Arabic, Persian, and Hebrew direction comes from consumer language configuration (direction: rtl), not injected translation characters; cursive RTL locales (ar, fa) also reset positive letter-spacing on tracked display labels to preserve glyph joining.
bin/check-i18n.py checks locales, schema, template key references, value shapes, placeholders, directional controls, and the small reviewed set of English-identical terms.
Translate every new visible string in every bundle in the same change. Do not generate fallback text.
Featured images
Hugo’s images is the single authoring API. params.images supplies only the site-wide social fallback.
Source
Reader thumbnail
Social card
Page images, or bundled **featured*, *feature*, {*cover*,*thumbnail*}
yes
yes
Section cascade.images
yes
yes
Site params.images
no
yes
images: [] clears explicit or cascaded values but does not disable bundle resource discovery.
Only the first resolved image represents the page. Local processable rasters may be cropped.
SVG, static, and remote resources remain valid without Hugo image operations.
featured-image-resolve.html defines source priority and relative or absolute URLs.
Explicit page images take precedence over bundle resources. Bundle resources take precedence over inherited cascade images.
This order also applies when explicit and inherited values are identical.
For file-backed pages, authored presence is read from source front matter. Hugo parses YAML, TOML, or JSON.
For generated pages without source files, resolved images count as explicit.
List thumbnails, Open Graph/Twitter/schema helpers, author avatars, Pinterest media, and blog presentation all use this decision.
params.ui.featured_image applies only to blogs and defaults to none. Page front matter or cascades can override it.
banner adds a figure above single-page titles. wash colors the header.
hero fills the shell background on single pages and section indexes.
Missing images and non-HTML outputs render no image.
An article mode re-encodes a processable image as WebP: banner crops it to 1600×900, hero resizes it to 1800 pixels wide and wash to 1200.
That image is the page’s largest paint, so it is requested with high fetch priority and is never lazy.
A row on a list or term page loads its thumbnail lazily, and a processable image is cropped to the row’s frame instead of sent as the original.
A term row keeps an image that is already no larger than its frame.
Outputs and runtime
Every base template sets Page.Store.tdOutputFormat:
Output
Contract
HTML
Complete semantic content; local runtime only for used capabilities
Print
Expanded content; no shell navigation, search, or zoom runtime; the shared action layer supports explicit print controls
Markdown / LLMS
Source-shaped Markdown without td- component markup
LLMSFULL
Opt-in per top-level section: one llms-full.txt per enabled section per language, that same Markdown concatenated in reading order
RSS
Safe static summary or explicit omission
NAVJSON
Opt-in per site: one navigation.json per language, serializing the navigation authority the sidebar and pager already read
BookManifest
Opt-in ordered JSON handoff for EPUB/PDF packaging tools
Output formats run in their defined order. A render keeps its mutable format state
stable for the whole output; summary helpers do not restore an earlier format
value into an RSS render.
Within Print, Hugo can render Book pages and overlapping aggregates in parallel.
A cached coordinator for each page creates plain and Book variants in a fixed order. Each caller selects its required form.
Plain Print keeps page-local headings and routed xref URLs. Book aggregates keep namespaced headings and in-document xrefs.
Relative content links resolve against each source page’s HTML URL before its body moves into Print.
This preserves language and deployment prefixes, query strings, and encoded paths in both single-page and aggregate output.
Only actual href attributes are rewritten; matching text in title or other non-link attributes is preserved.
Fragment-only links remain local for heading and footnote namespacing; canonical and external links keep their destinations.
Heading fragments are percent-decoded once for namespace lookup, including Unicode and encoded ASCII.
Literal plus signs remain plus signs; malformed escapes remain unchanged. HTML entities in IDs and attributes are decoded separately.
The path, query, and external origin are never changed by fragment normalization.
Rendered Markdown headings inside Tabs and other Markdown shortcodes receive the same namespace, even when Hugo omits them from Page.Fragments.
Their rendered heading IDs own the identity, preserving Chinese text, literal plus signs, and percent sequences without deriving IDs from escaped self-link URLs.
Configured RSS output on a Landing page generates a static feed through the shared RSS renderer.
An advertised alternate output must have a generated file; omitting interactive Landing components does not omit the feed itself.
Print is a browser-readable document before it is sent to paper. On screen,
wide tables stay inside labelled, keyboard-focusable scroll regions without
widening the page. Print-media CSS expands these regions for printing. This
requires no table runtime; RSS tables remain non-focusable static content.
Consumers opt into custom outputs. OINK does not force expensive Book aggregates.
HTML loads shared action and core layers, plus stable first-party capability chunks selected by page flags.
Templated capabilities publish at most one chunk per language. Flags select script tags and never create bundles for feature combinations.
Print keeps the action layer and only runtimes needed by rendered print features.
Large third-party UMD files stay separate. Unused feature runtimes remain absent.
A top-level section enables LLMSFULL by listing it in its _index front matter outputs.
The theme never adds it to site outputs. One renderer creates per-page Markdown and the bundle.
The bundle concatenates the same semantic Markdown, without td- component markup, in sidebar and pager reading order.
Enabling it below the top level warns and emits nothing.
Builds remain usable; the warning and absence of the disabled output are checked directly.
Site outputs.home enables NAVJSON. It publishes one navigation.json per language at the language root.
It uses the sidebar and pager authority: explicit data/docs_nav.json when present, or the weighted content tree otherwise.
Array order is the contract. weight is never serialized. The output is notAlternative.
The manually maintained schema/nav.v1.schema.json versions the format.
Edit it with its templates and checker. It is outside the generated configuration schema drift gate.
Both outputs default off. Sites that enable neither build byte-identically. bin/check-agent-indexes.py owns their checks.
BookManifest is disabled unless a Book root explicitly lists it in outputs.
It references existing per-page Markdown and records derived page order, headings, numbered targets, and xrefs.
The theme guesses no publication metadata.
The theme repository provides bin/book-epub.py and bin/book-pdf.py for explicit publication steps.
bin/check-book-epub.py and bin/check-book-pdf.py validate their artifacts.
The EPUB packager combines BookManifest with whole-Book Print HTML and accepts consumer metadata separately.
The PDF runner serves Print output at a temporary loopback address. It invokes an explicit Chrome/Chromium binary with script-src 'none' CSP.
It produces A4 pages with CSS page numbers.
The PDF server also applies a CSP sandbox, rejects meta-refresh navigation, and refuses symlinks outside the build tree.
Without network opt-in, image and media requests allow only the loopback origin and data URLs. This includes requests from CSS or SVG.
Both tools refuse missing resources and resources outside the build tree.
Network resources and output replacement each need a separate explicit flag.
Network opt-in permits only passive HTTP(S) media. Remote scripts and local-file schemes remain invalid.
Relative EPUB metadata assets resolve from the metadata file’s directory, not the working directory.
Ordinary Hugo builds run no publication steps. PDF remains derived from Print, rather than a separate template output.
Performance rules:
Do not walk .Site.Pages for every page if a site-level resource or partialCached result can perform the work.
Render .Content once. Read Page Store flags only after rendering it.
Emit correct markup. Do not scan the DOM to repair it.
Group browser work by resource URL, not DOM instance.
Keep ordinary outputs opt-in when their aggregate cost is material.
Emit no Speculation Rules by default. First, a named production consumer must measure Sec-Purpose: prefetch requests, useful navigations, bytes, and CSP impact.
Use a reversible moderate experiment.
Validate reachable author input. Do not validate hypothetical internal states.
bin/measure-baseline.py measures build time, output weight, bundle count, and
shortcode density.
Single-page Print emits the page description once. Section Print carries
mathematics capability from every included descendant to the aggregate root,
so a formula-free index still loads local KaTeX styles when a child needs them.
Formula-free Print documents do not load those styles.
Trust, CSS, and accessibility
Authors may enable Goldmark unsafe. Configuration and component parameters are not raw HTML.
The shared attribute policy uses an allowlist, validates class tokens, and passes data-* and aria-*.
It warns and removes style, srcdoc, on*, reserved attributes, and unknown attributes.
URL helpers reject dangerous schemes and protocol-relative URLs where local or explicit absolute URLs are required.
Promised remote URLs remain supported. They are never fetched at build time.
Fixed in OINK 1.3.0
Image and Gallery URLs are HTML-attribute escaped after URL validation,
including full-size Zoom sources. Quotes and ampersands remain part of the
URL; they cannot introduce attributes or be decoded as HTML entities.
Theme output uses td- classes, data-td-* attributes, and --td-* custom properties.
Author markers such as .steps, .cards, .full-width, .wide, and .expand remain unprefixed.
CSS supports RTL, print, forced colors, reduced motion, long tokens, and narrow viewports.
Theme decorative icons have aria-hidden. Only pages with task lists or raw authored Font Awesome elements load the authored accessibility repair.
Reading-container focus distinguishes pointer input from keyboard navigation.
A pointer-focused main region, table viewport, or code pre does not gain an outline merely when another key is pressed.
Tab, blur, or new non-pointer focus clears that exception.
Controls keep their focus styles. Scrollable containers keep tabindex.
The skip-link destination shows a local outline around its title instead of the whole article.
Forced colors retain keyboard focus indication. No global focus-outline reset is used.
Font roles are ui, body, heading, code, display, meta, brand, and print. They use --td-*-font-family properties.
An explicit fonts.ui changes interface text, prose, and headings in every preset, including Paper. An explicit fonts.body, with or without fonts.ui, supplies the prose face and the heading face unless fonts.heading names its own.
params.ui.typography accepts technical or system. Both are part of the one stylesheet and need no runtime.
Since OINK 1.6.0, the stylesheet is plain CSS and reads no consumer Sass variable (1.5.1 and older let legacy Bootstrap/Docsy Sass variables initialize these roles).
params.ui.fonts configures the same roles without an added stylesheet.
It names faces without loading them, so readers must have the family or the site must declare it through its own @font-face.
This key remains outside the network contract.
Values must use plain font-family syntax. The emitted :root block is reconstructed from matched parts.
Unknown roles or unsafe values warn and are individually removed.
The block follows the stylesheet, allowing authored faces to override presets at equal specificity.
Shells inherit site faces and define none of their own. Book numbers and captions use the prose face, not a technical face.
Accent roles are separate. Accent text, including links, external URLs, and inline code, uses the Bootstrap link family and --bs-code-color.
Theme colors never redeclare these properties. Inline code follows the visual preset: Slate keeps the crimson pair; Paper uses ink text on a quiet chip.
Accent backgrounds include selected rows, gray pointer-hover navigation backgrounds, hover washes, outline pills, rails, dots, chip hovers, and hovered card borders.
They also include share-button hover fills, selections, and focus rings.
These use --td-accent, --td-accent-rgb, and --td-accent-hover, which default to the link family.
These are the only properties emitted by params.ui.theme_color.
Shell text uses them too: active outline anchors and Book chapter headings under pointer or keyboard focus use the section color, not link blue.
theme_color and theme_color_dark accept #rgb/#rrggbb. Page front matter and section cascades override site values.
Unconfigured sites emit nothing. Unparseable values warn and keep the default palette.
Resolved colors below 4.5:1 against the theme canvas warn with a suppressible ID but are still emitted.
This check uses the site default preset canvas and is advisory. Only parse failures remove colors.
The light color is required. theme_color_dark without valid theme_color warns and is ignored.
A page therefore receives color in both modes or neither.
If dark color is omitted, the theme lightens toward white in 4% steps until it reaches 4.5:1 on the dark canvas.
Every emitted byte is formatted from parsed integer channels, never author text.
One resolver supplies page colors to both the head block and sidebar root switcher.
Visual presets
OINK 1.2.0 defaults to Paper. params.ui.preset accepts
paper, slate, and the explicit experimental presets github, ink,
news and terminal. Invalid and reserved names (folio, canvas) warn
and fall back to paper. params.ui.preset_menu defaults to false; true
offers Paper, Slate and the site default. A list selects available choices,
including experiments. A list must include the site default; missing it warns
and adds it. The menu lists presets in one order, whatever order a list gives:
Paper, Slate and GitHub, then Ink, News and Terminal, two rows of three in the
Style menu; the t key steps through them in the same order. There is no
page-level preset override.
Hugo renders data-td-preset and data-td-site-preset on every document root,
including 404 and print output. With reader choice enabled, an inline head
script validates td-preset before CSS loads. Selecting the default removes
that storage key. Invalid saved values are removed; blocked storage leaves
in-page controls usable and shows a non-persistence note. The storage event
synchronizes tabs. td-preset-change carries {preset, previous, stored}.
Mode remains independent: data-bs-theme, td-color-theme, and
td-theme-change retain their meaning. The browser chrome color follows the
resolved mode and preset. Without JavaScript, the site default light palette
renders; appearance controls require JavaScript.
All six presets are part of the one stylesheet. Slate retains the v1.1.0 base
palette selectors and values. Paper changes palette and selected component
rules without changing shell columns, breakpoints, or global spacing. Paper’s
canvas is warm #f7f6f3 with ink #21201c; its blue links (#2b5f8c, dark
#7db5e6) are also its accent, so selected rows, the outline cursor and
selections are blue. GitHub uses GitHub’s #ffffff and #1f2328 (dark
#0d1117 and #f0f6fc) with its link blue #0969da (dark #4493f8) as the
accent. Ink is the written page and News the printed one. Ink writes ink
#241a10 on paper #f3ead7 with vermilion #a8321b as its accent; the paper
darkens toward #e8dabd at the edges of the window. News prints press black
#161616 on grey newsprint #f0eee8 with one spot blue #1f4f7a for links
and accent, flat, with no radius or shadow. A dark
palette is not its light palette inverted: each preset has a night of its
own, and fonts never change with the mode. Paper keeps its warm dark grey
#161513, Slate its v1.1.0 navy and GitHub GitHub’s own dark. Dark Ink is a
sutra written in gold and silver: silver type #e3ddd0 with gold headings and
accent #dcb766 on indigo-violet paper #1b1730 that darkens to #120f22.
Dark News is the darkroom where the
paper’s photographs were developed: silver type #d8d6d1 on #0f0f0f, links
and accent in safelight orange #f2804a, and a faint glow of that orange in
one corner of the window. Ink and News name the extreme of their canvas shade
--td-preset-canvas-edge, and every text color clears AA there as on the flat
canvas. Dark
Terminal is a phosphor screen used with restraint: pale grey-green type
#c9d2cc on #050806, with phosphor green #3dff7a kept for headings,
links, the accent and the current row’s cursor bar, and amber #e5b45a for
heading marks, emphasis and quotation rules.
GitHub, Ink, News and Terminal set their accents through the optional
--td-preset-accent properties. A published theme_color replaces the
accent in every preset. Every dark palette redeclares every token of its
light palette, including nested dark islands.
Font roles have equal selector specificity: preset, then typography: system,
then the site’s own styles, then head-emitted params.ui.fonts.
brand controls the wordmark independently from display headings. Slate keeps
Inter. Paper uses local IBM Plex Sans for interface, prose and headings. Both
retain Chakra Petch for the wordmark and IBM Plex Mono for code. News sets
prose in a system serif and headlines in Times New Roman (Liberation Serif on
Linux) beside Songti’s heaviest weight, sets the interface, search, menus,
lists, table labels and the dateline in the same text serif, and sets the
wordmark as a masthead in Didot or Bodoni 72 where installed. GitHub uses GitHub’s system stack (-apple-system, BlinkMacSystemFont,
Segoe UI, Noto Sans, Helvetica, Arial) for every text role and GitHub’s code
stack (ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation
Mono). Ink is written by hand in one voice: Latin is Palatino everywhere
(Palatino Linotype or Book Antiqua on Windows, URW Palladio, P052 or TeX Gyre
Pagella on Linux), the page title and the Landing hero upright and sections in
its chancery italic; Han takes Kai in headings and in the interface, search,
menus and lists, and Fangsong in prose, or Song where Kai or Fangsong is
missing. The display role and the wordmark take the heading face; Arabic and
Hebrew headings reach Diwan Thuluth, Arabic Typesetting or Corsiva Hebrew by
glyph fallback. It has vermilion marks, underlined prose links, square
geometry and no shadows. Terminal uses IBM Plex Mono for chrome, headings and prose, teal
links, amber accents, 2 px corners and no shadows; its print role stays IBM
Plex Sans. System typography requests no bundled text face unless the site
explicitly overrides a role. No external font is introduced. Terminal’s
navigation density changes only on desktop; prose measure and mobile targets
remain unchanged. CSS heading marks have empty accessible alternatives and
are omitted in unsupported browsers. Explicit fonts.ui still supplies the
main face (including headings) unless a valid fonts.body or fonts.heading overrides it. See the
experiment record.
Han text uses fonts the reader already has; the theme ships no CJK file. Each
preset arranges the Chinese skeletons differently, and Latin and Han share a
class wherever they share a line: a sans beside Hei, a serif beside Song.
Preset
Latin and Han in prose
Latin and Han in headings
Emphasis and citation
Quotation
Paper
IBM Plex Sans; platform Hei
IBM Plex Sans; platform Hei
Kai
Text face
Slate
Inter; platform Hei
Inter; platform Hei
Kai
Text face
Ink
Palatino; Fangsong at size-adjust: 108%, or Song where none is installed, at 17 px
Palatino, italic for sections; Kai, or Song where no Kai is installed
Kai
Kai
Terminal
IBM Plex Mono; platform Hei
IBM Plex Mono; platform Hei
Text face, upright, accent color
Text face
News
System serif (Charter, Iowan Old Style, Cambria, Georgia); Song, at 17 px
Times New Roman; Songti Black, or bold Hei on Windows
Kai
Kai, with Latin in italic
GitHub
GitHub’s system stack; platform Hei
GitHub’s system stack; platform Hei
Kai
Text face
Three roles serve this: --td-emphasis-font-family for em, cite, dfn and
an i without a class, --td-heading-emphasis-font-family inside headings, and
--td-quote-font-family for blockquote. A [!QUOTE] callout body uses the
emphasis role. These roles are not params.ui.fonts keys; a site sets them in
its own CSS. Kai comes from OINK Kai, a local()-only face (Kaiti SC,
STKaiti, KaiTi) limited to CJK code points with size-adjust: 114%, declared
both normal and italic so Han is never slanted while Latin in the same phrase
keeps its true italic. A second pair of faces at weights 600 to 900 names only
installed bold Kai (Kaiti SC Bold, Kaiti TC Bold), so Kai headings and bold
Han emphasis draw a real bold; where none is installed that face never loads
and the regular face answers with a synthesized bold. Where no Kai is
installed at all, as on Android, the face never loads and the stack behind it
answers. Fangsong comes the same way from OINK Fangsong (STFangsong,
FangSong), limited to CJK code points with size-adjust: 108% and declared
normal and italic; Ink uses it for prose only. Chinese Windows carries Kai and
Fangsong; macOS readers download them; phones and most Linux systems have
neither, so Ink’s Chinese there reads in Song, or in the platform’s fallback
where no Song is installed by name, as on iOS. A local() alias also reaches
a downloaded face that WebKit hides from a plain family-name lookup. The Ink
and News heading stacks name Microsoft YaHei before serif,
so a Windows system without a usable Song shows a bold Hei; the Ink and News
prose stacks end in STSong and SimSun. These stacks have been reviewed on
macOS only.
Prose craft is shared by every preset. A bare <kbd> draws the keycap of
the kbd shortcode, and list markers use the tertiary ink; GitHub restates
both as GitHub draws them. Headings in a
Chinese, Japanese or Korean passage (:lang(zh), :lang(ja), :lang(ko))
have zero tracking; each preset’s negative tracking applies to other languages.
.td-content sets text-autospace: normal, and code, kbd and samp opt
out; paragraphs, list items and quotes use text-wrap: pretty. Browsers
without these properties render as before. Ink sets every heading at text
weight with a faint ink bleed: the page title upright, sections in the
chancery italic beside upright Kai, gold on the dark paper, under a deeper top
margin; Landing section titles are at text weight too. A section opens under a tapered brush stroke (a 2 px rule under
forced colors), hr is one short tapered stroke, and table and callout labels
are written in the heading face at their own case and weight. Chinese
strong in Ink prose takes vermilion emphasis dots instead of bold. The first
paragraph of a Blog post or Book chapter opens on a three-line initial in the
heading face and the accent ink. This includes a numbered Book branch bundle
with prose and no child index. Index pages keep a plain opening. The current
navigation row carries a vermilion dot. The paper’s shade and News’s glow are screen-only and yield to
the system canvas under forced colors. Ink quotes hang from a 3 px
cinnabar stroke that fades as it descends; Terminal quotes use its accent
rule. Both keep the rule in print and in a typeset copy, where Ink headings
are set in Kai. Terminal’s generated heading marks have weight 400 and
0.12em tracking. Dark Terminal adds faintly glowing green headings, a glow
on a link under the pointer, faint scan lines, the current navigation and
search row as a green cursor bar, and a syntax palette that keeps its parts
apart: keywords in phosphor green, strings in amber, numbers in cyan, names
pale, comments dim.
News sets the page title at its heaviest weight, tight, over a double rule;
the description below it becomes a deck, italic in Latin and upright in
scripts without an italic, and the date line an uppercase line in the
interface serif between hairlines. Each section opens under a thick-and-thin rule, hr is the
double rule, and the site header closes on a double rule like a masthead.
Tables stay open between an ink hairline above the labels and one below the
last row, with uppercase tracked labels. Quotations are pull quotes, a step
larger between a heavy rule above and a hairline below, with no side bar and
their start alignment kept. Callouts, search, menus and the Appearance panel
have square edges. Navigation controls, search keycaps, Landing tiles, article
actions, thumbnails and portrait frames use square edges without shadows.
File trees, tab titles and taxonomy counts follow the same rule. The current navigation row takes a black rule and
bold type instead of a tint. GitHub follows github-markdown-css 5.9.0 and
@primer/primitives 11.10.0 (both MIT): 16 px prose at line height 1.5,
semibold untracked headings with a hairline under h1 and h2, a chain-link
anchor before the heading on wide screens, grey code blocks (a titled block
is a framed file box), every table cell ruled with even rows shaded and the
table as wide as its content, a 0.25em hr, GFM alert colors on callouts, a
4 px bar on the current sidebar row and green primary buttons. Three GitHub
values move for contrast: the dark primary hover is #268838, the light
selected-tab underline #bc4c00 instead of a 2.15:1 coral, and the dark
focus ring keeps the link blue.
Links in running text carry a non-color cue in every preset. News, Ink
and GitHub use an underline at the weight of the surrounding text. In News
the underline is one pixel at half the link color’s strength and takes the
full color on hover or focus; in Ink it is solid in the accent ink under
ink-colored text, and in GitHub solid. Paper, Slate and
Terminal keep weight 600 without an underline.
Running text here means a paragraph, a table cell, a caption, or an item of a
list that has no class or is a .steps or task list. A list with any other
class is a component: its links, such as card titles, Book contents and file
tree entries, keep weight 600 and take no underline in any preset. Heading
anchors, badges, buttons and footnote references are excluded. Inline
code is weight 600 in Paper, Slate and Ink and weight 400 in News,
Terminal and GitHub, where a chip or a border already marks it; bold code is
600 everywhere. These
rules stay at element specificity, so the theme’s semantic code elements and
a site’s own styles still override them. Table cells use tabular numerals. The
table viewport rounds its top corners by 8 px unless a preset frames or squares
it. Dark mode sets grayscale font smoothing.
Paper section headings in OINK 1.4.0
Paper no longer draws a decorative line to the right of content h2 headings,
in either light or dark mode. Heading typography, spacing, anchors, and normal
wrapping are preserved. Site-authored heading borders remain supported.
Giscus auto palettes follow both dimensions; explicit Giscus theme or
light/dark stylesheet overrides remain authoritative. Print uses a light
preset palette on white paper even when the screen is dark. Mermaid and
ECharts continue to follow mode only; API widgets retain vendor palettes.
See the accepted decision and
local acceptance record.
Typeset copy
params.ui.rich_copy is a boolean, default true; front matter and section
cascades override it. Other values warn and keep the default. When it is on,
interactive HTML output loads js/chunks/rich-copy.js; print, Markdown, RSS
and LLMS output never do.
The runtime handles the copy event for a single-range selection that touches
article prose (.td-content). It writes text/html and leaves text/plain as
the browser’s own Selection.toString(). It does nothing, so the native copy
proceeds, when another handler already prevented the event, when the selection
is in a form field or editable region, when it lies wholly inside interface, or
when any step throws.
The HTML is rebuilt from the selected nodes, never from the browser’s styled
serialization:
Output uses only h1–h6, p, a, strong, em, del, u, mark,
sub, sup, kbd, code, pre, blockquote, ul, ol, li, table,
tbody, tr, th, td, caption, figure, figcaption, img, hr,
br and span. The only attributes are style, href, src, alt,
start, reversed, value, colspan, rowspan, and class="language-…" on a code block.
Copying several ordered-list items retains their original numbers, including when the selection starts midway through the list.
Links keep absolute http, https, mailto and tel targets; other
schemes become plain text. Images keep absolute http, https or
data:image/ sources.
Dropped: page-end blocks, article metadata, bylines, series strips, page
actions, breadcrumbs, heading anchors, footnote back-references, code
utilities, tab lists, buttons, forms, navigation, embedded frames, media,
canvases, SVG, and anything hidden, aria-hidden, visually hidden, not
rendered or not selectable. A closed disclosure copies its summary only.
Colors come from the --td-print-* properties: the preset’s light palette on
white in either screen mode. Only values that parse as a hex, rgb(),
rgba() or color(srgb …) color are used; anything else falls back to the
built-in palette. Sizes are pixels. No canvas color, custom property, rem
value or web font name is emitted.
A code block keeps its text, filename and token colors, without line numbers.
A light code surface takes the print code tint; a dark one keeps its own
background and ink. Callouts become quotes with a bold title and their tone
as the rule. KaTeX copies as its TeX source between $ or $$.
Inline whitespace collapses as CSS does, except that a source line break
between two Han, kana or fullwidth characters produces no space.
A selection inside one line of prose, one list item, one cell or one line of
code copies as bare markup without style, so it takes the destination’s
formatting. A selection that extends beyond the article copies the article
only.
--td-copy-heading-rule (under, over or none) and
--td-copy-heading-font let a preset place the second-level heading rule and
name a heading face for the clipboard. Ink uses over and Kai; Terminal uses
none and a platform monospace stack; News keeps the default rule and names
Times New Roman over Song; GitHub writes out the default under.
tests/js/rich-copy.test.js owns the serializer; bin/check-params.py owns
the setting; the documentation site’s rich-copy.spec.mjs tests real pages in
every preset. Paste results in WeChat, Word and other editors depend on
each editor’s own sanitizer and are not covered by automated tests.
Translation reader runtime
The sole setting is the boolean params.ui.compare, default false; a language
may override it. Invalid values warn and leave it off. Hugo derives candidates
from actual translation pages whose language also enables comparison, and emits
a small descriptor. The entry chunk loads the reader on demand; the reader uses
two same-origin HTML frames. No language combinations or new content outputs
are generated. The retained host makes three live documents. Per-viewer
preferences (last target and Sync) live in localStorage under
td-compare-reader, read and written inside try/catch; the restorable
session (target, Sync, visible pane, semantic bookmarks) lives in
history.state.oinkCompareSession on the reader entry only.
oink_compare_pane=1 activates the internal pane state only in a frame owned by
an open reader. Visiting that URL at top level leaves the normal page intact.
window.OinkComparePane is available before head hooks for custom scripts.
Pane state suppresses shell runtimes and shortcuts, search initialization,
comments and theme-managed analytics, while keeping content runtimes and styles.
bin/check-compare.py classifies every browser runtime as suppressed in panes,
running in panes, or host-only, so a new runtime must declare its pane behavior.
With comparison on, production builds render Google Analytics through the
theme’s pane-aware template instead of Hugo’s embedded partial; a site override
of google_analytics.html therefore does not apply. Frames isolate document IDs;
same-origin content remains trusted site content. Panes need frame-src 'self'
and same-origin framing. Normal canonical links remain the page identity. Print
and machine outputs contain no comparison controls or comparison runtime.
A pane is ready when its bootstrap reports DOMContentLoaded, not when every
image or embed has loaded; a slow resource never holds back or discards a
readable pane. An invalid document fails at its load event or the 15-second
document timeout. The iframe’s initial about:blank load is ignored, but a
document still blank at timeout fails. Browser geometry is measured at readiness and
invalidated on resize, the frame load event, font/image readiness and
disclosure/component layout changes (including td:tab-shown). User input assigns the
active pane; programmatic follower scrolls cannot take ownership. Animation
frames coalesce updates. Continuous owner scrolling is mirrored instantly per
frame, because restarting an eased scroll on every frame stalls the follower; a
single discrete jump eases when motion is allowed, and reduced-motion or
bookmark restoration uses instant positioning. Closing or
replacing a pane aborts its listeners, observers and load timeout. Native
dialog inertness contains host focus; child keyboard handling preserves nested
component and ARIA dialogs, and pane link handling supports SVG anchors. The reader’s history entry survives a reload or a
back/forward restore. The entry runtime binds restoration to that entry’s token
and verifies it again after loading the reader; leaving the entry cancels the
pending restore. Reopening preserves the token and does not write history.
History traversal finishes processing an explicit close or queued user reopen
before automatic restoration runs. Moving the language menu across the narrow
breakpoint preserves its focused control and open state after updating pane
visibility and inertness. The runtime captures focus before changing menu-host
visibility; media-query styles must not hide that host before the change callback.
Release states
Keep local validation, module tagging, consumer pin updates, and site deployment distinct during release workflows.
v1.5.1 review corrections
The v1.5.1 release retains Hugo Extended 0.168.0 and Go 1.27.3.
Validation reports must identify the actual toolchain and local module source.
Feeds sort by descending date before applying services.rss.limit, and undated
items omit pubDate. RSS summaries and page feeds can share a page Store within
the RSS pass. Summary rendering keeps that Store in RSS format state instead of
restoring stale HTML state, and preserves manual summary dividers.
Focus indicators use the current preset’s opaque link color. Navbar controls
and clipped code/FAQ containers retain visible keyboard focus. Forced colors
expose current navigation entries and the footer wordmark. Heading and field
self-links remain keyboard-reachable; print links retain their underlines.
The local Bootstrap RTL artifact supplies directional rules without replacing
the theme’s font roles. Prose list spacing does not apply to component lists.
The configuration schema accepts translation_notice as false or a nonempty
language-code string; the owning resolver checks that the language exists.
Pagination and breadcrumb labels are translated in all 32 locales. Thumbnail
alternative text uses the page title without an English prefix.
7.2 - Component contract
The maintainer contract for OINK authoring primitives, validation, Book and release behavior, and output degradation.
OINK 1.8.0 contract
This contract describes OINK v1.8.0.
The reader-facing Components section provides tutorials and complete examples.
This page defines the API and behavior used by those guides.
Authoring model
Use ordinary Markdown when one block with attributes can express the component.
Use shortcodes for compound bodies or information that Markdown cannot represent. There is no parallel component registry.
Native forms require:
The native timeline also needs Goldmark definition lists (markup.goldmark.extensions.definitionList), which Hugo enables by default.
Only {{%/* steps */%}} uses percent delimiters because its body belongs to the page outline.
Other shortcodes use angle delimiters. Compound bodies use content/render-block.html with a unique ID scope.
Shortcode and component captions, labels, titles, and names are plain text. Put Markdown in bodies.
Landing narrative fields have their own contract. Icons use one Font Awesome class pair.
Components expose safe classes and attributes. They do not expose arbitrary colors or inline styles.
Mermaid and local PlantUML share pan/zoom, fit, source viewing/copy and standalone
SVG download. Engines load and render only for measurable diagrams within 320px
of the viewport. Each engine loads once; both render serially on the main thread.
Hidden content waits until revealed, and obsolete theme results are discarded.
The viewer reuses rendered results, retains reading position, and supports touch,
keyboard, focus restoration and reduced motion. PlantUML retains Blob-image
isolation: its SVG markup never enters the live DOM. Source is escaped exactly
once, preserving arrows, quotes, ampersands and Chinese. Errors keep source
without blocking subsequent diagrams. Copy/export failures show feedback;
downloads report initiation only. Exports embed styling and reject external
resource dependencies. Ordinary browser printing keeps light Mermaid and
PlantUML pictures; dark Mermaid and unfinished diagrams use black-on-white
wrapped source, ready without asynchronous print-time rendering. Source
disclosures return to their reading state after printing; rendered results and
preferences are preserved. Dedicated Print, Markdown and RSS retain source fallback. See
Mermaid and PlantUML.
Explicit server mode retains its existing behavior.
Runtime behavior in OINK 1.6.0
Markmap 1 renders SVG text, with local MathJax for formulas and notes for
paragraphs, code and tables. Its renamed options warn instead of being silently
accepted. Dedicated Print retains source; ordinary browser print keeps rendered
SVG with black text. ReDoc 3 uses isolated local documents with telemetry off.
Mermaid 12 retains the previous theme/layout/look defaults. See the
dependency contract.
The text/background tokens become --mm-text and --mm-bg. SVG links have
accessible names; notes support keyboard opening and Escape with focus return.
Open notes follow appearance changes and stay out of browser print. A failed
note chunk restores that map’s complete source and focus. It unregisters that map’s note handler from the surface coordinator.
Note links use the article’s link color and have an underline.
Printing restores note focus afterwards, falling back to its marker if closed.
Asciinema keeps a recording link until its player mounts, including with
JavaScript disabled or an unavailable player bundle. Recording fetch/parse
failures restore the link and any focus held by the player.
Fixed in OINK 1.7.0
Asciinema markers="time:label, …" reaches the player as a list of
[time, label] pairs with trimmed labels, the only shape besides bare
numbers that the vendored player accepts. A label keeps its colons; a bare
time gets an empty label. Earlier output spread the pairs into one flat list,
which the player rejected, so any markers value left only the recording link.
Optional component presentation
OINK 1.4.0 supports the following opt-in presentation variants. See the
presentation examples.
Component
Native modifier
Full form
Divided card list
{.cards .td-cards-list}
cards variant="list"
Compact steps
{.steps .td-steps-compact}
steps variant="compact", with percent delimiters
Command strip
A one-line fence with {class="td-code-command"}
Existing code renderer; no new shortcode
Unrecognized variant values warn and fall back to the default layout. A command strip with multiple lines, line numbers (including site defaults), or collapse warns and uses the regular block, preserving every source line. Existing copy and wrap policies still apply. No new runtime or component registry is introduced.
Native and full cards share surface and title rules. Only cards with links receive hover emphasis; secondary body links remain operable above a stretched title link. Tabs have transparent individual backgrounds at rest, a subtle hover fill on hover-capable devices, and a thin underline plus link color for selection. Labels keep the same weight and position between states; keyboard focus remains a distinct outline. Native disclosures retain an independently operable summary. Copy controls preserve their target geometry and existing success/error semantics. Coarse-pointer copy and tab controls have at least 44px height.
Preset colors and font roles remain authoritative. Ink, News and Terminal keep flat surfaces and square/2px geometry. Print, RSS, Markdown, and LLMS keep the content and their existing output semantics; presentation adds no hidden content or extra controls to static output.
Field names use unboxed, emphasized monospace text in every preset, including Terminal, for both Markdown tables and full shortcodes.
Validation
Invalid author input follows the architecture contract.
Warn, then use the documented safe fallback or omit the component.
Do not combine named and positional forms.
Book target IDs match [A-Za-z][A-Za-z0-9_.:-]*. Book numbers match [0-9A-Za-z.-]+. Classes use token validation.
Hooks and shortcodes share one page target registry so collisions cannot produce duplicate output IDs.
URLs use content/url.html. Raw backslashes are invalid because browsers can interpret them as URL separators.
Images resolve through page resources, section resources, global assets, then static or explicit remote URLs.
Local rasters include intrinsic dimensions. SVG, static, and remote sources remain valid but cannot use Hugo image operations.
Resource metadata alt must be a string. Invalid values warn and are ignored, preserving authored alt text.
Empty tabs warn and emit no container in HTML, Print, Markdown, or RSS.
An xref without a usable target or with a missing target page preserves its
text without a link. If fig supplies both caption and title, the warning
and all outputs prefer caption.
Generic attributes on block mathematics do not enable Book numbering. Without
num, id and caption warn and are ignored; the formula stays unnumbered.
Component behavior
Callouts and tabs
Callout types are note, tip, important, warning, caution, success, danger, question, example, quote, and details.
- makes the callout initially collapsed. + makes it expanded.
Unknown types render as plain blockquotes, with their markers preserved and no JS.
social is also a callout type, but it renders a quoted-post card instead of a callout box; see Social.
Adjacent tabs group only when consecutive and of the same block kind.
group enables the hash #<group>-<value> and storage td-tabs:v1:<group>. Ungrouped tabs use neither.
In OINK 1.4.0, an initial fragment or hashchange targeting a panel
or a heading within it opens all ancestor panels from outside in before scrolling
to the target. Hash selection takes priority over saved preferences and
synchronizes named peers, but does not overwrite storage. Only explicit reader
selection persists; ordinary headings outside tabs retain native navigation.
HTML exposes all panels before JS. Print expands them. Markdown keeps authored source. RSS provides the rendered text summary.
Grouped tab IDs and local links remain unchanged in HTML and single-page Print.
Repeated groups and nested tab containers keep unique IDs within each page.
Multi-page section and whole-Book Print prefix generated tab container and panel IDs with the source page namespace and update their local links. Reusing a group across chapters must not send a tab link to another chapter. Cross-page links to ordinary HTML keep their destination.
Fragment rewriting accepts normal HTML attribute syntax and preserves text inside other attributes.
The full form supports arbitrary Markdown. tab.label is required. value is required exactly when the parent has group.
Orphan tab shortcodes warn and render nothing.
Steps, cards, fields, and tables
Native steps accept ordinary block content. Use shortcodes only when steps must contain percent-delimited containers.
Native cards use link lists. The full form adds bodies, badges, icons, and images.
Native fields use the first column for names, the last for descriptions, and middle columns for metadata through meta= or headings.
The full form accepts block descriptions. Use card and field only within their parents.
Field anchors use field-<name>, with lowercase punctuation runs replaced by hyphens.
Thus params.ui.typography becomes field-params-ui-typography. Duplicate anchors get positional suffixes.
field accepts id, which replaces the generated anchor.
An empty value, a non-string, or a value holding whitespace, quotes, <, > or & warns and keeps the generated anchor.
This includes leading and trailing spaces and Unicode whitespace anywhere in the value.
So does an id that another field on the page already uses.
Each anchored field carries data-td-search-entry with its plain name, from the shortcode and from a {.fields} table alike.
Local search records it as an entry of its page and opens it by name.
The table hook owns responsive wrapping and captions.
Captions have balanced inset spacing inside the frame, aligned with cell text;
an available corner action reserves space at the end of the inline caption.
.matrix makes the first
column row headers; .full-width widens the outer wrapper to the article width.
A table that is the sole content of a tab fills the panel edge to edge. Wide tables scroll inside the panel.
On screens, .wide opts technical tables into intrinsic sizing inside
that scrollable wrapper, preserving identifiers with overflow-wrap: break-word
and word-break: normal. Body cells have a soft max-width: 40ch bound so prose
wraps. Ordinary tables retain their existing layout. The modifier has no effect
on .fields, which renders a definition list, or on static and print output.
.fields cannot combine with matrix, full-width, numbering, or tabs; numbering
and tabs are also mutually exclusive.
.wide in OINK 1.4.0
The short author marker retains the technical-table layout introduced in 1.3.1
and compatibility with existing markup. It composes with .matrix and
.full-width; Markdown preserves the authored marker.
Table reading
.expand in OINK 1.4.0
Explicit opt-in for theme-rendered Markdown tables, independent of .wide.
Only .expand tables receive an HTML reader frame and load table-reader.js.
The runtime adds a direct top-right corner action, revealed on hover or keyboard
focus and visible on touch and in forced colors. It adds no above-table toolbar,
global setting, automatic size detection, or whole-table click handler.
.fields .expand warns and ignores expansion; layout markers, captions, numbering,
and tabs otherwise compose normally. Goldmark supports {.wide .expand} and
{class="wide expand"} with block attributes enabled and no intervening blank line.
One native modal moves the original table and scroll wrapper, keeping IDs, links,
selection, text size, row order, and native table semantics. Its title receives
initial focus; Tab stays inside; Escape and Close restore the original nodes,
inline/page scroll positions, and entry focus. Coordinated closes suppress focus
return. Plain captions remain native; numbered captions name the dialog and any
otherwise unnamed table while open. Single-row headers stick inside the viewport;
.matrix retains its existing row headers and pinned first column. There are no
sorting, filtering, density, export, or virtualization controls.
Missing JavaScript, blocked assets, or unsupported dialogs leave readable inline
content with no dead entry. Tables with references outside their movable subtree
stay inline; same-page links to outside targets restore the table before navigation.
Before browser printing, restoration is synchronous. Dedicated Print, RSS, Markdown,
and LLMS keep their existing content boundaries without reader UI/runtime. The
accepted decision records the rationale.
Images, Gallery, FileTree, and fences
The Markdown image hook is the ordinary image API. Inline images stay inline. Block images become figures with caption or num.
Only the native form supports image processing.
The full fig source form is a numbered container and deliberately excludes command/options.
For processed numbered images, use native block images with num.
Allowed image attributes are id, num, caption, width, height, link, command, and options, plus shared safe attributes.
command and options must appear together. They use Hugo Fit, Resize, Fill, or Crop on processable local resources.
Plain linked images use Markdown syntax. The link attribute therefore requires a caption or number.
Linked and decorative images do not load Zoom.
Zoom triggers keep image alt text and the localized preview action in their ARIA accessible name.
They insert no helper text into articles.
Plain-text or rich-HTML copying must not add preview instructions, even if the editor removes theme styles.
Authored images and captions remain intact.
When Draw.io and Image Zoom share an image, Edit and Zoom remain separate sibling buttons.
The editor control supports keyboards and stays visible on touch devices and in forced-colors mode.
The Draw.io editor opens in a modal dialog with a localized host Close button. The button, backdrop, editor exit message, and Escape while focus is in the host dialog dismiss it, release its message listener, and restore focus to Edit. Cross-origin iframe keystrokes belong to the editor and cannot bubble to the host; users can leave the editor’s Tab sequence to reach the host Close button. Opening another editor starts a fresh session.
Gallery accepts one Markdown image per line with optional description, link,
and class. FileTree accepts indentation, - name, optional /, comments, and
validated icon/tone/open/type attributes. FileTree fence wrap accepts true
or false, defaults to false, and changes only screen comment layout: true
wraps comments, including unbroken tokens, while rows grow from their existing
minimum height. Filenames retain ellipsis. Missing or false values preserve
compact desktop/tablet rows; mobile stacking, divider controls, directory
folding, and expanded Print output keep their existing behavior. Invalid values
warn and fall back to false. Markdown
preserves explicit wrap values and tree source; Print renders expanded static
figures and trees.
All code highlighting uses Chroma.
Common fence attributes include title, copy, wrap, collapse, label, id, line options, tabs, and Book num/caption.
Copy returns authored source.
Mermaid palettes follow light/dark mode, independently of visual preset. The default dark edge-label background is #404040 for AA contrast with its label text; explicit params.mermaid.themeVariables values retain priority.
ECharts uses declarative JSON/YAML. Callbacks use $fn:<name> from window.OinkEchartsFunctions. Embedded scripts are never executed.
Available since OINK 1.7.0
A fence theme other than ECharts’ built-in dark names an entry of
window.OinkEchartsThemes, an object of theme name to ECharts theme object.
The engine loads only when a chart comes due, so a site script has no
moment to call echarts.registerTheme(); the runtime registers every object
entry immediately before each chart initializes and ignores other values.
This registry is the supported registration point. An entry named dark
also replaces the palette that unpinned charts use in dark mode, and an
undefined name draws with ECharts’ defaults without a warning.
In OINK 1.4.0, Infographic SVGs scale with their container width,
including orientation and shell layout changes, without repeated DSL rendering.
Initially hidden containers wait until measurable. Fence height and full
keep their existing meanings.
Transparent Infographic output receives a white canvas; an explicit DSL background
sets the canvas instead. Site light/dark changes leave authored light, dark,
hand-drawn, palettes, and SVG styles intact. The default dark text therefore
remains readable without recoloring author content. Authors remain responsible for
contrast when explicitly choosing transparent backgrounds or custom text colors.
Markmap node text on screens follows the article text color (--bs-body-color)
via --markmap-text-color, dynamically adapting to light/dark mode changes,
style presets, and restored user preferences to maintain contrast. Printing
retains Markmap’s default dark text on the white canvas. This mapping is scoped
to article content across both the wrapper and generated SVG, and can still be
overridden by site CSS of equal specificity or SVG inline tokens. (Added in OINK 1.3.1.)
In OINK 1.4.0, Markmap fits on first measurable display and container
resize, including hidden panels when revealed. Reader pan/zoom suspends automatic
fitting so layout changes preserve their view. Quiet, borderless bottom-right
icon controls provide keyboard-accessible Fit to window (restoring the
whole map and resuming automatic fitting) and Download SVG (exporting a
self-contained SVG with resolved theme tokens and canvas background). Layout
fits do not animate; reduced motion also disables node transitions. The
controls are omitted from print. Source normalization removes surrounding blank
lines and common indentation before parsing, preserving YAML options and
outline levels.
Mathematics uses Hugo’s build-time KaTeX output and local CSS, without a browser mathematics runtime.
HTML and Print use the vendored stylesheet and preserve MathML and authored TeX.
Validate mathematics with the installed Hugo, as the architecture contract describes.
OINK 1.6.0 renders Markmap formulas on demand with local MathJax (1.5.1 and
older used KaTeX inside Markmap).
In OINK 1.4.0, numbered equations reserve readable formula space based
on the available column width, including columns narrowed by a sidebar or TOC.
Captions move below the formula when they do not fit beside it; long words wrap.
Number-only captions, MathML, and TeX remain available. Print gives the formula
the full reading width and places the caption below it. Long captions must
neither squeeze the formula to zero nor widen the page.
Swagger and Redoc accept HTTP(S) specification URLs or paths rooted under static/. Neither resolves page resources.
Redoc handles paths with or without leading slashes identically and joins local paths to baseURL.
Only HTML is interactive. Print, Markdown, and RSS provide static specification links.
Timeline, updates, media, social, and maps
Available since OINK 1.7.0
Timeline, updates, video, audio, social, and maps ship in 1.7.0.
OINK 1.8.0 adds the themed .td-media__controls bar for audio and video and uses the > [!SOCIAL] callout form for quoted posts.
A definition list followed by {.timeline} is a timeline: terms are markers in free text, definitions are events with block content.
Goldmark emits the <dl>; the theme adds only CSS scoped to .td-content dl.timeline, with a marker column on wide screens and one column on narrow viewports or inside .td-content-card containers.
Hollow nodes read --td-timeline-surface so they blend with callouts, cards and tab panels, and the rail uses --td-brand-line-strong for consistency with the Landing timeline.
Print maps the timeline to the paper palette tokens (--td-print-ink, --td-print-meta, --td-print-table-line, --td-print-quote-line) regardless of screen color mode and avoids page breaks inside definitions.
Build-time checks in content/check-timeline.html warn with the page path when {.timeline} is detached by a blank line, lands on a non-<dl> block (including when definitionList is disabled), or when a callout header is swallowed into <dl><dt>; bin/check-site-markup.py validates markup.goldmark.extensions.definitionList: true.
The checks match the exact timeline class and skip literal examples in code fences of any length.
Because Hugo has no <dl> render hook, attributes on <dl class="timeline"> (like .steps) rely on Goldmark’s default filtering, which strips on* handlers but passes style.
A heading marked {.update} is a changelog entry. It also accepts string date (YYYY, YYYY-MM or valid calendar YYYY-MM-DD, rendered as <time datetime>) and string tags (comma-separated plain text accepting , and ,, rendered as neutral chips).
The heading itself is unchanged, so its TOC entry, anchor, search section and Print ID behave as for any heading; a td-update-meta line follows it with <span class="td-update-sep">, </span> separators between items. The line is inline flow, not flex, and the separators are in-flow text set to font-size: 0 without user-select: none, so plain-text copy in Chromium, Firefox and WebKit, offline search (offline_search_index: content), RSS readers and the accessibility tree all keep tokens distinct; flex items are blockified and broke or glued the copied text.
Invalid calendar dates and non-string date or tags values warn with the page path and are dropped while keeping the heading and any remaining valid metadata; date and tags without the marker are unknown attributes.
An unquoted full date such as {.update date=2026-11-01} makes Goldmark drop the whole attribute block and leave it in the heading text; render-heading.html warns whenever a heading’s text ends in an unparsed {…} block containing .update, with or without a leading #id ({.update date=2026-11-01} or {#v1-6-0 .update date=2026-11-01}), that the attributes were not parsed and stay in the heading text, and asks authors to quote every value.
Goldmark gives every heading an id attribute, so render-heading.html takes a fast path, skipping the attribute partials, when that id is the only attribute; its output is byte-identical to the full path.
Update styles live in assets/css/td/update.css, using :has(+ .td-update-meta) and the items’ own block margins instead of negative margins, mapping print rules to --td-print-* tokens regardless of screen color mode, and suppressing h2.update bottom rules in print; rich-copy.js formats .td-update-meta as separated metadata on the paper palette.
A block image whose destination is a video or audio file, or a YouTube, Bilibili or Vimeo URL, is media (content/media.html).
Files are recognized by the Hugo media type of a resolved resource, otherwise by extension; resolved local resources preserve query strings and fragments (such as #t=30,60). Images, the warning for other non-image resources, and the lookup order are unchanged; content/resource-lookup.html now holds that order for both resolvers.
Video accepts caption, num (a Book fig target), id, poster, track (one WebVTT file in the page language; local resources preserve query strings, and a remote track URL sets crossorigin="anonymous" on <video>), autoplay, width and height (required as a positive-integer pair; sets the box aspect ratio without replacing the poster <img>’s intrinsic dimensions). Audio accepts caption, id and preload (metadata or none; the first six audio players on a page default to metadata and the seventh onward to none, counted in Hugo’s render order: players written directly in the page first, including those in a [!SOCIAL] callout, then players inside shortcode bodies (tabs, include, cards); an id that another unnumbered audio or video figure or a numbered Book target already uses warns and is dropped from whichever comes second, in either order; heading and plain image IDs are not compared). Audio figures omit .td-figure, display bracket text as a visible title, and bind <audio> via aria-labelledby (and aria-describedby when captioned), with generated IDs scope-rewritten inside content/render-block.html.
autoplay=true emits muted loop playsinline without the autoplay attribute; js/chunks/media.js plays the video while at least half of it is visible, never under reduced motion, and pauses it off-screen. The control row always remains. On pages with two or more <audio> or <video> players, js/chunks/media.js also enforces single-active playback: a player that becomes audible, by starting with sound or by being unmuted while it plays (play and volumechange, both in the capture phase), pauses every other audible player, and opening an enabled platform card silences audible local players before mounting the iframe. Muted or zero-volume players, including autoplay loops and authors’ own muted loops, neither interrupt nor get interrupted, and cross-origin platform iframes cannot be paused by local players later. Every HTML page with a file player loads the shared media runtime and a data-td-media-config JSON block of localized control labels (ui_media_*). The runtime removes controls from each file player and inserts a .td-media__controls group after it, named by the audio title or the video’s aria-label and kept dir="ltr" on RTL pages: play/pause, elapsed time, one seek range, duration, a speed button cycling 1×, 1.25×, 1.5×, 2× and 0.75×, a mute button with a volume range that unfolds on hover or focus (hidden on coarse touch pointers), and, for video, a captions toggle when a track exists and full screen on the figure (or the native player where only webkitEnterFullscreen exists). Clicking the picture toggles playback. The seek range is a single track whose background stacks the played fraction (--td-media-played, in --td-media-fill, which defaults to --td-accent from the preset or the page’s theme_color/theme_color_dark override), the buffered ranges (--td-media-loaded, in --td-media-buffer) and the unloaded track (--td-media-track); played time keeps at least 3:1 against both neutrals in every preset and mode. Presets set only the bar’s thickness and corner shapes and the buffer tint (Paper and Slate a pill, GitHub 8px, Ink and News square-cut, Terminal a block cursor over accent-tinted buffer). Arrow keys seek 5 s, Page keys 10 %, Home and End the ends. A narrow row puts the bar on its own line. Without JavaScript the native controls remain. Site single-key shortcuts yield while focus is in the control row. Print hides the row; forced colors draw the bar in Highlight, GrayText and Canvas with the handle always shown.
A platform URL renders a link card (YouTube /shorts/ defaults to 9:16 when no poster or size is given; empty platform names fall back to the watch URL; Draw.io skips images inside a.td-media-card, img.td-social__avatar, and img.td-map__thumb, and still probes other linked images). The card carries its ratio as --td-media-ratio; media.css derives the box ratio and a min(100%, 80vh × ratio) width cap from it for the card and the player that replaces it, and where container units exist the ratio is a minimum height measured from the figure, so a wrapped title grows the card in every engine. For platforms listed in params.video_embeds, a plain click loads a sandboxed player iframe (allow="autoplay; picture-in-picture; fullscreen", sandbox="allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox") whose URL the theme derived from validated IDs (youtube-nocookie.com, Bilibili with danmaku=0, Vimeo with dnt=1, supporting youtube-nocookie.com, music.youtube.com, player.vimeo.com, Vimeo ?h=/#t=, b23.tv/BV…, Bilibili embed-code player.bilibili.com/player.html?bvid=…|aid=…, and decimal leading-zero timestamps). A start time that is neither seconds nor 1h2m3s form, such as t=1:30, warns and starts at 0. A Bilibili embed URL with a positive decimal cid retains that part ID in the player. Otherwise p selects the part. The player loads on activation. An authored poster loads independently from its own URL.
Inline media render as links. Dedicated Print receives static figures with visible .td-media__link URLs (including platform watch URLs); browser printing of the HTML page reveals the screen-hidden .td-media__url line instead, with paper-palette resets in @media print regardless of screen theme and a fallback that survives iframe replacement; RSS renders video/platform static figures (with watch URLs and true poster dimensions) and links the audio title directly to the absolute file URL; Markdown keeps the authored line; rich-copy.js keeps start alignment and the clickable recording URL (avoiding duplicate links on unclicked platform cards while keeping the fallback URL after click). Media figures without .td-figure keep 1.5rem/1.75rem margins through :where(.td-media):not(.td-figure), one class of weight above Bootstrap’s figure reset. Consecutive audio figures (16px apart) and an immediately following .td-callout--details transcript (8px) use :has() positive margins so each audio-transcript pair groups visually tighter than adjacent pairs (24px).
A > [!SOCIAL] callout quotes a post from the page alone (content/social.html, reached from render-blockquote-alert.html before any callout-box logic).
The title is the identity line, rendered as written: Goldmark’s inline Markdown stays, and each code span becomes <span class="td-social__handle" dir="ltr">, the LTR-isolated handle; the plain text of the title supplies the drawn initial and the author context of the original-post link.
Block attributes under the callout carry avatar, date, url and platform (x, bluesky, mastodon, threads, weibo, zhihu, telegram, linkedin, none); content/attributes.html validates them, passes class, data-* and aria-* to the figure, and warns on other names. The hook has no parent context, so platform defaults to none at every depth and selects the icon and the platform name announced to assistive technology and written into RSS. A + or - fold marker warns and is ignored.
avatar passes parameter="avatar" through content/image-resolve.html and, when the project’s own static/ directory exists, warns offline with the suppressible ID social:avatar-static when the decoded, cleaned static path is missing there (module mounts and a custom staticDir are not visible to the check); a static path that climbs above the site root with .. always warns with the same ID and is dropped, so the card draws the initial instead. An explicit remote avatar or attachment URL is requested by the reader’s browser at display time.
date emits <time datetime> only for YYYY-MM, or YYYY-MM-DD with an optional HH:MM[:SS] and optional Z or ±HH:MM, on a real calendar day, and <span class="td-social__date"> otherwise; url adds rel="external" only for external schemes.
The body is the callout’s page Markdown, so images (with Image Zoom), footnotes, a gallery fence (in a compact card grid matching the active preset’s radius) and a nested [!SOCIAL] compose in it; a nested card is styled by the .td-social .td-social descendant selector. HTML isolates LTR handles and ISO timestamps under RTL, maps @media print to --td-print-* tokens regardless of screen color mode, and adds author context to the original-post link.
Markdown and LLMS keep the source callout and its attribute line; RSS writes the handle as plain text in the attribution line and omits empty <blockquote> on link-only cards. Social citations and map place links in a feed resolve query-only and fragment-only references against the source article’s HTML permalink.
Without a title, a body renders as a plain blockquote whose url survives only as cite while date, platform and avatar are ignored (and an empty body with url renders a blockquote link with one warning); without a body or url, nothing renders. There is no social shortcode (calling one fails as a missing template); bin/migrations/oink06.py migrate --only social converts legacy shortcode calls into > [!SOCIAL] callouts. Hugo’s embedded x shortcode is not overridden.
A map fence holds a YAML or JSON list of places (name, lat, lng, text, image, link), parsed as YAML by name rather than by content sniffing. Its attributes are caption, route, zoom (whole number 1–22 without leading zeros), height (a positive px, rem, em, vh or vw length; a percentage, which resolves to nothing in the figure, or a zero length warns and keeps the default), id and the adjacent-tab keys. Hugo consumes style and strips on* attributes before the render hook, so those are ignored without a warning; other unknown names, such as num, warn. A list with no valid place, including [], warns and renders nothing.
Only {s} may vary in a tile host, including the dark host. Keyboard activation keeps focus on the load button until the engine settles. If the reader moves away, mounting preserves their new focus. If a focused map fails, its first coordinate link receives focus. Markdown and LLMS preserve the authored fence. HTML, Print and RSS render the numbered place list with space-separated LTR-isolated OpenStreetMap coordinate links (decimal formatted without scientific notation), rel="external" on external place links, and decorative thumbnails placed after the place text in DOM order; non-string name or text fields warn instead of stringifying. When params.map is complete (enable: true, tiles accepting {s}, {r} and {-y} and warning on any other placeholder, which Leaflet would throw on, required plain-text attribution, plus optional attribution_url, dark_tiles, subdomains, max_zoom 1–22 without leading zeros, and loading: lazy | click; surrounding whitespace in tiles, dark_tiles, attribution_url and subdomains is trimmed, an unknown key such as maxZoom, which Hugo lowercases, warns, and a subdomains that is not a quoted string, as when YAML reads unquoted digits as a number, warns and leaves Leaflet’s default), HTML adds a canvas and the validated places as JSON, with each popup thumbnail’s width and height; content-components.js (deferring until DOMContentLoaded after tabs.js hides inactive panels) loads the vendored Leaflet engine and stylesheet only on those pages. Its shared loader mounts a map when it is on screen, within 320px below the viewport, or anywhere above the reading position, so a reader who opens a link to a later section gets the maps above it at once instead of having the text pushed down later; only loading: click requests nothing before the button.
The map keeps scroll-wheel zoom off, starts with drag off because Leaflet reports touch on every Pointer Events browser and turns it on for a mouse or pen and off for a finger so one-finger page scrolling is never trapped, yields keyboard-nav.js single-key shortcuts while focused inside the canvas, respects prefers-reduced-motion, frames multi-place fences with explicit zoom via a single setView on the bounding-box center to avoid a wasted tile wave, uses numbered HTML markers with aria-label names, builds popups and optional linked attribution via DOM APIs (textContent, validating href schemes and setting rel="external" on external place links), lays out .td-map__popup as a block with overflow-wrap: break-word and resets text-wrap: inherit on popup paragraphs so Leaflet’s white-space: nowrap shrink-to-fit measurement sizes bubbles up to min(18rem, calc(100vw - 5.5rem)) instead of collapsing onto narrow titles, moves focus into a popup opened with Enter and returns it to the marker when Escape or the close button closes the popup, pans to a place and opens its popup when its list entry is clicked, dims light tiles gently in dark mode without inverting colors, falls back to those dimmed light tiles when every dark tile fails, and hides the canvas if Leaflet or all light tiles fail, removing the Leaflet map only after Leaflet finishes dispatching the failing layer’s load. Under loading: click the load button names every host the map may contact ({s} as *, the dark_tiles host included, isolated left-to-right) and moves focus into the mounted map if the button still has focus. Invalid places (including NaN/Inf coordinates) warn and are skipped; browser print hides the canvas and uses print ink tokens, and rich-copy.js omits the canvas, aligns map and social figures to start, drops decorative social avatars, and places map thumbnails on their own line.
Book
The book type extends the docs shell and follows the content tree or data/docs_nav.json.
book_number, book_part, book_kind, and book_status are presentation metadata. They do not change Hugo publication state.
Numbered kinds are fig, tbl, eq, and eg. Their default ID is <kind>-<num>.
eg requires a caption. eq without num is an unnumbered display formula.
xref names exactly one kind with optional page/anchor, or an anchor with explicit text.
Numbered examples have one framed body and caption.
Footnotes belong to the page document. Native numbered tables and fences keep them there.
Shortcode bodies are separate Goldmark documents, so footnote references in tbl, eg, fig, card, tab, field, or include warn and remain literal.
The check ignores text that has code syntax.
book-toc follows navigation order at depth 1–3. Each of the four book-* indexes collects one target kind.
Single-page Print keeps ordinary heading, footnote, and tab IDs exactly as regular HTML renders them.
Multi-page section and whole-Book Print rewrite cross-page links and namespace page-local headings, footnotes, and generated tab IDs to prevent collisions.
Local heading links match after one URL-fragment decoding step, so ordinary Markdown links to Unicode headings retain their target in an aggregate.
Each numbered figure, table, equation and example keeps its ID in chapter HTML, single-page Print and whole-Book Print, including targets inside shortcode bodies. If two definitions on the same page use the same ID, the build warns and the first definition keeps it.
Consumers opt into these potentially expensive aggregate outputs.
Consumer-authored raw HTML anchors and custom shortcode IDs remain global by default.
Add the boolean data-td-print-local attribute to an element with an id to declare a page-local anchor.
An aggregate namespaces that ID and its same-page links; ordinary HTML and single-page Print retain the original ID.
This lets legacy aliases and custom shortcode headings keep their existing deep links while remaining unique across aggregated chapters.
Unmarked authored IDs must remain unique within their aggregate.
Release and download
Release front matter uses one release_url matching https://github.com/<owner>/<repo>/releases/tag/<tag>.
The URL supplies owner, project, and tag. The page supplies the date. No remote release state is fetched.
Removed release, release_products, and release_group_by_product warn with their replacements. They provide no compatibility path.
The section index lists every page. It uses parsed project tag when available, otherwise the page title.
For layout: releases, HTML keeps this release index; section Print aggregates the full release bodies with chapter-local IDs, in both development and production builds.
Checksums accept canonical lines or one source resource, never both. Filenames cannot be paths.
HTML adds local copying. Static outputs show complete hashes.
Downloads use data/download/<key>.yaml. Channels are rolling or pinned.
Only pinned URLs and commands interpolate ${version} and ${tag}.
Before publication, rolling channels remain usable, while pinned channels show pending.
Markdown renders the complete channel list. RSS omits the component.
Switching tabs remeasures collapsible code blocks in the newly visible panel.
Their expand and collapse controls remain usable after fonts settle and when
ResizeObserver is unavailable.
Verification
The architecture contract defines shared output rules. Component-specific exceptions appear above.
Markdown and RSS set no browser runtime flags. Print keeps only flags required by rendered print features.
Source checks cover parameters, hook policy, runtime isolation, and migration.
Output checks compare HTML, print, Markdown, RSS, and LLMS goldens. Browser tests cover interactive features.
See the migration contract for migration rules.
v1.5.1 review corrections
The following corrections shipped in v1.5.1 and are part of the current consumer contract.
Named-parameter shortcodes reject positional arguments with warnings and
continue the ordinary build. Invalid input checks require a successful build
and verify the safe output, rather than accepting either exit status.
Invalid or missing Book numbers retain unnumbered readable content, without
empty fig-, tbl-, eg-, or eq- targets or figure-index registration.
Generated IDs include the complete shortcode ancestry. Independently rendered
Markdown bodies namespace generated code, chart, FileTree, and field IDs along
with their references; authored code IDs remain intact.
RSS renders static HTML for Book figures, tables, equations, examples, links,
contributors, specification links, recordings, and checksum tables. It does
not expose their Markdown source or browser controls. Release assets retain
their documented RSS omission. The RSS check uses the ordinary section feed.
Copy feedback uses aria-disabled with an operation guard, preserving keyboard
focus while preventing duplicate clipboard writes.
7.3 - Shell and navigation contract
Navigation authorities, immersive blog presentation, search, actions, taxonomies, indexes, and page-end composition.
OINK 1.8.0 contract
This contract describes OINK v1.8.0.
Authorities and navigation
Concern
Authority
Global navigation
Hugo menus.main
Docs / Book sidebar and pager
content tree or data/docs_nav.json
Root switcher
resolved top-level content roots
Discovery
per-language local search index
Page and Palette actions
shared action registry
No feature adds another menu or page tree. One menu child level is interactive.
Deeper levels warn and flatten below linked group headings.
External links use target="_blank" rel="noopener noreferrer". Internal links retain language and deployment subpaths.
Desktop and drawer navbar views use the same tree. Every dropdown has one moderate-width column of icon and title rows.
The mega panel and its columns menu parameter are retired. Configured columns warns and keeps one column.
Menu descriptions remain configuration data only.
The link tree stays on a single line and never wraps; it stays centered when space allows.
From lg upward, entries show icons and labels while horizontal space permits.
When the row cannot fit every entry beside the brand, fixed desktop sidebar, and utility controls, entries that define an icon automatically collapse to icon-only mode (data-td-nav-compact="icons"), while entries that opt out of icons (params.icon: false or "none") keep their single-line labels.
Below lg, icon-bearing entries use icon mode by default, and at phone widths the bar reserves the brand and utility controls’ widths before centering, so a longer menu cannot overlap the search control.
At any width where even collapsed entries do not fit, trailing entries fold into a … overflow disclosure (ui_nav_more) whose panel restores their full icon, label, and child hierarchy.
Between lg and md, the end edge keeps search, version, language, theme, and GitHub controls without a menu button.
Below md, appearance stays beside search and the drawer entry; version, language, and GitHub move to the footer dock.
Home and explicit Landing pages add a drawer control beside search, opening the complete labeled tree.
Shell pages with sidebars use the sidebar drawer control in that position.
Explicit Landing layouts use only the Landing drawer, including pages whose
content type is Book or Docs. A page never renders both drawer controls.
The navbar loads its drawer runtime even when a site supplies a custom homepage
or Landing body without the theme’s section renderer.
No drawer button appears from md upward.
The stock 404 page has no reading sidebar and never advertises its drawer, even when a root cascade assigns it a Docs or Book type.
Adding a custom type to shell_types recognizes its shell capabilities; it does not create a sidebar in a custom template. Full-width custom pages without a sidebar set sidebar_enabled: false.
Language links target the page translation or the language home.
Links stay relative for languages sharing a host/base path. They become absolute only for language-specific baseURLs.
hreflang stays absolute and lists only actual translations. It never includes the switcher’s language-home fallback.
Paginated blog indexes have their own canonical URLs; later pages omit cross-language alternates because translated archives can have different page boundaries.
navbar_autohide applies only to fine pointers from 768px. It never applies at touch or drawer widths.
The hidden bar keeps its reserved space, and a pinned bar occupies exactly that space, including its rule.
Revealing fades the bar in place without covering resting content. Hero pages use their overlay navbar instead of this policy.
The homepage shares their soft boundary: a short background wash below the bar replaces the bottom rule and scrolled shadow.
Sidebar and pager share the navigation root and order.
manual_link, build.render: link, dividers, hidden nodes, and placeholders keep their documented behavior.
sidebar_icon_policy accepts all, the default, groups, or none. Icons use one Font Awesome class pair.
Invalid policies follow the shared warning and fallback contract.
At sidebar_cache_limit, both walkers may reuse neutral markup only for the same language, root, and effective settings that affect output.
The markup stays visible without JavaScript. The normal shell runtime adds the active path.
Book pages with sidebar_headings remain page-specific and bypass the shared tree cache.
Below the limit, the content-tree walker renders a branch the current page is not in once,
and reuses it wherever it appears at the same depth with the same effective settings.
No row in such a branch is active, on the active path, or carrying Book headings.
Output is unchanged, and the active state is still rendered at build time.
Root candidates are linkable, non-divider top-level sections, followed by sections with sidebar_root_for: self.
Candidates are deduplicated by URL. Both sources honor sidebar_root_menu: false. Absent or true values preserve inclusion.
The current resolved root is appended even if excluded from global choices.
Zero entries render no control. One entry renders a static link.
With multiple entries, the button’s accessible name starts with its visible
section title, followed by the localized prompt to choose a section.
Every URL keeps language and deployment prefixes.
Dividers and sections with build.render: never cannot be switcher links.
A sidebar_divider leaf keeps its static heading.
Divider sections keep children in both sidebar walkers. Their label is not a link.
When folding is enabled, they have a real disclosure button.
Dividers never become pager targets. Children keep their positions.
Use build.render: never to omit the divider section’s outputs without hiding descendants.
Breadcrumbs show its label without a link. Search omits it. Navigation JSON promotes its children. Print keeps child documents.
Book TOCs keep the group label and child links, but omit headings from the unpublished group body.
toc_hide still hides the whole subtree. It is not a grouping option.
Explicit navigation keys are independent of language and deployment paths. Rendered links retain both prefixes.
The sidebar, pager, and navigation JSON select explicit sections by the resolved
page identity. A node belongs to a root when it is that root, a content
descendant, or a Docs/Book page that resolves to the same sidebar root. This
lets a manual keep files at the content root while the Docs section owns its
navigation. The selected node’s children define its navigation hierarchy;
they need not be physical content descendants. Custom url values do not
change ownership. A tree for Docs does not replace a separate Book root, or
vice versa; a nested sidebar root selects its own branch. Roots absent from
the explicit tree use the content tree.
Only section-root Docs/Book navigation evaluates the explicit tree. Home-root
navigation and other shells ignore it, including its warnings. An explicitly
empty sections array warns and falls back only where that tree applies.
Uncached explicit sidebars mark the current page and expand its authored
navigation ancestors from the resolved page identity, even when a node omits
url or the page has a custom URL. Listed physical ancestors still expand
when the current page is absent from the manifest. Legacy URL and active-path
hints remain supported.
Both authorities remove toc_hide subtrees.
Navigation JSON keeps manual_link_relref as an internal link to its resolved destination, not a page identity.
Book headings and responsive outlines
params.ui.sidebar_headings defaults to false. Book pages show the page tree
in the left sidebar and the page outline in the right rail. Set
sidebar_headings: true (h2 only) or 2, 3, 4 (deepest heading level) to add
headings below the active Book row. Page front matter overrides a section
cascade or site setting; explicit false disables an inherited opt-in. This
setting does not disable the right outline or its relocation below xl.
Fixed in OINK 1.3.0
The documentation Book no longer opts into sidebar headings. When enabled,
the branch follows the parent row’s navigation depth, reserves its icon and
chapter-number columns, and adds one indent. Deeper headings indent again;
the same logical spacing applies in right-to-left layouts.
From 1200px, the fixed right rail uses 20% of viewport width, clamped to
286–420px. The flow rail uses 22%, clamped to 340–440px, and still honors
--td-shell-toc-flow-w. The reserved column and visible panel share one width.
Responsive widths follow the viewport immediately, without width transitions:
shrinking the window must not make the article rebound between drag steps.
Long labels wrap inside the rail; widening it can bring them onto one line.
Below 1200px, outline groups move to the left sidebar when enabled; below
768px, they live in its mobile drawer. Pages with sidebar_enabled: false
keep the rail hidden below 1200px. Browser zoom follows these CSS breakpoints.
Collapsing the right rail releases its full width at once at every desktop
size; the panel retains its slide and fade.
Sidebar runtime
Fixed in OINK 1.3.0
With sidebar_menu_foldable: true, each branch controls the visibility of
its children. sidebar_menu_compact must not permanently hide leaf entries
inside an expanded branch. This applies to cached and per-page trees in
both Docs and Book. Non-foldable trees retain compact filtering.
Sites still using OINK 1.2.0 can set sidebar_menu_compact: false while
keeping folding enabled until they adopt this fix.
Available since OINK 1.1
OINK 1.1.0 provides this disclosure API and explicit hidden-content isolation.
Version 1.0.0 does not provide the API.
window.OinkSidebar controls registered tree disclosures and movable TOC, backlink, and taxonomy groups, regardless of their current DOM parent.
setExpanded(id, boolean, {source}) returns true for valid targets. It returns false for unknown IDs or non-boolean values.
getState(id) returns a new {id, expanded} snapshot or null.
IDs are existing aria-controls region IDs. The API cannot change arbitrary elements outside registered OINK groups.
Sources are user, active-path, responsive, and api, the default.
Each writer sets aria-expanded, td-is-open, the localized label, and region inert state before emitting one document event.
The event is oink:sidebar-disclosure with detail: {id, expanded, source}.
Repeated writes of the same state emit no event.
API restoration keeps current-path ancestors expanded. Explicit user actions can still collapse them.
Before isolating a closing region that contains focus, return focus to its toggle.
ready is a Promise that resolves to the API after initial hydration and responsive placement.
isReady and oink:sidebar-ready also expose completion to late consumers.
Sites own optional persistence. Await readiness, read storage inside try/catch, then restore valid region IDs through the setter.
OINK owns whole-column collapse, width, and scroll persistence.
It does not define a version or locale schema for reader-selected branches.
Desktop collapse and closed mobile drawers make panel content inert and mark the panel aria-hidden.
Focus leaves before isolation. Opening clears isolation before focus enters.
The panel remains the 16px pointer sensor. The external restore control remains active.
Moving the pointer onto that edge during collapse opens the overlay after the brief hover delay.
Hover, Escape, backdrop dismissal, breakpoint cleanup, and scroll unlocking keep their existing behavior.
No-JavaScript fallbacks omit these runtime attributes.
Whole-column TOC collapse also isolates hidden panels.
If the collapsing control has focus, move focus to the visible floating restore button.
Restoring the column returns focus to its visible column control.
When the aside moves into the mobile sidebar, clear former column isolation
before the drawer controls interaction.
The drawer’s Tab trap includes only rendered, non-inert controls. It excludes hidden and collapsed descendants.
Immersive blog presentation
There is no article type or second shell. Four independent keys enable immersive reading on the ordinary blog shell.
Set them on pages or section cascades. Repeat values on the section index when it also needs them:
Blog shells omit breadcrumbs by default because articles are standalone pieces. The recipe therefore needs no breadcrumb key.
breadcrumb remains an ordinary key that pages or cascades may enable or disable on any shell.
hero uses the shared featured image as a decorative full-width background on single pages and section indexes.
Without an image, it renders the normal opening. banner and wash remain single-page modes.
The navbar overlays a hero with a contrast scrim and scrolls with it.
toc_style accepts fixed or flow. Flow places a wider rail beside the article and fixes its position only after scrolling.
Its resting position aligns with the article info line, or the description if no info line exists.
docs-shell.js measures this offset because title wrapping is unpredictable.
Without JavaScript, the rail starts at the article’s start.
toc_taxonomies: false removes term clouds. Rails with neither TOC nor clouds render nothing.
notoc remains the page-level TOC opt-out.
These switches do not change bylines, tags, series, pager order, feeds, or page-end composition.
The rail disappears below the xl breakpoint.
When scrolling down and the footer enters the viewport, the fixed TOC rail (fixed)
shares the visible-footer offset (--td-shell-footer-offset) so its scrollable
area ends neatly above the footer, keeping the lowest headings and taxonomy links
accessible by wheel and keyboard. Footer resizing and content reflow, including tabs, blog view switches and
loaded media, update this boundary without requiring a scroll event. This clearance applies even when the sidebar is
disabled (sidebar_enabled: false). With no footer the offset is zero, while
toc_style: flow relies on its own sticky boundary. Mobile drawer placement and
print visibility are unchanged. (Added in OINK 1.3.1.)
Search, actions, and runtime
params.offline_search enables a local index per language.
When enabled, it also builds under hugo server by default. Use offline_search_on_serve: false for large editing cycles.
HTML search appears on Home, shell pages, and Landing pages with landing_search enabled.
Other non-shell pages and Print omit the dialog and Palette.
Search metadata uses search_keywords, search_boost, default 1, and search_exclude.
The index includes URL, title, taxonomies, excerpt, headings, description, body/summary, root, section, type, keywords, boost, breadcrumb, and icon.
The fixture budget is 2 MiB raw / 512 KiB gzip.
Sites may return extra strings from hooks/search-keywords-extra.html.
Keywords affect matching and ranking. CJK matches found only through keywords display the description or excerpt, not the keyword list.
Body matches keep surrounding text as context.
Optional sections entries carry actual rendered id and title; content scope
also carries UTF-8 byte start offsets into the single stored body. Read IDs from
rendered content, including h1/h6, shortcodes, and data-td-search-entry elements, instead of reconstructing them
from titles or the configured TOC. Index reads temporarily select HTML and
restore the previous output context, so RSS/Print traversal cannot poison
HTML content. Reduced scopes omit body offsets. Old indexes
without sections remain usable. Return one result per page with its best matching
section, encoded fragment and nearby text; metadata-only matches may target the
page. Preserve language/subpath URLs, exclusions, and scope-specific content.
Normalized matches retain the original text in excerpts and highlights. Heading
extraction distinguishes id from data-id and ignores script/style content.
The labeled native radio group shows all roots and the page’s FirstSection
root as two adjacent scope options, using the index’s existing root authority.
Each option has a 44 px hit area and a visible focus ring. Tab visits the selected
option; arrow keys change scope, and Tab/Shift+Tab stay within the dialog.
Filter before ranking/limiting; another root’s match cannot suppress spelling
fallback within the selected root.
The default is all roots; the choice lasts only on the loaded page. Scope affects
pages only and is hidden in command/choice mode. Counts and partial coverage are
visible and live-announced in one footer, alongside desktop keyboard hints.
Mobile hides only the hints. Composition suspends delayed and index-load renders
as well as Enter activation. No new configuration authority or build step exists.
The global result limit precedes existing root grouping and menu group order.
The owning theme search checker and the site’s real-corpus/browser tests cover
these additions; the maintained summary indexes keep the 2 MiB / 512 KiB budgets.
Local search engine
No page loads Lunr, and the theme ships no copy.
One engine scans the folded index text and builds no index of its own.
A character’s Unicode script decides how it is read; the page language does not.
A query is cut into words, identifiers, symbol runs of two or more characters, and CJK runs.
It is cut again where a CJK character meets a letter or digit.
A CJK run matches as its overlapping bigrams, without a dictionary. A run of one character is one term.
A page must cover atoms: each word, identifier, and symbol run, and each character of a CJK run, up to 30.
A short list of English function words and six Chinese question words is scored at a tenth and never required.
A query made only of such words is searched as written.
A word matches exactly as a whole word.
It matches loosely as the beginning of a longer word, as another inflection, and as one part of an underscore name.
It also matches loosely inside a compound when it has five or more characters, and as a correction.
Inflection uses Porter’s suffix rules for a–z words.
Words of other alphabets share four leading characters and differ by at most three trailing ones.
Spelling fallback applies only when the selected scope holds no form of the word.
It covers a–z0–9 words of five or more characters with one edit, or two from eight. A transposition is one edit.
Identifiers and symbol runs are literal and are never corrected.
One found inside a longer identifier or operator is a loose match.
A page is a complete match when it covers 90% of the atoms by weight.
An atom weighs the inverse document frequency of its commonest covering term.
A bigram absent from the scope is not required while other bigrams cover its characters.
Complete matches hide partial ones.
A page covered within one section and its own page fields precedes a page that needs several sections.
Strength is next. Each atom takes its strongest match: title 10, keywords 8, tags and categories 6, headings 5, description 3, body 1.
A loose match counts 0.7 of its field.
Strength is the weighted mean over atoms, times 1.5 when the pieces are adjacent and in order, times the page boost.
The best section’s BM25 score times the boost follows, then title and URL.
Repetition changes only the BM25 score, so it reorders only pages of equal strength.
Partial matches sort by coverage in tenths before those keys and keep the matched/total label.
In that label a CJK run counts by pairs of characters.
BM25 runs per section with k1 1.2 and b 0.5 over length in characters.
Occurrences carry field weights and match quality, capped at 24 per field.
The excerpt is the 160-character passage of the best section that shows the most different matches.
A result carries the strings found, so inflections and corrections are highlighted as the page writes them.
OinkSearchEngine.create takes (documents, maxResults).
The index template writes every document with its body. Output up to 2 MiB is published as the index, unchanged.
Larger output is split: the index keeps every field except body, and offline-search-body.<lang>.json holds a list of {ref, body} entries.
Section start offsets stay in the index and address the separated text.
The dialog then carries data-td-body-src and data-td-body-bytes.
The 2 MiB / 512 KiB budget applies to the index that is fetched first.
The palette requests the index on the first search keystroke and shows its results at once.
Page text up to 8 MiB follows by itself. Larger text, or any size under Save-Data, waits for the “Search page text” row, which shows its size.
While the text loads, the status says so, and an empty result reads as loading.
When it arrives the engine is created again and the selected row is kept. A failed download returns that row.
Opening the palette, command mode, and an unsplit index request nothing more than before.
Besides headings, the index records search entries: any rendered element with an id and a non-empty data-td-search-entry title.
Every anchored field is one.
The entry title accepts both quoted and unquoted HTML attribute values.
A heading that contains an entry keeps its full visible title. Both anchors appear
in document order and share a byte offset when their text starts at the same place.
Entries join sections in document order with the same id, title, and start.
The page text is divided among headings and entries in that order, so text inside an entry opens that entry.
The headings field lists headings only.
An entry without an id or a title warns and is skipped.
An entry is scored and opened like a section, and its title counts as a heading.
The proposal records the design rationale and evaluation evidence.
Built-in action IDs are compare_translations, copy_markdown, copy_link, open_chatgpt, open_claude, view_markdown, view_history, edit_page,
create_child_page, create_issue, create_project_issue, print_section, print, switch_preset, switch_theme, switch_language, switch_version, open_github, and browse_history.
Outside the share bar, copy_link appears only in the Palette.
Site commands under languages.<lang>.params.ui.command_palette.commands may open safe URLs or invoke built-in IDs. They never inject JavaScript.
The legacy clipboard fallback restores previous focus and selection, including selection direction.
It does not reclaim focus if another control acquired it during copying.
In OINK 1.4.0, breadcrumbs and page actions wrap onto separate rows
when the reading column or enlarged text requires it. Long unbroken path labels
wrap without clipping; all breadcrumb links stay available. The action menu is
bounded by the viewport and retains keyboard focus and dismissal behavior at
200% text size, including a 320px viewport.
Fixed in OINK 1.3.0
The page-action disclosure closes when keyboard focus leaves its containing
controls, including Tab and Shift+Tab. Moving between its controls keeps it
open; dismissal leaves focus at the reader’s new destination. ArrowDown on
its closed toggle opens the menu and focuses the first action immediately.
Edit, history, and create-child actions require repository-relative source files.
Normalize physical filenames and the site working directory to / separators before containment checks.
path_base_for_github_subdir matches this normalized path.
For local content, it matches relative to the working directory. For external mounts, it matches the absolute path.
A string regex removes matches. A {from, to} map may replace them.
External sources need an explicit match.
After mapping and cleanup, empty paths, ., absolute paths, drive-qualified paths, and paths starting with a .. segment suppress these three actions.
Docs and project issue actions remain available under their existing repository settings.
Windows mappings must match /, not \. Normalization preserves filename case.
The Palette has empty, text-search, and > command modes. Quick links come from navigation.
It keeps no query history and provides no semantic search, personalization, or remote fallback.
Its browse_history command opens the separate browsing-history overlay of keyboard shortcuts.
Queries stay in the browser. No default telemetry is sent.
OinkSurfaceCoordinator coordinates the Palette, Appearance, keyboard shortcuts help dialog, browsing history, Draw.io, Expo viewer, drawer, root, language, and version menus.
Each surface controls focus restoration and Escape.
Already closed Appearance menus do not restore focus when the coordinator closes them.
When the Command Palette, Browsing history or Duo View closes, focus returns to where the reader was without opening the hover menu around that element, such as the footer ? sheet.
In those three surfaces an Escape that cancels an input-method composition stays with the input method, both during the composition and as Safari’s trailing keyCode 229 Escape right after compositionend; a later Escape closes the surface.
Keyboard navigation ignores text-entry controls (textarea, select, contenteditable, and text-entry input types), a focused map canvas, native audio or video player, or the theme’s media control row (each keeps its own keys), and modals, while allowing non-text controls such as gallery layout radios and tile-size range sliders; modifiers suppress bindings except Shift when it produces ,.;<>= or +. The desktop nonmodal Appearance panel permits search shortcuts; its mobile modal sheet and other open dialogs, including fixed-position ARIA dialogs, retain keyboard ownership.
Inside the mobile drawer, Escape closes the root switcher first and returns focus to its trigger. A subsequent Escape closes the drawer. Moving focus outside the root switcher dismisses its popover.
The version disclosure opens on hover, focus or tap. Tab and the up/down arrows reach the version links.
Escape dismisses the list even when a touch browser leaves focus on the page body. A second Escape closes the drawer.
The list wraps long labels and scrolls above the bottom bar. In the phone drawer it expands in the flow so the drawer can scroll to its last link.
A press outside a floating list closes it at once, because iOS sends no click for a tap on plain content. The drawer’s list closes on the click, so the row under the finger stays in place.
The outline uses one heading model and computed scroll-padding-top to derive the cursor and visible-heading range.
Its SVG line and dot share animated values, preventing drift.
Valid URL fragments are decoded. Malformed percent sequences use the literal heading ID.
This applies when indexing links and selecting requested headings near the page end.
No speculative DOM repair pass is allowed. The normal shell runtime always owns this tracking.
params.ui.scroll_spy and page scroll_spy remain quiet compatibility no-ops throughout 1.x.
They emit no separate runtime and may be removed only in a future breaking release.
Keyboard shortcuts
params.ui.keyboard_nav (default true; site, page or cascade) adds the stable
js/chunks/keyboard.js chunk, history.js followed by keyboard-nav.js, to
interactive HTML pages. A page with false ships neither file, so it binds no
key, records no history and restores no reading width. The map is twenty-nine
shortcuts in three groups (Navigation, Actions, View), and the shortcut help lists them in this order:
Group
Keys, in help order
Navigation
w/s tree move, a/d collapse/expand, Enter/Space open the focused tree item, q/e page, k/j heading, x language, r section, v version, h history, g home
Actions
/ and f search, \ and c commands, u edit, n child page, i docs issue, o fold all, p print, [ ChatGPT, ] Claude
View
b Duo View, z Zen Mode, m Markdown source, t preset, y color mode, l index layout, ; gallery layout, ,/. gallery size (</> too), -/= reading width (+ too), ' help
Readers can disable global character shortcuts in the help dialog or at the
focus stop following the skip link. The latter also serves footerless pages
and pages with only local search. The preference covers the palette’s bare
punctuation keys, including / and \ produced with Shift or AltGraph. The exact Ctrl/Cmd+K chord and native focus and activation keys still work.
The browser stores the choice under td-single-key-shortcuts: plus the
encoded site base path. With storage unavailable, the switch works for the current page.
Scopes:
Tree keys need #td-sidebar-menu outside Zen Mode. Up/Down/Left/Right act
only once focus is in the tree, where Left and Right swap in RTL; elsewhere
the arrows keep native scrolling and Space keeps scrolling the page.
Movement uses real focus without changing Tab order, starting from the
current page’s row. Non-link divider buttons take part. From a child,
Left/a focuses its parent group and a second press collapses it;
Right/d opens a closed group or enters the first visible child of an open
one. A closed drawer or collapsed desktop sidebar opens on the first press.
q/e work on shell pages and follow the visible sidebar links only, never
group buttons, then the page-end pager, then rel links. k/j and z
work on shell pages and the home page; on the home page k/j move between
[data-td-landing] > section[id]. Every other key works on every
interactive page when its target exists and does nothing otherwise.
/ and \ belong to the Command Palette and keep working when
keyboard_nav is false. f and c open the same instance, or on a
standalone home page without a palette move to
[data-td-keyboard-search-route] and resume the requested mode there.
u, n, i, p, m, [ and ] run edit_page,
create_child_page, create_issue, print, view_markdown,
open_chatgpt and open_claude through the action registry,
only while the descriptor is available (p falls back to window.print()
when no print descriptor is registered). x and v move to the next
available, non-active option with a URL of switch_language and
switch_version, wrapping at the end; x falls back to
[data-td-language-route]. g opens the manifest’s home
(Site.Home.RelPermalink), falling back to the brand link; on the home page
it glides to the top.
? and the digits stay unbound. Of the 1.6.0 bindings, h for Zen Mode (now
z), l and y for languages (now x), g as tree activation (Enter
and Space remain; g goes home) and the home page’s n alias are retired.
The shortcut help is one per-language cached sheet (.td-shell-keyboard-help),
rendered directly inside the footer hover menu or, under footer_style: none,
inside <template data-td-keyboard-help-source> by scripts.html.
It holds three .td-shell-keyboard-help__section groups
(td-shell-shortcuts-navigation, -actions, -view) inside
.td-shell-keyboard-help__body, totaling twenty-nine
.td-shell-keyboard-help__row[data-td-shortcut] rows (ten, nine, and ten). The
row IDs, in order, are tree-move, tree-toggle, tree-open, page-move,
heading-move, language, route, version, history, home; search,
commands, edit, new-page, issue, expand-all, print, chatgpt,
claude; duo, zen, markdown, style, theme, layout, gallery,
image-size, page-width, help. ' or clicking the footer ? trigger
toggles a modal <dialog data-td-keyboard-dialog> cloned from the sheet with
-dialog ID suffixes and the Enable shortcuts preference checkbox
(ui_single_key_shortcuts, enabled by default). Each hover/focus preview and
modal opening evaluates every row against the live page; a row that
cannot run stays in place with td-is-unavailable and a visually hidden
“unavailable” note, so the grid keeps its shape. Dimming never lowers opacity:
the label takes the secondary text color and the keycaps lose their fill for a
dashed border, which keeps WCAG AA contrast in every preset, and forced colors
use GrayText. Both the hover popover (min(54rem, 100vw − 4.5rem)) and the
modal dialog (min(58rem, 100vw − 1.5rem)) use auto-fit columns of at least
16.5rem: three side by side on wide screens, wrapping cleanly on narrower
viewports. ', Escape, the close button
(aria-keyshortcuts="Escape '") and a backdrop click close the dialog, and
focus returns to the trigger without reopening its hover card. Other shortcuts
stand down while it is open.
The footer ? trigger declares aria-keyshortcuts="'" and
aria-haspopup="dialog". Hover or focus reveals the full three-group cheat
sheet above the footer. Its height follows the space above the trigger as the page scrolls. Both the sheet and dialog refresh availability as the reading column resizes. A click opens the centered modal dialog. With
keyboard_nav: false and local search on, the hover popover renders the
compact .td-shell-keyboard-help--compact variant keeping only the / and
\ rows and opens no dialog.
Browsing history is local. history.js records each HTML page load except the
404 page as {url, title, time}: the path and query without the fragment, the
og:title or document title, and the visit time. Entries live in
localStorage under td-history: plus the URL-encoded path of Site.BaseURL with its trailing slash (for example, td-history:/manual/ for every language of that site),
newest first, including visits restored from the back/forward cache, unique by URL and capped at 100; entries outside the base path
or malformed ones are dropped, never repaired. The list is never transmitted.
h or the palette-only browse_history action, available when
keyboard_nav is on, opens #td-shell-history[data-td-history], which
reuses the palette surface classes. It omits the current page, filters on
every typed token across title and path, and supports Up/Down, Enter (same
tab), Ctrl/Cmd+Enter or a modified click (new tab), Shift+Delete (remove the
selected entry) and the [data-td-history-clear] button (clear all stored visits, including the current page, and disable only when storage is empty). With no rows the listbox stays childless and the empty or
no-match text appears in the sibling [data-td-history-empty]. Escape (except
one the input method keeps, as above) or the backdrop closes it and restores focus (falling back to
#td-main-content when the opener is no longer rendered). Launching
browse_history from the Command Palette closes the palette and restores the
opener’s focus first, so history returns to that opener on Escape. It holds
data-td-shell-lock while open and registers as history with the
coordinator.
o folds or unfolds together the visible tree and right-rail groups
([data-td-shell-tree-toggle] in an active #td-shell-sidebar or
[data-td-shell-aside], through OinkSidebar.setExpanded with source api),
every visible <details> outside dialogs, hover menus, the site header and
templates, and visible [data-td-code].is-collapsible blocks through their
expand button. If any target is folded, all expand; otherwise all collapse, and
the api source keeps the current page’s active path open. Rail collapse,
collapsed or hidden rails (including Zen Mode), and popover menus are not
targets. One frame of html[data-td-kbd-instant] suppresses transitions while
the deepest visible article block at the reading line keeps its viewport
position.
- and = (or +) set a reader width for .td-shell-layout .td-shell-article
in 100 px steps from the rendered reading column (using .td-content plus
horizontal article padding when Book reading_width constrains it), never
below 600 px (or the container when narrower). Reaching the container stores
none, which fills it on any screen. A step that reaches or crosses the page’s
own width, measured without the override, stops there and removes the stored
value. The value lives in localStorage as td-shell-article-w (pixels or
none); on shell pages with keyboard navigation the prepaint script restores
valid values (none or integer pixels >= 600) as
html[data-td-shell-article-w] with --td-shell-article-w. The @media screen
rule overrides page_width and the Book .td-content measure; print ignores
it.
Search-tail extensions
Available since OINK 1.1
This API is included in OINK 1.1.0 and absent from version 1.0.0.
Trusted site JavaScript may call OinkCommandPalette.registerSearchTail({id, rows, activate}).
YAML and the action manifest remain data-only. The bundle loads only when local search is enabled.
Registration requires a unique ID matching [A-Za-z0-9][A-Za-z0-9_-]* and two functions. Invalid or duplicate registrations throw.
The returned unregister function is idempotent. It cannot remove later registrations that reuse the ID.
Live changes schedule one owned render. Removal cancels the provider’s pending action.
rows(context) returns descriptors synchronously. Context is a frozen {query, locale, phase, pageResultCount} snapshot.
Query is trimmed. Locale is the HTML language tag. Phase is results, empty, or error.
Count includes only local page results after the limit.
Providers run only for settled, nonempty text searches. They never run in empty, command, choice, or loading states.
Rows appear after native results and actions in the localized Actions group, in registration order.
Native empty/error messages and input-triggered index retries remain available.
Each descriptor requires a unique per-provider id with the same ID syntax and a nonempty string title.
Optional description, icon, and disabledReason values are strings. available is boolean and defaults to true.
OINK copies and freezes these fields. Display strings render as text.
Invalid descriptors, duplicate IDs, asynchronous returns, or thrown callbacks discard that provider for the render.
Other providers remain unaffected. Callback counts are not guaranteed.
activate(row, context) runs only through ordinary row activation.
It receives the copied descriptor and original context, with an AbortSignal and handoff() function.
While activation is pending, all other row activations are blocked, including entry into native choice menus.
Synchronous throws and rejected promises clear pending state, keep the Palette open, and announce the localized action-failed message.
Fulfillment values are ignored. Success closes the Palette without taking focus from another surface.
Closing, reopening, changing the rendered query, or unregistering cancels pending work.
Late settlement cannot modify newer sessions.
Before opening another coordinated surface, call context.handoff().
It closes the Palette without returning focus or aborting the activation. The consumer then owns the new surface’s focus and error interface.
Later Palette sessions or unregistration can still cancel unfinished work.
Successful completion does not abort handed-off operations. OINK sets no timeout.
rows() must remain pure. This trusted-code contract is not a sandbox.
Default queries remain local. No remote provider or telemetry is bundled.
Sites own extension network behavior and provider consent.
Desktop nonmodal Appearance permits search shortcuts; mobile modal Appearance
and every other open dialog retain keyboard ownership. In the mobile drawer,
Escape dismisses the focused root switcher first and returns focus to its toggle;
a second Escape closes the drawer. Focus leaving the switcher dismisses it.
Search opened from the Landing drawer returns focus to the visible menu toggle.
Choosing a visual preset in the Palette keeps it open for the next action.
Share
params.ui.share defaults to empty and accepts any ordered subset of 16 targets:
x, bluesky, mastodon, facebook, linkedin, reddit, hackernews, telegram, whatsapp, line, pinterest, weibo, chatgpt, claude, email, and copy.
Page lists replace inherited lists. share: false disables the share bar for that page.
Unknown entries warn and are removed. Only regular pages display the bar.
Print, Markdown, and RSS omit it.
Targets are plain intent links containing the page permalink/title, plus a local copy_link button.
Pinterest media uses the shared featured-image resolver.
ChatGPT and Claude receive build-time permalink prompts independently of page-menu assistant actions.
Discord has no public intent target and is deliberately absent.
The bar loads no platform SDK, iframe, script, stylesheet, counter, or campaign parameter.
It sends no request until a reader activates a link. It displays one accessible labeled glyph row.
share/items.html resolves targets. share/bar.html renders them.
Annotation
annotation-items.html resolves page annotation descriptors. page-meta-lastmod.html renders them.
Inline annotation links are underlined so readers can identify them without
relying on color, including muted last-modified and upstream attribution lines.
You may override either partial narrowly. Lines appear in this order:
Line
Condition
Last modified
Lastmod is set
Upstream
front matter upstream_link is non-empty
Translation
configured authoritative language has a translation and this page has authored text
upstream_link is per-page and can be inherited through cascades. upstream_link: "" disables it.
Other facts resolve from site params → data/upstreams[upstream_source] → front matter:
upstream_name, upstream_copyright, upstream_license, upstream_notice, optional upstream_ref, and upstream_modified.
A link requires the first four facts.
Invalid or incomplete attribution warns and emits no legal notice. Unsupported URLs are refused.
upstream_modified changes the credit verb and links commit history within the existing attribution sentence.
The notice page includes complete license and warranty text.
params.ui.translation_notice enables translation notices. The page key translation_notice can cascade.
Notices skip generated pages and pages without bodies. Natively authored pages can use translation_notice: false to disable them.
Authors and series
Blog article heads show title, info line, term badges, byline, then series strip. The description starts the body below them.
article-info.html always shows the date. With reading_time enabled, it also shows word count and minutes.
Front matter upstream_link supplies the same per-page fact used by annotation.
It adds a localized original-source link, validated by the shared URL policy.
Term rows contain badge sequences. The taxonomy name appears on the group label, not as a visible prefix.
Inactive badges use pale neutral backgrounds, muted text, and the taxonomy’s term glyph.
Linked badges use the current section’s accent background, border, and text on hover or focus.
taxonomy-icon.html defines taxonomy and term glyph pairs:
folder-open/folder, tags/tag, cubes/cube, users/user-pen, book-bookmark/book for series, and generic shapes.
params.ui.taxonomy_icons overrides a pair with one string for both uses, or a taxonomy/term map.
Invalid values warn and keep built-ins.
Right-rail clouds show the whole-taxonomy glyph only in their heading; repeating it on chips would add noise beside an already announced taxonomy.
Their chips therefore contain only text and counts.
Standalone taxonomy directory cards show one term glyph.
Bylines show only portraits, names, and one-line profile bios. They have no label or date.
List rows, cards, and term archives share a metadata line: date, localized author-and-section phrase, then word count and minutes.
The same reading_time switch controls these last two values.
A wrapping badge line follows, with terms from every taxonomy in alphabetical taxonomy order.
Each badge has its term glyph. Cards omit authors because the metadata sentence already names them.
Authors activate only through taxonomies: {author: authors}.
Profile term pages define display names, summaries, bodies, and featured-image avatars.
Missing profiles use link titles, initials, and archives.
authors-resolve.html keeps front matter order for article heads, list rows, and one RSS dc:creator per author.
Legacy author stays unchanged when authors is absent.
When both exist, authors takes precedence without warning. Custom author-taxonomy plurals remain ordinary taxonomies.
Series activate only through taxonomies: {series: series}. Term pages own the introductions without adding a parameter, data file, cover model, or runtime.
Pages use series: [name] with optional series_weight.
series-pages.html puts weighted members first, ordered by weight. Unweighted members follow in ascending date order, with Path tie-breaks.
The strip and term page share this order. The first named series gets one HTML/print strip.
The panel uses translucency and background blur because an opaque surface would obscure the featured image behind the band in hero articles.
On plain articles, the tint resolves to the page background, allowing one treatment to serve both.
The summary covers the full bar and trailing caret, while the series name and taxonomy icon remain a sibling link over a hidden width reservation.
This keeps nested interactive controls out of the summary. Opening adds a thin rule below the bar and displays reading order in an adaptive grid on the same surface, preserving DOM order.
Each member link aligns its ordinal at the end of a fixed square track so titles keep one edge at every list length.
Equal cells stay in one column when narrow and add columns only while titles retain a readable width, allowing desktop panels to use their width without stretching one selected row across the panel.
Hover and current-position states reuse the two backgrounds from sidebar navigation; current members also have filled ordinals and heavier titles, so color is not the only cue.
Print expands the list in one column. Singleton series and non-HTML outputs omit the strip.
Numbering, cross-references, and aggregate outputs remain Book features.
Default article taxonomy chips omit reserved authors and series because dedicated features already show them.
Explicit params.taxonomy.page_header restores either.
Blog indexes and page composition
Blog section indexes use params.ui.blog_index.
list, the default, cards, and gallery show one flat sequence,
newest first, with shared blog_index_size pagination and no year headings.
table shows date/title/tag rows and always lists the complete section without
pagination, both standalone and when toggled.
Cards use shared lead images, localized date/author/section metadata, tags, and three-line summaries.
Taxonomy pages such as /tags/ and /authors/, and their term pages, share shell/taxonomy-head.html.
Taxonomy heads show a whole-taxonomy glyph in a tinted tile, the localized name, and term count.
Term heads show the term title and page count from ui_taxonomy_pages, using the locale’s CLDR plural form.
If no breadcrumb appears, a label above the title names and links the taxonomy, since enabled breadcrumbs already provide this context.
Generated taxonomy breadcrumbs use the head’s localized label, not Hugo’s plural title.
Below the head, shell/taxonomy-cards.html lays out one-line term cards.
They use the rail cloud’s order: most-used first, with alphabetical ties.
auto-fill creates equal columns, preventing short taxonomies from stretching two cards across the page.
Each card contains the term glyph, term, and page count. The whole card is linked.
Author cards instead lead with the byline’s small portrait, using the same avatar partial.
Cards include no description or newest page because the title and count already identify the term; another line only blurs the grid.
There is no filter-chip row or “All” chip because the section root is already in the sidebar and navbar.
Term pages stay row lists. Author profiles keep their own head.
Taxonomy and term rails start with shell/taxonomy-switcher.html.
Each declared taxonomy has one row with its whole-taxonomy glyph, localized name, and term count, linking to its index.
The current taxonomy uses the selected background.
The switcher connects taxonomy pages because cloud chips link to terms and cloud headings only collapse.
Sites with one taxonomy show no switcher. The switcher and clouds share the toc_taxonomies switch.
Taxonomy pages scope clouds to the whole site (taxonomy-root.html returns no root for this page kind) and omit their own cloud because its terms already appear in the cards.
Term pages keep section scope and all clouds.
params.ui.blog_index_toggle renders all four forms — list, cards, and gallery for the current paginator slice, plus table as a complete unpaginated archive — and lets readers cycle between them: list, cards, table, then gallery.
The fourth form is included in OINK 1.4.0.
The configured form controls initial display. Hidden forms load no images.
Stored reader preferences apply only to indexes that publish all four forms.
Sections without toggles publish one form and always show it.
Front matter or cascades override site mode per section.
Tables remain complete, unpaginated archives whether or not the switch is enabled.
Blog gallery
blog_index: gallery presents each post as a linked cover. It uses the shared
featured-image resolver, the same date order and blog_index_size paginator as
rows and cards, and preserves manual_link. It does not change the content
type to Expo. Clicking a cover navigates to the article; no image viewer opens.
params.ui.blog_gallery accepts mode (wall, cards, or seamless, default
wall) and size (integer CSS pixels, 160–360, default 240). A page or cascade
blog_gallery block replaces the site block. Missing or invalid fields use
their built-in defaults; invalid values warn. The gallery toolbar changes
mode and size independently of Expo albums, using td-blog-gallery-mode and
td-blog-gallery-size storage keys. The outer view retains td-blog-index.
Wall uses Expo’s justified row geometry with 6px gaps; Seamless removes the
gaps. Cards uses columns filled from the shortest column. Covers keep their
proportions within bounded tile ratios and are contained rather than cropped.
Below 500px of gallery width, Wall and Seamless bound tile ratios more tightly
to keep the caption columns readable, including for very tall images.
Processable covers larger than 960px receive a preview within a 960 × 960 box;
GIF previews are still images. No build-time remote fetch is introduced.
Wall and Seamless reveal titles and descriptions on hover or keyboard focus.
Without hover, captions remain below images, and row spacing includes their
height. Cards always shows captions. Covers without images retain a linked,
named placeholder; failed images receive the same fallback after enhancement.
The title and optional summary name the link. The cover is decorative. Hidden forms use lazy
images. Reappearing forms, resized sidebars, fonts, and late image dimensions
trigger layout without overlapping items. Without JavaScript, a responsive
grid keeps links and captions visible and hides the inactive controls.
params.logo always supplies the brand mark. params.wordmark, or the site title, supplies text hidden at compact widths.
Docs, Book, Blog, and Swagger share one shell model.
Page-end order is Share, Feedback, Annotation, Pager, Comments.
Docs/Book pagers follow sidebar preorder. Blog pagers use weight, then reverse date.
Each link announces its direction and the visible linkTitle of the destination.
pager: false disables the pager. Static outputs omit pager controls.
Every rendered footer has an icon-only utility dock at the end of its bottom line.
Dock order is version, language, theme, then keyboard help. Menus open upward.
Hovering or focusing the keyboard-help trigger shows the full three-group shortcut sheet; clicking it when keyboard_nav is enabled opens the three-group shortcut dialog described in keyboard shortcuts.
The version control never shows the current branch or release label.
The fat footer’s collapse chevron follows the dock.
Below lg, copyright, center content, and dock become three centered full-width rows, with the dock last.
These global controls do not appear in sidebar footers.
footer_style: none removes the whole bottom line.
There is no archive shell, arbitrary-depth flyout, second navigation authority, query upload, or browser compatibility shim for removed configuration.
Feedback sends only docs_feedback through an existing gtag and stores the selection locally.
It does not replace Giscus.
An explicit params.ui.quick_links: [] disables quick links instead of restoring
the defaults. Invalid sidebar_root_link_self values warn and keep the documented
true fallback. Taxonomy and term pages use the shared page_width validator.
Translation comparison
params.ui.compare: true adds an icon-only Open duo view entry, whose glyph
differs from every shell control’s, beside
the page actions and a localized Duo View action (compare_translations)
in the Command Palette on Docs, Book, and blog pages that have an actual HTML
translation on the same origin. The reader title, its Sync Scroll switch, close
icon and sync notes use the same catalog. The entry exposes its label as its
tooltip and accessible name. When keyboard navigation is enabled, B toggles the
reader: it opens it from the page and closes it from the toolbar or either pane,
under the page shortcut’s guards (no modifier, composition or editable target).
The entry and Close declare aria-keyshortcuts, and the shortcut help dims the
Duo View row on pages without a real target. The default is false. This is one
site setting; there is no page-pair data, new layout, or output format. A
language that sets it to false offers no entry and is never a target.
Navigation’s language-home fallback is never a comparison target, nor is a
translation whose build policy writes no HTML (build.render: link or never,
including cascaded policy). Blog archive pages after the first offer no entry,
palette action or shortcut, because they have no counterpart.
The reader fills the viewport with two ordinary pages. The current page is fixed
on the reading-start side, so a right-to-left host mirrors the pane order. The
target selector uses existing language order and the same icon, rounded trigger,
floating menu style and selected and hover option states as the site’s language bar. Its menu supports pointer and
keyboard selection. Only the selected sibling is loaded, and replacing it
preserves the synchronization preference. Each pane keeps its language,
direction, footnotes and content components. In a pane, an Escape that cancels
an input-method composition stays with the input method under the rule in
Local search engine. The next Escape can close the reader.
Below 900 CSS pixels, one toolbar row and one switcher row show one retained pane
at a time. The title truncates while Sync Scroll and Close stay at the end. The
switcher row holds the language buttons and, with more than one target, an
icon-only target-language menu, so pane headings are not repeated. A single
target is a plain label in the pane heading and the switcher, never a
one-option menu. Short viewports tighten both rows: at
320 × 256 CSS pixels (400% zoom) at least 160 pixels of text remain. Forced-colors
mode marks the selected pane with a border. Crossing the breakpoint moves the
language menu while preserving its keyboard focus, open state and selected pane.
Shared visible heading IDs determine linked scrolling, using interpolation
between matched headings. Unmatched headings are skipped. Sync Scroll is a
labelled switch (role="switch"): while panes load it keeps the reader’s
preference and is disabled, and it reads off when sync is unavailable or a pane
fails. A partial match anchors the estimate between matching headings; with no
common headings the reader falls back to a bounded beginning-to-end
document-progress estimate. In either case an orange exclamation mark beside the
switch, without a badge, names the case in a note shown on hover, keyboard focus
or tap; Escape dismisses a visible note before it closes the reader. Matching and
usable geometry are separate facts: a matched heading that cannot scroll to the
reading line adds no anchor without counting as a mismatch, so it never raises
the partial-match note. When no shared heading can anchor the map at all, the
note says that sync follows overall reading progress.
Duplicate or reordered matches are ambiguous, so the switch is disabled and the
note explains why; the two panes remain independently readable. While the owner scrolls continuously
(trackpad, momentum, a held key), the follower tracks it instantly on every
frame; a single discrete jump eases when motion is allowed. Reduced motion and
bookmark restoration always position instantly.
Turning off Sync Scroll restores independent scrolling; synchronized
scrolling aligns sections by heading anchors rather than locking individual
paragraph rows. Opening resumes the current passage after reflow. Focus starts
on the dialog title so the view is announced; until the reader Tabs into a pane,
PageUp, PageDown, Space, the arrow keys, Home and End pressed there scroll the
reading pane (the visible one below 900 pixels) and sync follows. A late image
or font load preserves the first keystroke when the reading position already matches its bookmark. Closing,
Escape, B or Back restores host scroll and returns focus to the element that
had it when the reader opened, such as the reading link where B was pressed,
falling back to the entry when that element is gone or hidden. Only an open
language menu or a visible sync note consumes Escape before the reader does. A reload, or a back/forward
restore, onto the reader’s history entry reopens the reader without adding a
record, so one Back closes it and Forward can reopen it. That restore brings back
the selected target, Sync Scroll, the visible pane and both reading positions,
which the reader keeps on its own history entry once scrolling settles. The last
explicitly chosen target language and Sync setting are also remembered in this
browser for later openings; without storage the first target and Sync on apply. Back also cancels a
reload restore whose reader script is still loading. A pane-local modal consumes
Escape before the outer reader does. Fragment
links stay in the pane without adding history and, like a native fragment
jump, reveal the hidden tab panels that contain their target; another document exits
comparison; external links open outside it. A localized loading note covers a
pane until its article is readable. The iframe’s initial about:blank load is
ignored while the target request is pending; a document still blank at the
15-second timeout is treated as failed. A page that cannot be loaded shows a
localized Retry button and a direct link; choosing the same language again also
retries it.
The accepted decision records the
rationale and boundaries. bin/check-compare.py, the theme’s scroll geometry
tests, and the site’s test:compare browser suite own verification. The
dedicated eight-language fixture is synthetic evidence, not a downstream
adoption claim.
Verification
bin/check-navigation-contract.py, bin/check-shell.py, JS tests, output goldens, and consumer browser tests verify these contracts.
They cover navigation, language/subpath links, blog variants, page-end order, keyboard behavior, accessibility, and responsive layout.
Appearance control
The navbar and footer dock share one click/keyboard disclosure. The Landing
mobile drawer also provides a labeled Appearance row. The panel offers native
Style radios when preset_menu allows a choice and native Light/Dark/System
radios when dark_mode.show_menu is enabled. Selection is immediate and keeps
the panel open. Enter, Space, or ArrowDown opens it; arrow keys select within
a group; Tab moves between groups; Escape closes and returns focus. Whenever
the panel offers Color, the trigger shows the reader’s choice there: a sun for
Light, a moon for Dark and a half-filled circle for System, which stays while
the system flips between modes. The head script sets data-td-color-mode on
the root before paint, so the right icon shows without a flash. A panel that
offers only Style shows a palette.
The English group labels are Style and Color. With keyboard navigation
on, each label names its key: Style (T) and Color (Y). The hint is
hidden from assistive technology, which reads aria-keyshortcuts on the
group instead. It disappears when the reader turns single-key shortcuts off
and on devices without hover. Style options are independent buttons with a
colored page, layers, GitHub, pen-nib, newspaper or terminal icon and the
preset name, in two rows: Paper, Slate and GitHub over Ink, News and Terminal. Three, five or six presets take three columns and the panel
widens to 24rem; two or four keep two columns. The three color modes are
buttons of the same shape and gap, so six styles stand in the columns of the
three modes. There are no Aa previews or experiment badges.
The site default is identified in its tooltip and accessible name; selecting
it clears the saved preset. A tinted background and border show selection,
and keyboard focus has a separate outline.
Desktop uses a non-modal dialog anchored to the trigger; outside press or
focus leaving closes it. Below 768 px and inside the Landing drawer,
showModal() opens a bottom sheet in the browser top layer with a close
button and 44 px option targets. Closing the sheet preserves the underlying
drawer. The surface coordinator closes unrelated popovers before opening.
The t shortcut runs switch_preset with the next offered preset in order (Paper, Slate, GitHub, Ink, News, Terminal) and wraps after the last; it does nothing when the site offers no preset choice. The y shortcut cycles color mode through light, dark, and auto (system) via switch_theme. switch_preset is also the command-palette choice.
Fixed in OINK 1.3.0
A queued close event from an earlier appearance dialog must not clear the
expanded state of a newly reopened dialog.
The GitHub, Ink, News and Terminal experimental presets require explicit
configuration; preset_menu: true continues to offer Paper/Slate plus the site
default. All four reuse the same state, keyboard, command-palette and
bottom-sheet mechanisms. Terminal compacts desktop
navigation rows, while prose and mobile touch targets retain their sizes.
Expo albums
The new type: expo reuses this shell and adds image-album presentation.
The Expo contract owns its content model, controls, and outputs.
Local component surfaces
OINK 1.4.0 aligns search/command rows, sidebar corners, and Appearance controls with the component geometry. Selected and hovered rows remain distinct, keyboard focus remains immediate, and preference storage, navigation, and palette selection are unchanged. No moving-highlight runtime is added.
Archived-version banner
Styled in OINK 1.7.0
The archived-version banner predates 1.7.0. OINK v1.7.0 styles it, and warns
and omits it when params.version is missing.
With params.archived_version: true, every HTML shell and Landing page opens
with version-banner.html: a td-page-notice td-page-notice--primary element
with role="note", in which a decorative fa-box-archive icon precedes the
localized version_banner_archived sentence and, when
params.url_latest_version passes the shared URL policy, the
version_banner_latest link. The sentence names params.version; without one
the build warns once and omits the banner rather than emitting an empty element.
alerts.css styles td-page-notice with the callout accent grammar in the
interface face: a primary-tinted band whose accent rule uses
border-inline-start, so right-to-left pages mirror it. Directly under
<main>, in Landing and default layouts, it keeps the 1050px article measure
with a 1rem gutter. Forced colors use system colors, and browser print keeps
the banner in ink without the tint. The Print output’s printable-section
notice shares the class and stays screen-only; the dedicated Print output does
not render the archive banner.
v1.5.1 review corrections
These corrections shipped in v1.5.1 and are part of the current consumer contract.
Invalid manual_link_relref values warn and use the page permalink. Sidebar,
section index, and navigation JSON share resolution, including deployment
subpaths. Missing references must not stop an ordinary build.
Navigation JSON IDs and section-index lookup keys remove the deployment prefix
before the language prefix. Explicit section order and cross-language identity
remain stable with or without a directory for the default language. Published
links retain both prefixes.
Version menus and commands share URL resolution. Page links remove the current
deployment prefix before joining the target version URL, retaining the language
path without duplicating the old version directory.
Blog indexes own their pagination: localized navigation contains ordinary
links with aria-current, and head prev/next point to list pages. The
article-sequence pager is omitted on blog lists. Archive pagination and its
head links apply only to HTML. Print emits one complete section aggregate,
without repeating it for each HTML archive page.
All navbar-only pages, including immersive blog articles, expose the mobile
site drawer. Language, version, and repository links remain reachable there.
Closed sidebar drawers cast no shadow into the viewport.
The groups icon policy includes the navigation root, top-level entries, and
entries with children in both tree walkers. Deeper leaves omit icons.
A rail with no TOC, taxonomy output, or backlinks renders no empty panel or
controls. Taxonomy-only rails retain collapse/expand controls labelled as
sidebar actions, rather than TOC actions. Book TOCs suppress the browser’s
list counter alongside authored numbering.
Escape dismisses language, version, and utility hover menus and returns focus
to the trigger without reopening the menu. Copy, feedback, comparison loading,
and Expo boundary controls preserve the focused element.
7.4 - Landing contract
The maintainer contract for landing data, the built-in section registry, language resolution, runtime, accessibility, and outputs.
Any regular page may use layout: landing. It renders the navbar, a full-width content area, and footer without docs sidebars or TOC rails.
The homepage can still use data/home/<lang>.yaml with the same renderer.
Non-home pages resolve sections in this order: inline front matter, data/landing/<key>/<lang>.yaml, exact-language entries in data/landing/<key>.yaml, then English or unsuffixed local data.
Landing never fetches mutable facts. Commit or generate stars, prices, screenshots, and avatars before Hugo runs.
params.ui.landing_search defaults to true. It enables the existing local Palette only when offline_search is enabled.
params.ui.github_stars and params.ui.alt_site are optional local interface facts.
An entry is a type string or a map with type, key, id, enabled, inline data, or an explicit local partial.
Authors provide unique IDs. OINK converts them to anchor-safe values.
Unknown types warn and use safe fallbacks. They never disappear silently.
landing/ partials define built-ins. Removed home/ partial names are not an API.
preview displays Markdown source beside its RenderString output using site hooks.
The content registers the same runtimes as docs content.
The source pane uses Chroma and a file name, defaulting to page.md.
Markdown output uses a four-backtick markdown fence. RSS omits it. Pane labels use theme i18n.
hero.align accepts start or center. Center alignment supports only text.
Combining center alignment with an image warns, falls back to start, and preserves the image.
download uses the shortcode’s data/download/<key>.yaml schema.
It adds no second channel, version, publication, or interpolation model.
HTML lists each channel under its own heading, with its download links or
unpublished status. Once landing.js loads, each product with an available
channel gets its own tablist. Tab reaches the selected channel. Left/Right
follow the list’s writing direction, and Home/End select the first/last
available channel. Switching emits td:tab-shown from the visible panel and
the event bubbles. A product with no available channels keeps its static headings and status.
Language, runtime, and accessibility
Narrative files may be language-specific.
Shared fact fields resolve <field>_<exact language>, with - converted to _, then <field>_<primary language>, then the unsuffixed field.
camelCase aliases are not accepted.
Narrative fields use site hooks to render inline or block Markdown. Values reused as accessible names become plain text.
Section text is site data. Only theme controls use OINK i18n.
Each built-in Markdown render has a stable section, item, and field scope.
Repeated bodies and marquee copies therefore get distinct generated code IDs,
including their copy controls, titles, viewports, and line links. The scope does
not depend on render order or output order. Explicit code IDs remain unchanged;
repeating one in the assembled Landing output warns and keeps the page available.
Custom partials that reuse the Markdown helpers should pass a distinct stable
scope for each rendered position.
Block Markdown bodies use the shared .td-content component scope and register
the runtimes their rendered content needs. Code folding, tables, images, and
other content primitives retain their normal styles inside a Landing section.
This scope belongs to the body, not the surrounding marketing headings or grid.
Interactive HTML sets hasLanding, which conditionally adds only landing.js.
The runtime uses OinkSurfaceCoordinator for reveal, count-up, copy, compact-menu, and theme-image enhancements.
Server output stays complete without JavaScript or if the Landing script fails to load.
Reveal candidates are initially visible; only an installed observer may mark one as pending entrance animation.
The server renders metrics with configured number formatting, prefixes, and suffixes, and the count-up’s final frame uses the same display.
In interactive HTML, readers can tab to a capabilities or code-plate code
panel and use the arrow keys to scroll long lines. In the static Print output
both panels show the source as plain text and stay out of the tab order.
The development version adds code to the capabilities code visual alongside
the lines form available in 1.8.0. Choose exactly one. Use
lines for per-line prefixes or a nonblank code string for source highlighted
by Hugo at build time. Both the full theme and the chrome plus landing
stylesheets provide the dark syntax palette. The optional lang defaults to
text. A non-string language warns and uses plain text. Missing or conflicting
inputs and blank or non-string source warn and drop the visual. The item keeps
its title, text and links.
Marquee duplication uses only CSS. The duplicate is aria-hidden and inert.
A localized checkbox preserves pause state without JS.
Reduced motion disables animation. Forced colors preserve controls. Theme images follow the shared theme event.
The navbar mega panel and columns menu parameter are retired.
Menus with columns warn and keep one column.
Compact menus use real links and buttons, trap no focus, and do not duplicate the desktop tree.
Outputs and compatibility
Output
Contract
HTML
Full static sections plus progressive enhancement
Print
Static grids and content; controls removed
Markdown
Headings, prose, lists, tables, and code without theme classes
RSS
Valid RSS document when configured; Landing sections omitted
Non-HTML outputs set no Landing flag and load no Landing runtime.
An enabled RSS output uses the shared feed renderer and matches the feed URL
advertised in the HTML head. Section and home feeds keep ordinary child-page
summaries; an explicitly enabled regular-page feed may have an empty channel.
Omitting Landing sections never means emitting an empty file or advertising a
missing feed.
Root-relative links and assets honor deployment subpaths. Normal builds download no images.
Removed 0.4 forms belong to the migration toolkit, not parallel Landing implementations.
OINK adds no pricing-period toggle, remote-fact API, hotspot editor, visual builder, or second registry.
Existing homepage data and explicit custom section partials remain valid.
Visual presets
Paper removes the hero grid and glow, uses warm shadows, Plex Sans display
headings, and a link-colored primary action. Slate retains its technical grid,
glow, Chakra Petch headings, and original primary-action colors. Shared section
geometry and density remain unchanged. The mobile drawer includes the shared
Appearance sheet; see the shell contract.
The explicit experiments also remove the grid and glow; Ink, News and Terminal
drop the shadows too. Ink writes the hero and section titles in Palatino and
Kai at text weight with a faint ink bleed, over square cards and a vermilion
primary action (gold in dark Ink). News sets the hero in its Times headline
face over square cards with a link-blue primary action. GitHub keeps 6 px
corners, light shadows, a semibold hero title and GitHub’s green primary
button. Terminal uses mono headings, 2 px corners and an amber primary action
with a static cursor-shaped decoration. None adds animation or changes section
columns.
A capabilities item with visual.type: components may attach preset to its
tiles. When interactive HTML offers that preset through params.ui.preset_menu,
the tile renders a button[data-td-preset-select] inside role="group", stays
synchronized with appearance.js via aria-pressed, and anchors its viewport
position on click. Print output and unoffered presets use static span tiles.
Landing and home Markdown list each preset tile’s title and optional detail
under its capability. An unknown preset name produces one warning per build.
Local action refinement
In OINK 1.4.0, button press feedback moves only the background; labels and hit
targets stay fixed. Command-box copy labels reserve space for both idle and
localized success text. The existing clipboard promise still controls success,
and the copy action, live status, data model, and static-output boundary are
unchanged.
v1.5.1 review corrections
These corrections shipped in v1.5.1.
HTML and text outputs share validation of record arrays for items, actions,
and pricing tiers. Malformed records warn and are skipped. Missing optional
pricing features and invalid comparison cells do not stop Markdown builds.
Landing links use the shared content URL policy before language and deployment
prefixes are applied. Fragment-only and query-only links remain on the current
page. Unsupported schemes warn and lose their link target. HTML and Markdown
follow the same link semantics.
Only the first marquee row is exposed to assistive technology; repeated rows
and duplicate groups are inert and hidden from the accessibility tree.
Landing sections keep their fluid padding without legacy default-page section
padding overriding it. FAQ focus indicators remain inside the clipped summary.
7.5 - Expo layout contract
Define album resources, display modes, image viewing, shared appearance, and static outputs.
OINK 1.8.0 contract
This contract describes OINK v1.8.0.
This page defines required behavior. Use Expo albums to
create content. Read the design decision for
the reasons behind this model.
Content and navigation
type: expo selects the album layout. A section can apply it to descendants
through cascade. One album is a Hugo leaf bundle with index.md and an
images/ directory. Image metadata belongs in the album’s resources front
matter. Separate content files for each image are not required.
Section pages list child topics and albums. The shared navigation tree supports
nested sections, the current language, and the mobile drawer. Expo uses the full
available page width and has no right-hand outline. An explicit page-level
page_width overrides the width. The top navbar follows the shared site and
page settings. Expo does not disable it by default.
As with Book, an album without a sidebar_root_for ancestor uses its top-level
section, not the home tree, as the sidebar and root-switcher root.
Configuration
expo/config.html resolves the configuration in this order:
Use the page’s expo block, including a block supplied by Hugo cascade.
If the page has no block, use params.ui.expo from the site.
Validate each field. Use its built-in default when the field is absent or invalid.
A page block replaces the whole site block. The resolver does not merge fields
from those two blocks.
Field
Allowed value
Built-in default
images
A string pattern for bundled image resources
images/*
mode
wall, cards, or seamless
wall
size
Integer from 160 to 360, in CSS pixels
240
Invalid configuration produces a warning and uses a fallback. The size is a layout target; it does
not set both dimensions of each tile.
Image resources
expo/items.html selects images and resolves metadata for all outputs. It uses
Hugo resource metadata and the shared media resolver. Non-image resources are
excluded. An optional params.original must name an image in the same bundle.
The build does not fetch remote album images.
Value
Rule
Title
Use the resource title; otherwise derive it from the filename
Alternative text
Use params.alt; fall back to the title when it is empty or absent
Caption and credit
Read params.caption and params.byline as plain text
Image order
Sort by numeric params.weight, lowest first; the default is zero
Equal weights
Keep the resource collection’s name order
Explicit ID
Start with an ASCII letter or digit; subsequent characters can also be _ or -
Image anchor
Prefix the ID with img-; without an ID, use a hash of the resource name
IDs must be unique within the album. An ID may be a string or a YAML integer.
Invalid or duplicate IDs produce a warning and use a filename hash; if that
hash is also occupied, the fallback appends the first unused numeric suffix.
Renaming a file changes its fallback anchor. Keep an explicit ID and the album
URL unchanged when a citation must remain valid. expo.images must be a
nonempty resource glob, and params.original must name a bundled image even
when its value is false or empty.
Processable images larger than 960 pixels receive previews within a 960 × 960
pixel box. GIFs also receive still previews for pause and reduced motion.
The animated source remains available. Original files remain unchanged.
Album cards use the first sorted image as the cover. A section without its own
images uses the first available image from its descendant albums. Cover frames
use a 4:3 ratio and can crop the preview. Authors divide large collections into
albums; Expo does not paginate image resources automatically.
Layout and controls
Mode
Geometry and captions
Wall
Rows of tiles with 6 CSS pixel gaps; captions appear on hover or focus on devices that support hover
Cards
Columns filled from the shortest column; captions stay visible
Seamless
The Wall calculation with zero tile gaps; the same caption behavior
Tile proportions are bounded for very wide or tall images. Each tile contains
the complete image, which can leave space inside the tile. On devices without
hover, captions remain visible below the images.
The toolbar has a three-cell radio group on one background. A play/pause button
and a horizontal size slider follow it. Small and large image icons mark the
slider ends. All controls share a vertical center. Albums without GIFs retain
a disabled play button. Each icon control has a localized name, a tooltip where
applicable, and visible keyboard focus. Cards and album covers use the preset’s
radius token; Wall and Seamless tiles stay square. A focused tile shows a
two-tone inset ring above its caption.
Appearance controls stay in the shared navigation. The album body has no
appearance picker or article action menu. Without JavaScript, image links and
captions remain visible.
Reader preferences and appearance
The browser stores the selected mode and size in td-expo-mode and
td-expo-size. Only valid values take effect. A valid stored choice overrides
the author default. It applies across albums and reloads on the same origin.
Invalid or unavailable storage leaves the author defaults in effect.
Display mode and size are independent of appearance. Paper, Slate, GitHub,
Ink, News, and Terminal use the shared colors, type styles, and corner settings
in light and dark mode. A preset change recalculates the grid after typography changes.
It preserves the reader’s display mode and size.
GIFs play by default in the grid and viewer. The play/pause control changes
animation for the current album and its viewer. The setting is not stored
across page loads. prefers-reduced-motion: reduce starts with still previews.
The reader can select Play. A change to the system preference updates playback.
The first four tiles load eagerly; later grid images use lazy loading.
Layout stability
Expo reserves document scrollbar space when scrollbars consume layout width.
An album near the viewport height must reach a stable layout. A scrollbar must
not repeatedly appear and disappear as the grid recalculates its height.
Opening or closing the viewer must preserve the underlying grid’s usable width.
Viewer behavior
The viewer uses a native modal dialog. Its image area excludes the toolbar and
caption area. Let W and H be the original image dimensions. Let A and B
be the available image-area width and height, in CSS pixels.
Action
Scale
Open or reset
min(1, A/W, B/H)
Expand to fit
min(A/W, B/H)
Zoom in
Current scale multiplied by 1.25, within the zoom limit
Zoom out
Current scale divided by 1.25, within the zoom limit
The smaller ratio is the limiting edge. Both automatic sizing actions contain
the whole image and have no image-area scrollbars. Reset keeps a small image at
100%. Expand can enlarge it. Expand does not use the browser Fullscreen API.
Only manual zoom can exceed the image area and enable scrolling.
The percentage uses source pixels as CSS pixels. Zoom preserves the viewed
center. Reset centers the image. Changing images resets size and position.
Previous and Next stop at the album boundaries. A boundary key leaves the
current scale and position unchanged.
Pointer and keyboard input
Hold the primary mouse button and drag to move an enlarged image. The image
follows the pointer and stops at its bounds. Only overflowing axes can move.
Touch input on an enlarged image retains native scrolling. Releasing or
canceling the pointer, changing images, resetting, or leaving the window ends
the drag. When the image fits the image area, a horizontal swipe of at least
48 CSS pixels changes images; pinches and a zoomed page do not.
Double-click or double-tap alternates between the initial size and a closer
look. A shrunk original opens at 100% with the point under the pointer kept in
place; an original already at 100% expands to fit. From any other size it
returns to the initial size.
Viewer shortcuts apply inside the open dialog. They ignore text input, input
method composition, and Ctrl/Command/Alt combinations. Page-level single-key
navigation pauses while the dialog is open. When the dialog is closed and
keyboard_nav is enabled, ; cycles gallery layout modes (wall → cards →
seamless), , / < shrinks the tile-size slider by one 20 px step (down to
160 px), and . / > enlarges it by one 20 px step (up to 360 px). Focus on
the toolbar’s layout radio inputs or range slider does not suppress these keys.
keyboard_nav controls those page-level bindings; it does not disable Expo’s
viewer runtime.
Key
Action
W / A / S / D
Move the enlarged image up / left / down / right, 80 CSS pixels per press
Q or H
Previous image
E or L
Next image
J or −
Zoom out
K or +
Zoom in
R or 0
Reset size and position
F
Expand to fit and center
Escape
Close the viewer
Left and Right arrow keys change images when no horizontal scrolling is needed.
Otherwise, they retain native scrolling. Button tooltips show the applicable keys.
In right-to-left languages the album order mirrors: the arrow key toward the
start opens the previous image, swipes follow the same direction, and the
previous and next icons mirror.
Links, focus, and loading
Open original links to the original file in a new tab. Locate in album closes
the viewer, updates the URL fragment, scrolls to the current image, and focuses
its trigger. Closing normally returns focus to the link that opened the viewer.
The native dialog contains focus and prevents underlying page interaction.
The underlying page cannot scroll while the viewer is open.
The viewer registers with OinkSurfaceCoordinator: opening it closes other
floating surfaces, and closeOthers() or closeAll() can close it. A handoff
keeps focus in the newly opened surface.
While an original loads, the viewer shows the grid preview at the final size;
a failed original keeps that preview. After an image loads, the viewer requests
one neighbouring image on each side.
Expo loads its viewer and layout runtime only on HTML albums with images.
Ordinary Image Zoom retains its single-image behavior and does not wrap Expo
links again. Without JavaScript or dialog support, those links open the originals.
When changing images, clear the previous decoded image while the next original
loads, and show the new grid preview at the final size. A failed original keeps
that preview. Album prose and image headings remain separate Markdown blocks.
Other outputs
All outputs use the same image resolver. Enable each format through the normal
OINK output configuration.
Output
Image content
Print
Still previews, titles, captions, credits, and original links; no Expo runtime
Markdown and LLMSFULL
Original-image links and metadata
LLMS
Album pages in the existing index
RSS
Static image descriptions
Browser print
Expanded album content with controls hidden
Authors translate album content and resource metadata. Image controls use the
shared interface catalogs. The existing gallery fence remains an inline
component with its own contract.
Acceptance and release boundary
Run the focused theme checks from the theme checkout:
Run site acceptance from the sibling documentation checkout:
make check
make browser
The bilingual examples are the integration and visual review surface.
tests/browser/expo.spec.mjs checks interaction and accessibility.
expo-stability.spec.mjs samples consecutive frames near the viewport-height
boundary. It forces width-consuming scrollbars independently of host settings.
For the additional Chromium, Firefox, and WebKit checks, install the matching
Playwright browsers and run from the documentation checkout:
HUGO_MODULE_REPLACEMENTS="github.com/pgsty/oink -> $(cd ../oink &&pwd)"\
npm run test:expo:engines
The separate Graph copy supplies additional large-collection evidence.
7.6 - OINK migration boundary
Supported source, configuration, and validation boundaries for OINK migration, including the 1.6.0, 1.7.0, and 1.8.0 upgrades.
OINK 1.8.0 contract
This contract describes OINK v1.8.0.
This page defines the maintainer migration toolkit and configuration boundaries.
See Upgrade for the reader-facing upgrade guide.
Toolkit scope
bin/migrations/oink06.py scans and automatically rewrites only Markdown in a site’s content directory, including supported YAML front matter.
It does not rewrite Hugo configuration, data, layouts, assets, modules, or generated output.
It reports TOML/JSON front matter and ambiguous Markdown with source positions for manual review.
Dry-run is the default. Completed migrations are idempotent:
Code-fence contents are not rewritten, including fences starting on the same line as ordered or unordered list markers, with optional blockquotes.
An extra literal quote prefix within a code example does not close the fence.
book_figures.py keeps narrow TPME, DDIA v1/v2, and pg-internal profiles. It is not a generic parser.
Before deleting existing output, bin/measure-baseline.py and bin/sites/build-all.py reject snapshot destinations that overlap protected locations.
These locations include input sites, the running tools checkout, the selected theme checkout, and other snapshots.
The check includes --keep destinations through symlink aliases and alternate --theme checkouts.
Updating consumer repositories
After publishing a theme release, inventory maintained consumer checkouts and update their exact pins.
bin/update-consumers.py scans primary project directories under supplied roots and their site/ directories.
It does not recurse into archives, generated sites, caches, or theme fixtures.
The tool ships with OINK 1.2.0. Run it from the theme checkout to inventory
consumers and upgrade them to the published tag.
The first command only reports adoption.
The second updates go.mod (including any required minimum Go directive bump) and OINK’s go.sum entries, verifies the exact module graph, and builds selected sites with warnings visible.
It disables GOWORK, Hugo’s module workspace, and environment module replacements.
Logs and original module files go to a temporary report directory or the explicit --report-dir.
Failed updates restore module files. Failed builds keep the new pin for diagnosis and return failure.
Unreadable roots or malformed consumer modules become failed entries. Inventory continues through other sites and exits nonzero.
Explicitly selected missing or non-consumer directories also fail visibly.
Linked worktrees, hidden copies, and non-default branches are skipped. Review every skipped or blocked entry.
An explicit project root resolves to its site/ directory when that directory contains the Hugo site and the root is not itself a Hugo configuration or OINK consumer. An unrelated Go application’s root go.mod does not prevent this resolution. An actual root consumer takes precedence.
--sites <path>... selects a reviewed site explicitly, including checkouts with existing module edits and source directories without Git. Source-only directories are skipped during automatic discovery until selected explicitly; they receive the same file backups and build checks.
Classic themes/oink consumers are listed for separate maintenance: update a clean Git submodule to the published tag, or back up and replace a verified upstream source copy. Preserve offline builds and site-level overrides, then run the owning site checks. The module updater does not rewrite classic theme directories.
Manually resolve OINK replacements in go.mod.
Review vendored themes separately before --refresh-vendor, which backs up and regenerates _vendor/.
Changing a module pin alone does not update vendored themes. Hugo’s resolved module graph determines whether OINK actually uses vendor output. A retained snapshot bypassed by ignoreVendorPaths is preserved and does not block a published-module upgrade.
To offer all six styles with Paper as the site default, set the site configuration explicitly:
preset_menu: true offers the stable styles and the site default; the explicit list also opts into GitHub, Ink, News and Terminal. Maintained sites adopt the six-style list from OINK 1.8.0 onward; sites pinned to 1.7.0 keep the four styles it has. These settings persist across later pin upgrades. Review sites with a custom shell separately: configuration alone does not add appearance controls to templates that bypass OINK’s shell.
The maintainer checkout also supports --check-appearance together with --check. It checks the fresh rendered home pages, including localized entries, for Paper as the default and all six style controls. Sites that disable Home are checked at their documentation entries; redirect aliases are omitted. Browser interaction and each site’s owning checks remain separate.
Preserve unrelated work. Update current theme-version references in site READMEs and configuration.
Run each site’s owning checks and visual review.
The tool updates module pins and runs build checks without editing content or committing.
0.4 content to current forms
Removed form
Current form
Toolkit key
alert, details, pageinfo, raw disclosure
> [!TYPE] callout
callout
tabpane, legacy tab, code-group, code-tab
adjacent {tab=} blocks or tabs / tab
tabs
FileTree shortcodes or {.filetree} list
filetree fence
filetree
Gallery shortcodes or {.gallery} list
gallery fence
gallery
ECharts / infographic shortcode
same-named data fence
datafence
Docsy card families
.cards list or cards / card
cards
imgproc, image
Markdown image + attributes
image
readfile
include
include
fence filename=
title=
fencetitle
badge outline=
remove outline
badge
leaf example, book-figures kind=
eg, explicit book-* index
eg
percent-delimited fields
angle-delimited fields / field
fieldsdelim
Docsy _param placeholders and card header= highlights
Font Awesome / badge / param or callout
param_placeholders
legacy social shortcode
> [!SOCIAL] callout + attribute line
social
unsupported legacy shortcodes
manual review with source position
reportonly
Configuration and front matter
Make these configuration changes manually. The toolkit may report matching front matter keys but never edits site configuration.
Old
Current
offlineSearch*
offline_search*
disable_click2copy_chroma
ui.code_copy (inverted)
content_width
`reading_width: slim
github_url
github_repo
ui.no_left_sidebar
ui.sidebar_enabled (inverted)
breadcrumb aliases
ui.breadcrumb
ui.scrollSpy
No behavioral replacement; ui.scroll_spy remains a quiet 1.x compatibility no-op
Prism, rss_sections, and algolia_docsearch are removed.
Chroma is the only highlighter. Algolia configuration uses search.algolia.
Page overrides omit ui..
Legacy hide_feedback, hide_readingtime, exclude_search, content_width, camelCase manual links, and nested front matter ui maps are reported with replacements.
0.5 to 0.6
Replace upstream_attribution with upstream_link plus
upstream_name, upstream_copyright, upstream_license, and
upstream_notice; rename downstream_modified to upstream_modified.
Replace the release map with one GitHub release_url; remove
release_products and release_group_by_product from release indexes.
Blog and default dates now default to ISO 2006-01-02; retain explicit
time_format_blog or time_format_default for prose dates.
Removed names warn and use the documented safe fallback or render nothing, allowing ordinary previews to continue.
blog_index_toggle, featured_image: hero, toc_style, and toc_taxonomies are additional opt-ins.
They add no content type. Immersive reading remains on the ordinary blog shell.
Prerequisites and validation
Enable Goldmark unsafe rendering, block attributes, and standalone block images as specified in the component contract.
Enable passthrough explicitly for \(...\), \[...\], or $$...$$. Hugo does not merge theme markup configuration.
Run the smallest source and output checks for the changed contract with the installed Hugo (tested on 0.170+).
For runtime changes, also run JS tests. Run production root and subpath builds.
For maintained sites, inspect representative EN/ZH Docs and Blog routes at desktop and narrow widths.
7.7 - Design decisions
Accepted decisions that explain why OINK’s current contracts and implementation have their present shape.
Accepted rationale
A decision explains why OINK selected one compatible design instead of another.
The six contracts define the required current behavior. The implementation
and its checkers define the executable facts.
OINK previously kept reviews, PRDs, and execution notes in a local plan/
directory, which made useful reasoning hard to find and allowed abandoned
designs to appear authoritative. Accepted rationale now lives here, beside the
contracts it supports, in the same bilingual, versioned site.
Twenty-nine single-key shortcuts in three groups, dimmed unavailable rows, local history, fold-all and a reader width
Record format
An accepted decision records its context, choice, consequences, and evidence
that the choice remains current. It does not repeat a parameter reference or
tutorial. Each decision links to its contract and verification checks, and its
English and Simplified Chinese pages change together.
When a decision changes, update the implementation, checker, affected contract,
and decision record in one delivery. Preserve the previous decision in Git
history and the release changelog rather than leaving two active answers in the
navigation tree.
Invalid input produces visible warnings and safe fallbacks. Checks verify diagnostics and rendered output without aborting on every warning.
Decision
OINK does not call Hugo’s errorf. Invalid author or site input produces a
warning. OINK then uses a documented safe fallback or omits the invalid
fragment. Development, CI, release, and deployment run Hugo without
--panicOnWarning or HUGO_PANICONWARNING. Warnings stay visible;
checks verify the specific diagnostic and the rendered fallback.
Context
Hugo builds the whole site as one transaction, so an errorf from one edited
page makes every URL served by that rebuild return an error, including unrelated
pages and the home page. The server process continues and recovers after the
input is corrected, but other authors cannot use the preview in the meantime.
A warning allows the affected value to use a safe fallback while other pages
remain available for inspection and the author receives a precise message.
Production builds keep these warnings visible for review. Published v1.5.1
also prints Hugo’s accepted LibSass deprecation warning. After v1.5.1 the theme
contains no Sass, so that warning marks a regression; unexpected theme or
content warnings need review.
Decision
Validation follows four rules:
Name the invalid key and value, the allowed shape, and the fallback.
Include a page position when the value came from page front matter; avoid
repeating one site-wide warning for every page.
Never pass an invalid value into a later operation. Validate first, then
render from the normalized value.
If no valid fallback exists, give a warning and render nothing. Do not
invent content, make a network request, or emit an unsafe URL to continue.
The shared enum, boolean, CSS-length, and number shapes are in
layouts/_partials/validate.html. Domain resolvers may add narrower checks,
but they preserve the same warning/fallback contract.
Safety boundary
A build must never continue with unsafe output. OINK replaces a rejected CSS
length before it reaches a style attribute, omits a component with incomplete
remote service configuration before the browser can make a request, and removes
unsafe action URLs. These fallbacks protect the reader without terminating
Hugo.
Editing and publication share the warning and fallback behavior:
Stage
Invalid input
hugo server or an ordinary local build
Warn, fall back or omit, keep other pages available
CI, release validation, deployment
Warn and fall back; review diagnostics and verify the output
Consequences
Every fallback is part of the public contract and must match the default
declared by the theme.
When failure behavior changes to a fallback, update its tests. A negative
test must check build success, warning text, and the rendered fallback or
omission. A warning alone must not fail the Hugo build.
Checkers must test rejected output directly. For example, a URL security
test must confirm that the unsafe URL is absent and that the warning is emitted.
Rendered markup checks verify the DOM, attributes, order, and emitted tokens,
while the browser suite checks computed color, size, spacing, breakpoints,
and interaction. When the public result is directly observable, a checker
does not require exact stylesheet source text.
Source-level checks detect forbidden constructs such as errorf and
structural requirements that output cannot prove, such as one authority,
one resolver, or a deliberately restricted caller set.
Verification
The owning references are the
architecture contract,
bin/check-params.py, and production builds of both the theme fixture and this
integration site.
The warning policy was updated on 2026-10-18. Do not restore a warning-fatal
publication gate.
7.7.2 - Configuration model
Hugo and Docsy-compatible configuration, with a narrow OINK interface and no parallel configuration namespace or global resolver.
Decision
OINK retains Hugo’s native keys and useful Docsy-compatible keys.
Theme presentation and behavior use params.ui.*. A page override uses
the matching top-level front-matter key. OINK does not add a params.oink.*
tree or a second registry for Hugo configuration.
Context
OINK extends existing configuration with shells, content output, and local
interaction. Earlier designs attempted to move all theme-owned keys to a new
namespace and resolve a complete configuration dictionary for each page.
That approach added a second configuration language beside Hugo’s keys,
complicated section cascades, and required a large migration for limited
behavior changes.
The current model defines these responsibilities:
Layer
Responsibility
Examples
Hugo
Site identity, languages, menus, outputs, taxonomies, markup, modules
baseURL, languages, outputs
Site facts and integrations
Repository, version, author, local search, comments, external services
Structured facts and ordered content that are not switches
data/landing, data/download, data/docs_nav.json
Decision
The configuration API follows these rules:
Site facts remain at the established top level. Interface choices belong
under params.ui.*.
A page override drops the ui. prefix and otherwise keeps the same name.
A section cascade can apply that top-level key to its descendants.
If a scalar describes the complete policy, use it for a boolean feature.
Use a map only when a feature has subordinate settings. An established
map may accept a boolean shorthand.
Use positive, snake_case names grouped by function. Closely related settings
share a prefix without requiring another nested resolver.
Declare theme defaults in the theme’s hugo.yaml. Templates may derive a
default only when one static value would remove a deliberate distinction
between shells.
Each feature family owns its normalization and validation, using a shared
helper for common shapes. There is no global compatibility registry that
silently rewrites arbitrary old keys.
The complete current key list, types, and defaults are in the
configuration reference. This decision records the
placement rules rather than maintaining a second parameter catalog.
Compatibility
For each public rename, the owning resolver gives a targeted warning, supported
by a migration note and a negative test.
Removed or misspelled keys do not require a permanent alias layer.
If a rename would break the native API, retain Hugo and third-party camelCase
keys. OINK-owned additions use snake_case.
Hugo’s ordinary front-matter and cascade model resolves page values. OINK does
not ask authors to build a nested ui: tree in front matter or promise to merge
arbitrary nested page maps.
Consequences
Adding a public setting requires a declared default or an explicitly derived
default, an owning resolver, documentation, and a positive and negative test.
Configuration guides link to the one reference table instead of repeating
types and defaults.
A new data structure is justified by ordered or repeated facts, not merely
by a desire to avoid adding a parameter.
bin/check-params.py checks declared defaults, page aliases, warning behavior,
and the no-errorf requirement. The integration site’s bilingual and
rendered-link suites check the public reference and its Chinese peer.
7.7.3 - Markdown-first authoring
Native Markdown carries common semantics, shortcodes fill capability gaps, and new content models extend shared shells.
Decision
If Goldmark can preserve the intended meaning, prefer a native Markdown form.
Keep a shortcode only when the native form cannot provide its capability.
For a new content scenario, extend an existing shell and data model.
Do not create a parallel rendering system.
Context
OINK supports short manuals, large references, release archives, landing pages,
and books. A survey of eleven consumer sites examined more than five thousand
Markdown files and found both extremes: pages with almost no theme syntax and
pages assembled from many nested shortcodes and local layout overrides.
A component API optimized only for the second group becomes a private DSL,
while one limited to plain Markdown leaves books, rich figures, tab groups,
and structured releases to site-local HTML. The useful boundary is capability,
not novelty.
Decision
OINK applies the following order:
Native Markdown first. Lists become Steps, Cards, or FileTree markers;
tables become Fields or matrices; blockquotes become callouts; fenced code,
images, and passthrough blocks carry attributes through render hooks.
Shortcodes for missing capability. A full-form shortcode remains where
CommonMark indentation, nested containers, processing options, or
cross-page registration cannot express the same result safely.
One semantic implementation. Native and full forms share normalization,
partials, and an output contract, making them one component rather than two
components with the same appearance.
One extension line. A new Landing section joins the section registry;
a new Blog presentation remains a Blog variant; Book numbering joins the
content primitive and navigation systems. OINK does not add a second card,
landing, navigation, or article shell for one feature.
Facts stay outside presentation strings. Versions, repositories,
dates, and ordered records come from front matter, site parameters, or data
files. A shortcode argument is not a second source of truth.
Output contract
An authoring form is complete only when it defines a result for its semantic
content in every enabled output:
Output
Requirement
HTML
Semantic server-rendered content; JavaScript only enhances it
Print
Static, expanded, and free of controls that require interaction
Markdown / LLMS
Source-shaped prose, links, lists, tables, and fences; no component HTML
RSS
Safe static content or an explicit omission
This requirement prevents an HTML-only component from removing or corrupting
content in agent output, feeds, or a printable book.
Trust and presentation
Render hooks and shortcodes use explicit allowlists to remove unsafe URL
schemes, inline event handlers, and arbitrary style input. Author-provided
classes are accepted only where the documented contract permits downstream
site CSS. Icons use one Font Awesome class pair, without a second icon-ID
language.
Consequences
A proposed component must first show why Markdown plus an existing hook is
insufficient.
Keeping a full-form shortcode requires a named capability and tests for both
forms reaching the same normalized output.
Shell variants use independent presentation keys so opting into a hero or a
flow outline does not change taxonomies, feeds, pager order, or content type.
Consumer evidence is dated research, not a permanent excuse to freeze an
accidental syntax. The current public surface remains defined by the
component contract and
shell contract.
Verification
Theme component, Book, output, and golden checkers test the authoring contract,
followed by this site’s bilingual examples and browser suites for the integrated
result.
The Goldmark behavior that supports native forms is recorded in
block-attribute research.
7.7.4 - Generated configuration schema
Editor schemas generated from existing configuration sources, with a CI gate that prevents drift.
Decision
bin/generate-config-schema.py generates the two JSON Schemas under schema/.
It reads the theme’s hugo.yaml and the template read-point scan.
CI rejects manual schema changes. The schemas are read-only projections
of the existing configuration authorities. They are not a third authority.
Context
The theme already has two configuration authorities: hugo.yaml declares each
default beside an explanatory comment, and the read-point scan in
check-params.py identifies each key that the templates consume. Editors do
not read either source, so authors have to enter params.ui.* keys and front
matter from memory.
A JSON Schema gives editors completion and hover documentation, but a manually
maintained schema can become a third authority that drifts from the
implementation. Incorrect completion can cause more problems than no
completion, so the schema must follow the existing sources.
Decision
bin/generate-config-schema.py generates two files under schema/.
site-params.schema.json validates a site’s hugo.yaml, taking types and
defaults from the theme’s own hugo.yaml and descriptions from its comment
blocks. front-matter.schema.json validates page front matter and includes each
key that the templates read as an authoring input, with descriptions from the
matching site key. The generator excludes, by name, keys read only to warn about
a rename or removal.
Two deliberate restraints are part of the decision:
The front-matter schema has no type constraints. Several keys accept a
bare-boolean opt-out in addition to their site type (share: false,
theme_color: false). An incorrect editor warning for valid input would be
worse than no warning.
The hugo.yaml reader parses only the shapes that the file uses: nested
maps, scalars, and inline lists. If the parser cannot read an input, it fails.
The drift gate then fails instead of generating an incorrect schema.
The parameter checker identifies maps with documented boolean shorthand.
The generated site schema preserves both boolean and object forms for those
maps, including ui.dark_mode; pure configuration maps such as print and
ui.expo remain objects. Front-matter read points such as feedback.enable
produce nested properties under feedback, never literal dotted keys. Those
properties do not exclude the supported boolean page override.
Consequences
To change a schema, change hugo.yaml or the templates that the scan reads.
When public configuration changes, regenerate the schemas in the same commit.
Maintainers do not need a second parameter inventory, but the generator and
read-point scan constrain the public configuration surface: a new parameter
key must use a shape they understand, or CI fails.
Verification
python3 bin/generate-config-schema.py --check regenerates schemas in memory
and fails if schema/ is stale or missing. Theme CI runs this check with the
parameter contract checker. Editor configuration and schema behavior are
documented normatively in Configuration.
Visual preset enum values are also derived from preset-config.html. The
preset_menu union accepts a boolean or a list of those resolver-owned values;
the schema does not maintain its own list.
7.7.5 - Optional CLI and result contract
Executable ownership, versioned diagnostics, isolated validation, and guarded maintenance plans for the current local CLI candidate.
Current scope; local candidate
This contract describes the reduced local 0.1.0-dev command surface on
2026-10-04. Keep site diagnosis, real Hugo checks, initialization, builds,
upgrades, and guarded maintenance plans. Cobra provides command help;
colored English text is the default, with JSON/YAML results available.
Studio, general editing, context, snippets, editor setup, and CI generation
are retired. Historical R1–R8 acceptance applies only to its recorded source
and binaries; it does not replace validation of the current implementation.
The CLI is currently a local candidate and is not yet published as a
standalone release or Homebrew package.
Context and ownership
The theme is a Hugo module, while consumer tooling is an optional executable
with a separate installation and release lifecycle. pgsty/oink-cli owns that
executable, named oink, and its Go tests. It invokes an external Hugo binary
without importing Hugo’s private runtime or depending on a sibling checkout,
Python, Node.js, or unpublished theme scripts at runtime.
Hugo owns configuration resolution, rendering, routes, and anchors. The CLI
inspects Hugo’s effective configuration, module graph, mounts, and rendered
files. It does not create a second route resolver, navigation authority, or
configuration namespace. Theme-only regression scripts remain maintainer tools.
Configuration preprocessing relocates workspace, replacement, and cache paths
only in the temporary copy. Hugo still owns defaults, configuration merging,
language selection, validation, and rendering semantics.
The public architecture contract continues to own
theme behavior; this page owns the initial CLI boundary and result envelope.
The CLI introduction provides a short overview and local build steps.
The dated acceptance record
separates executed checks from open limitations and release states. The
maintenance acceptance record
preserves the earlier R1–R8 program and its source-bound evidence. The
roadmap retains future proposals and
adoption hypotheses rather than duplicating the current command reference.
Command and mutation boundary
Help groups commands by daily, maintenance, and release work. Run
oink COMMAND --help for the exact options.
Requires an explicit reviewer/reason. Preview with an optional new --plan
new BUNDLE --title TEXT, move SOURCE TARGET
Validate a candidate and preview its full diff. An optional new --plan saves the plan
plans apply FILE
Revalidate supported saved plans. Write only selected files in the selected site
inspect PAGE, impact --since REF
Read-only actual page and historical/current impact facts
workspace list, workspace check [GROUP]
Select only explicitly registered sites
build --check
Check, seal, and export the same isolated production render
artifacts verify
Compare local artifacts with a manifest offline
verify
Compare deployed HTTP responses with a manifest after explicit --network
Network access is off by default. All commands are non-interactive. Only
dev and build accept Hugo arguments after --. Removed commands and their
old plans cannot apply. Supported plan kinds are authoring.new,
translations.review, baseline.capture, and content.move.
Versioned result envelope
Option
Output
Default
Concise colored English text
--json, -J
One JSON oink.result/v1 object
--yaml, -Y
One YAML document with the same result fields and types
--verbose, -v
All findings, coverage details, and tool logs
--no-color
Plain English text
Choose one structured format. Nonempty NO_COLOR or TERM=dumb also disables
text colors. Structured output adds no terminal colors. Tool logs go to
stderr. --format json|yaml and --non-interactive remain hidden compatibility
options. Every command is non-interactive.
Default text shows status, counts, up to eight active findings, and explicit
coverage omissions. Detailed facts and reviewed findings remain available in
structured results. Plan and upgrade previews retain their complete diffs.
Cobra owns command dispatch and focused help. CLI messages use short, active
English sentences inspired by ASD-STE100.
User content and external tool evidence retain their original language.
Field
Type and meaning
schema_version
String; oink.result/v1 for this contract
version
String; CLI build version, including a development suffix when applicable
command
String; requested command, or help / version
site
Optional string; selected source or generated target directory when available
exit_code
Integer; the CLI result code defined below
diagnostics
Array of findings; an empty array means no recorded findings
coverage
Array of scoped coverage statements; callers must inspect these alongside findings
evidence
Array of subprocess records; empty when no subprocess ran
data
Optional command-specific JSON value; current commands return objects such as inspected facts, initialization provenance, or an upgrade plan
The first version permits additive fields and new rule IDs. Consumers should
ignore unknown fields and treat IDs as opaque strings rather than parse their
spelling.
A change to the meaning or type of an existing envelope field requires a new
schema version. Command-specific facts and raw tool output serve as evidence,
not an SDK for importing internal Go packages.
The machine-readable schema is shipped in the CLI repository as
schema/result.v1.schema.json.
Each evidence record has command (an argument array), optional directory,
stdout, stderr, and the subprocess’s exit_code. Captured inspection and
build output remains available in the result. Directly streamed dev/build
output is sent to the logging stream rather than buffered again in evidence.
The subprocess status remains separate from the CLI’s 0/1/2 result;
a negative subprocess status can mean that no normal exit code was obtained.
Findings, severity, and locations
Every diagnostic has rule_id, severity, message, and action, plus an
optional location. Stable rule IDs identify the condition. Raw Hugo wording,
translated messages, paths, and build-specific details are not stable IDs.
Existing IDs must not be reassigned to a different condition.
The optional incomplete: true identifies a required-work failure that policy
cannot downgrade. Reviewed exclusions and baseline acknowledgements retain the
finding in diagnostics with disposition: "excluded" or "baseline" and
review containing reason,
reviewed_by, and RFC 3339 reviewed_at. An excluded finding remains visible
with its recorded severity. It does not block the completed policy check.
Any uncompleted required coverage, including not_checked, determines exit
2. Only complete or not_applicable satisfies required coverage.
The severity vocabulary is info, warning, and error. error is blocking.
info and warning are advisory unless the underlying required Hugo
build or its owning output check fails, in which case required work is incomplete.
Informational completion and scope explanations belong in coverage details.
Automation must use the result exit code and coverage, not only count severities.
When present, location contains file, with optional kind, line, and
pointer. kind distinguishes source from output. A rendered finding
points to the actual artifact and may include an element, attribute, or JSON
location hint in pointer. This field does not always use RFC 6901 syntax. A line number is included only when known. A rendered link failure
does not justify inventing a Markdown source line.
The CLI does not reject unknown valid front matter merely because a generated
editor schema omits it. Configuration validity continues to follow Hugo and
the owning theme resolver/checker. See the
generated schema decision.
Coverage and exit semantics
Each coverage entry contains id, status, required (boolean), and detail.
Entries describe the scope that actually ran. A report may contain several
statements about the same broad area. Inspect all of them.
Status
Meaning
complete
The stated operation, inspection, or artifact-check scope completed
not_checked
This run did not inspect the stated scope
not_applicable
The stated check is unnecessary for these inputs
unsupported
The stated contract or required input shape is unsupported
incomplete
The stated work was required but could not finish
CLI exit code
Meaning
0
Requested required work completed without blocking findings
1
Completed checks identified a policy violation, such as a broken local link or an unsafe requested write
2
Required work is incomplete, including argument, tool, build, I/O, cancellation, or required unsupported-contract failures
Incomplete work takes precedence over policy findings. Required coverage that
has not completed cannot produce success. Only complete or not_applicable
can satisfy it. Hugo build failure preserves the
raw evidence and stops output acceptance. The CLI does not report stale or
partial output as a passing check. Disabled optional machine outputs do not
become missing-output errors.
The rendered-reference scope includes supported HTML URLs and anchors and
supported emitted machine contracts. Coverage explicitly excludes browser
interaction, accessibility, visual presentation, external URL availability,
hosting redirects, and production deployment. It also identifies uninspected
dynamic resources and content semantics. Static output checks inspect declared
translation pairs and rendered files; browser execution and semantic translation
review remain separate.
Hugo’s public Page.OutputFormats supplies expected artifact names and URLs
per page and per enabled language. The isolated copy adds an unlisted probe
with a unique per-run identifier. Each enabled language must emit its own
verified manifest. Identified probe files are removed before artifact checks.
Existing authored pages retain their output selections. Static content hidden
from ordinary page lists is resolved through Hugo’s GetPage, without
deriving its route or output filename from source syntax. Effective per-language
base URLs and local-search settings accompany that enumeration. Enabled
supported machine artifacts are checked against these exact expectations.
Optional disabled outputs remain optional.
The same Hugo probe supplies data.pages through public Page.Path,
Page.File, Page.Translations, Page.Aliases, and Page.OutputFormats.
Facts retain language, actual URLs, publication settings, translation
relationships and declared outputs. sourceKnown: false and
sourceScope: "unknown" identify pages without proven source provenance.
Generated sections do not receive invented source files. Site-owned known
paths are relative to the selected site. Known copied dependency inputs have
explicit dependency scope. These facts describe the production view. A separate
internal analysis view can include drafts, future, and expired pages. It does
not change production artifacts or claim publication of those pages.
data.references records observed HTML and machine-output references, their
actual resolved URL, output file/pointer, local target when present, and anchor
status when checked. It does not infer a Markdown source line. Page and
reference data remain additive command evidence. They are not a public Go SDK.
Project check policy
An optional regular oink.yaml at the selected site’s root uses
schema_version: oink.policy/v1. It owns check selection, severity overrides,
reviewed finding exclusions, reviewed external URL scopes, translation scopes,
protected prose declarations and the optional baseline file path. Hugo inputs
continue to own languages, titles, URLs, menus, and configuration. Module files
own dependency versions. A symlink, unknown key/group, unsupported version,
invalid review metadata or multiple YAML documents is required input failure
(exit 2). Diagnosis and checks only read this policy.
Without a policy, links, translations and style are enabled and required.
check links, check translations, or check style explicitly selects one
required group, regardless of its policy selection. Unselected or disabled
optional groups report not_checked. Every check invocation retains the
required Hugo build and diagnostics and output-enumeration prerequisites. Standalone
translation/source checks also use an explicit nonpublishable draft/future/expired
analysis view. It never replaces production artifacts. Managed build --check
renders only the production view and returns 2 for unknown required scope identities.
The rules mapping assigns error, warning or info to exact opaque rule
IDs. A reviewed exclusions entry requires rule_id, a clean relative file
glob, reason, reviewed_by, and RFC 3339 reviewed_at. ** patterns and path
escape forms are unsupported. Findings remain visible with review metadata.
Site-local source locations match their relative site path. Source paths
outside the selected site cannot match an exclusion.
Required build, input, tool or coverage failure cannot become success through
severity changes or exclusions.
Same-origin HTML references outside the configured base path are policy
findings unless a reviewed external_scopes URL declares a separately deployed
path scope. Each scope needs the same review metadata and an absolute HTTP(S)
URL without credentials, query or fragment. Matching uses complete path
segments. The scope cannot exempt missing targets inside the project or required
local machine-output targets. Different-origin references remain explicitly
unverified by offline static checks.
Translation policy and review evidence
translations.scopes selects source pages using clean absolute Hugo
Page.Path prefixes, then finds targets through Hugo’s translation identity.
It does not infer a public route or language from a filename. Each scope has
path, source_language, required_languages, mode and drafts.
mode defaults to localized. strict is also supported. drafts defaults
to include. ignore excludes draft sources/targets. require-published
requires the selected source and required targets in production.
Known disabled Hugo languages are not_applicable. Unknown languages make
the policy invalid. The most specific matching path owns a source page.
Without scopes, existing pairs rooted in Hugo’s enabled default language and
duplicate relationships are inspected. Universal localization is not required.
translations.coverage records the unconfigured language scope as optional
not_checked. Missing required targets and duplicate selected relationships
are policy findings. Draft/publication state is independent of review state.
Constraints require explicit selection. explicit_ids compares the full
recognized explicit-ID map in strict mode. Localized mode requires a selected
ids list. ids requires
each named ID in both files, placeholders compares exact declared prose-literal
counts, and code_labels protects fenced blocks with each named language/info
token. required_fields requires nonempty dotted front matter fields in both
files. equal_fields compares their actual values. No rule requires matching
heading counts, translated prose or all code blocks by default.
.oink/translations.json uses oink.translations/v1. Explicit review records
bind Hugo source/target IDs, source language, complete source/translation byte
SHA-256 values, reviewer, reason, and RFC 3339 time. An absent record is unknown.
Equal hashes are current. Source-only, target-only, or both changes are
source_changed, translation_changed or both_changed. These states track
byte changes since the recorded review rather than file modification times.
Unproven sources stay unknown. If a recorded review or
protected constraint cannot be verified, required work is incomplete.
Native content rules and coverage
Source rules extract evidence from Markdown structure and independent enabled
Hugo attributes, preserving original UTF-8 bytes, CRLF/BOM, source offsets and
YAML/TOML/JSON front matter with unknown fields. Actual effective Hugo attribute
switches and configured math passthrough delimiters control recognition.
Fenced/inline code, shortcode bodies, raw HTML and passthrough contents do not
become prose or invented headings. Unsupported body syntax remains visible.
Required source coverage cannot silently pass.
Generic rules detect duplicate recognized explicit IDs and evaluate declared
style.protected entries with file, exact prose literal and expected count.
The bounded OINK v1.1.0 and v1.2.0 catalogs add advisory code/table attribute, deprecated
front matter and dropped unsafe-attribute findings. Each rule records module,
version, immutable revision, module sum, license and exact source-file SHA-256
provenance in data.native_rule_provenance.
The catalog runs only when the actual mounted public v1.1.0 or v1.2.0
module-cache inputs match that release’s recorded hashes. Later releases need
an explicit source audit before they gain native-rule coverage. A replacement, vendor copy, other version or unknown source
does not select a latest-theme fallback. native-theme-rules is optional
not_checked. Generic syntax checks still run.
Baselines and reviewed file plans
baseline selects a clean relative file, default .oink/baseline.json, using
oink.baseline/v1. Capture requires completed work and explicit review metadata.
The fingerprint binds exact rule ID, normalized location/pointer and condition
message. It excludes severity. Acknowledged findings stay visible with
disposition: "baseline" and their original severity. New conditions still
block according to policy. Required incomplete findings/coverage cannot be acknowledged.
Review and capture preview oink.plan/v1 with selected edits, readable diffs,
base existence/bytes/modes, after bytes and read guards. The plan ID excludes
mutable validated/applied/recovery state. --plan FILE exclusively saves the
plan. These commands do not accept --write. plans apply FILE --site DIR
requires that exact selected site, fresh isolated candidate validation through
the same checks and rechecked source guards before any write. Escapes, .git,
symlinks, and nonregular files are protected. Overlapping candidate/source trees
are refused. Stale plans fail safely. Optional external_inputs_hash binds
captured non-site input bytes, full modes and inventory into the plan ID. This
opaque SHA-256 grants no external paths or permission to read them. The owning
validator compares fresh proven inputs. Trusted original external guards are
rechecked around selected writes.
Exclusive installation preserves a file created during commit. Partial failures
restore owned unchanged writes. Subsequent editor bytes, modes, or deletions
remain intact. The reported recovery directory keeps original bytes/modes and
actual concurrent captured evidence. Unrelated files and new editor children
are preserved. No file content authorizes shell execution or publication.
Captured page inspection and impact
inspect PAGE selects an actual Hugo page by exact language:path ID, Hugo
Path, permalink or proven site-owned source file. A known default language
resolves a multilingual Path. Remaining ambiguity or an unknown selector is
required incomplete (2). data.inspection exposes source byte hash/full
mode, actual output identities, observed inbound/outbound references,
translations and physical bundle attachments. Physical attachments are
distinguished from observed published resources.
impact --since REF compares captured current inputs and an isolated committed
Git tree rendered by the same Hugo engine. It retains deleted prior pages and
their inbound edges, unchanged referring pages, translation peers, attachments
and actual derived outputs. Global or uncertain inputs expand causal scope.
An actual HTML output without proven ownership, such as an alias, also forces
conservative full scope. Alias declarations never create guessed route ownership. Historical
inputs in proven Git mode scopes compare only Git’s executable bit. Other
module/foreign inputs and current facts retain full modes.
Historical materialization reads bounded Git objects without checkout hooks,
filters, smudge execution or document execution. The limits are 10,000 files,
16 MiB per file, and 128 MiB per tree. Required private history is bounded at
256 MiB. Symlinks, submodules, capped or missing objects, required incomplete
history and unsupported monorepo GitInfo are explicit incomplete states.
Committed site-owned dependencies can be proven. Current external local
replacement/workspace bytes cannot substitute for historical evidence.
data.impact.baseline_state is complete, incomplete or unavailable.
When the required baseline is unavailable, the result returns 2, retains all
known current pages/attachments/references/outputs and expands full scope. It
creates no prior pages or invented changes. Only an actually resolved commit
is recorded. check [GROUP] --since REF deliberately performs the full
current check and declares data.check_scope: full so validation coverage
stays complete. data.impact.full_scope describes causal
uncertainty separately from that validation scope.
Completed inspect and impact fact queries return 0 even when
their separately reported data.current_check has completed quality findings
(1). Required capture failures remain top-level 2. check --since keeps
the current policy’s quality exit code and required completion precedence.
context is removed. Read page facts through the JSON/YAML report from inspect.
Content move plans
move SOURCE TARGET [--plan FILE] previews a physical site-relative file or
bundle relocation. Actual Hugo identities determine translation peers and
old/new outputs. The plan includes byte/full-mode-preserved files and binary
attachments, readable diffs, proven Markdown destination rewrites, observed
route changes and alias advice. Front matter is not rewritten to install
aliases. Raw HTML, shortcode output, transformed destinations and ambiguous
source/output ownership remain visible as manual actions. Opaque source spans are
not changed. Repeated ordinary Markdown destinations can also lack a unique
source/output occurrence proof, including aggregate/print appearances. Matching
URLs alone do not authorize rewriting those occurrences. A relocated physical
attachment does not prove its new published URL. Resource URL changes require
paired actual rendered edges and equal emitted bytes. A proven processed image
URL does not prove an absolute original-resource URL. Unproven original URLs
stay manual and are not constructed from the directory move.
The original before check and provisional route_probe are separate from
the final candidate check. The provisional relocation may expose findings
1 from stale inbound links. A plan is validated or saved only after the
final isolated candidate and reference proof pass. Unsupported identity or
required capture failure returns 2. An actual final quality failure remains
1 and cannot save an applicable plan.
Content move plans must be saved outside the selected site. Their additive
oink.plan/v1move selectors and source_inputs_hash bind the complete raw
source inventory, bytes, and full modes. External-input and fresh-directory
guards also apply. Saved apply regenerates the original/relocated Hugo proof
and requires exact expected plan ID and files before final reference
verification. It rechecks current guards before writes, restores raw original
modes rather than private-copy modes, and preserves later editor bytes/modes
on refusal or guarded recovery. Stale inputs or an occupied fresh target lack
the required proof and return 2. Only explicit plans apply writes selected
files. Previews never stage or commit Git changes.
Supported input boundary
Initial full validation supports materialized files in a normal checkout or
without Git metadata, including supported local module replacements copied
into the isolated tree. It does not follow mounted symlinks or external mounts
back into the user’s workspace. Auxiliary symlinks outside effective mounts
are omitted rather than validated. Linked Git worktrees with a .git file
need a materialized review copy. Git-dependent behavior needs a copy with its
own Git metadata.
The snapshot excludes top-level public, resources, node_modules, tmp,
and the Hugo build lock. A mount that needs excluded input cannot silently
pass. Root configuration and the standard config tree are supported.
Explicit configuration files must be inside the selected site. Custom
HUGO_CONFIGDIR locations are refused. Supported configuration relocation is
not a second implementation of Hugo validation.
Content adapters (_content.gotmpl) can create unlisted pages that cannot be
enumerated completely through the supported public Hugo APIs. Full output
validation therefore reports incomplete work for those inputs. A disabled
page kind or render segment that omits an enabled language’s probe is also
incomplete. Multihost language configuration is outside the first full-check
scope and returns incomplete work. Multilingual paths on a single host remain
supported. These cases must not be presented as a successful partial check.
Ordinary content plans
new BUNDLE --title TEXT [--language LANG] [--translations LANGS][--kind page|docs|blog|book] [--plan FILE] previews an ordinary Hugo leaf
bundle through captured site-owned content mounts. The primary language
falls back to the effective default. Selected peers must be distinct enabled
languages. Shared filename and language-directory layouts follow actual Hugo
mounts, including observed sites.matrix.languages selection rather than an
assumed legacy lang field. Ambiguous, filtered or unsupported mappings require
manual authoring.
Existing bundles or sibling files owning that page are refused.
The primary index has draft: false. Selected peer indexes have draft: true.
The title is a supplied literal, not translated text. No review record is
created. Full quality analysis and isolated candidate validation precede the
shared guarded plan. Every proposed new file must map to exactly one actual
site-owned Hugo source page with actual rendered outputs, including translation
drafts in the explicit analysis view. Link-only/no-output, ignored, hidden or
build-never content cannot
pass merely because the existing site renders without errors. Required identity
is checked even when ordinary source-check groups are disabled. Saving --plan
creates only a new plan file. Explicit
plans apply FILE --site DIR revalidates and checks source bytes/modes,
existence, fresh directories and later attachment conflicts before applying.
Fresh-directory state is bound into the plan identity and checked before/after
validation, between writes and at completion. Rollback preserves later editor
attachments and reports recovery. It does not delete unrelated directory entries.
Editor settings and Markdown snippets belong to the site editor.
editor and snippets are removed.
Initialization profiles
init DIR [--profile project|docs|blog|book] [--languages en|en,zh|all]
composes one embedded MIT-licensed Starter archive. The default project
retains the previous complete language projection byte-for-byte. The language
selection is independent of the content profile. all means English,
Chinese and French.
Explicit docs, blog, and book retain their corresponding archived content
section and shared home, assets, examples, workflows and license. Native
section front matter defines their documentation, blog or sequential book
model and navigation. Each language’s site title/description comes from its
archived section. Existing localized home cards/actions/CTA are projected to
that section. Only their generated hugo.yaml and data/home YAML files are
serialized. Retained content/license bytes stay unchanged. There are no four
copied Starter trees or runtime template downloads.
Unknown profiles are policy refusals (1) before candidate validation or
writes. Missing/failed required Hugo validation remains incomplete (2). New
and empty-target, candidate-before-publication, exclusive creation and
concurrent-edit recovery protections apply to every profile. Ordinary Hugo
builds each generated site with provisioned dependencies. Archived workflows
remain source examples. init does not generate or execute the checksum-bound
R3 CI templates.
Bounded upgrade comparison
upgrade --to TAG now captures baseline and candidate views from the same
original site inputs and returns a readable module diff with full mode changes.
Its comparison records actual Hugo pages/outputs/language settings, emitted
file hashes/sizes/modes, raw alias declarations and separately observed alias
redirect files. It reports removed/added URLs, proven redirects, alias target/
byte changes and enabled language/output/search changes.
A previous URL is preserved only when an observed redirect at its exact old
output file targets the corresponding actual candidate page. Unknown/relative
custom alias identity remains required incomplete (2). Removed previously
emitted routes or outputs are blocking findings (1). Both resolved theme
versions must match the explicitly selected pins. Unknown/substituted pins,
unknown/different normalized Hugo versions or environments, or unexpected
other input changes remain incomplete. Comparison supports one HTTP(S) base
origin/path. Multihost inputs stay incomplete.
Manual review remains explicit optional unchecked coverage. Observed aliases that retarget a different
unique Hugo page are blocking independently of same-page URL moves.
The v2 upgrade plan ID binds the selected module plan, copied source bytes/full
modes/file inventory and normalized actual comparison. --expect-plan ID
checks a fresh capture/comparison, not a previously saved successful build.
Because emitted file hashes are bound, nondeterministic templates can require
a refreshed preview even when source files appear unchanged. Guards are rechecked before returning a preview, before each write and after
writes, including proven local dependency/workspace inputs read-only. Only
selected module files are written. Rollback restores only unchanged files
owned by the operation and preserves later editor bytes. Existing dirty target,
replacement and vendor safeguards remain in force.
File preservation and release checks
Initialization embeds the complete Starter commit and preserves its license.
The provenance records its hash and every projection: independent content/language
selection, the exact public theme pin/checksums, and disabling Git metadata for
a fresh directory. The default project retains prior bytes. Selected content
profiles share the same archived source and license. Candidate validation precedes target writes. Exclusive
creation refuses existing files. Rollback removes only unchanged files created
by that invocation and preserves concurrent user edits with recovery evidence.
Upgrade owns only a single site’s selected go.mod and go.sum changes. It
preserves unrelated dependencies and directives, refuses dirty target files
for --write, checks the reviewed plan ID when provided, rechecks targets
before writing, and records backups/recovery. Unrelated dirty source files do
not block read-only diagnosis or justify overwriting them.
check --release disables GOWORK and HUGO_MODULE_WORKSPACE and removes
the environment replacement for the subprocess. It preserves go.mod
replacements, reports conflicting local OINK replacement policy, and keeps
vendor evidence separate from the public requirement. Upgrade refuses an OINK
replacement and refuses _vendor. Vendor refresh remains a separate explicit
workflow. No module pin change is described as updating vendor bytes. If Hugo
actually selects vendored OINK, --release reports required public-source
verification as incomplete (exit 2). Matching version metadata is not proof
that the vendor bytes match the public tag. Ordinary check still validates
the actual vendor build.
Configured Hugo module replacements are also disabled only in the release
snapshot. If Hugo changes module files in that snapshot during resolution or
build, the CLI reports that dependency inputs need explicit preparation and
review. It preserves the original bytes rather than silently accepting a
build that depended on an unreviewed generated module-file change.
Checked builds and artifact identity
build --check --destination DIR --manifest FILE uses an isolated,
production build that keeps warnings visible for review. Hugo renders once. The check engines inspect
that output, then seal and export those same bytes. It never invokes a second
renderer to create the publication tree. The source checkout remains unchanged.
Only an outcome of 0 with complete or inapplicable required coverage can be
sealed. Blocked or incomplete checks do not create a verified export.
This production view does not include the separate nonpublishable maintenance
render. An explicit scoped translation policy whose required Hugo identities
are unknown because publication excludes their sources returns 2. It does
not infer missing translations from filenames or silently skip the scope.
Standalone check and translations retain the full maintenance view.
The destination must be new or empty, with an existing parent. The local
manifest must be a new file outside that tree. Export uses exclusive creation,
preserves exact bytes and full regular-file modes regardless of umask, and
rechecks source and destination against the manifest. Existing entries,
symlinks and overlapping trees are refused. Failed partial exports remain
unverified evidence and are preserved. Empty directories and directory modes
are outside the published file inventory.
--marker is optional and off by default. It adds
.well-known/oink-build.json with only oink.build-marker/v1 and the artifact
ID. That file’s entry is excluded from artifact-ID calculation to avoid a
circular hash, then its exact digest is included in the final inventory.
An existing marker path is refused. The manifest is never copied into the
public tree automatically.
The separately saved oink.artifact/v1 manifest records the source-input hash,
known source Git revision and dirty state, actual resolved theme identity,
CLI/Hugo versions, effective environment/base URL/release settings, required
coverage, actual Hugo route contexts and each file’s relative path, size, full
mode and SHA-256. Canonical URLs and HTML language values come from emitted
HTML. Hugo language keys remain separate. Unknown Git state stays unknown.
Original input bytes and modes are captured before temporary probe overlays
or workspace/replacement path rebasing. The public manifest omits absolute
local paths, arbitrary arguments, process logs and free-form coverage details.
Hashes record file byte identity.
Managed builds accept only the boolean Hugo flags --minify, --gc,
--ignoreCache and --noTimes after --, including =true/=false forms.
Other passthrough flags are unsupported inputs. Ordinary build keeps its
existing transparent passthrough behavior. Effective example/local addresses
are warnings during ordinary diagnosis and errors for checked release builds.
--release still requires separate evidence for actual public theme resolution.
Local and deployed verification
artifacts verify --artifact DIR --manifest FILE is read-only and offline.
It compares the exact file set, bytes, sizes and full modes. Changed, missing,
additional, unsafe or mode-changed files invalidate identity (1). Invalid
manifests, unreadable inputs and unsupported or interrupted inspection return
2. Verify the export again immediately before upload. Later edits cannot
inherit a previous successful result.
verify --site URL --manifest FILE --network explicitly authorizes HTTP reads.
It checks every declared file and distinct actual Hugo route URL, including
all language/subpath contexts, against the manifest’s bounded response size
and decoded-byte digest. Recorded HTML canonical/language values and an enabled marker are
checked when available. Shared URL/file requests may be coalesced without
removing their recorded contexts. HTTP cannot verify local file-mode bits.
A wrong body, soft-404, wrong route, changed captured canonical/language value
or wrong marker is a conclusive finding (1). Timeouts, authentication failures,
rate limiting, server unavailability and an absent required marker leave work
incomplete (2). Redirects outside the selected origin/base path are blocked.
The command does not discover or send credentials. Static build checks do not
perform this deployment check. Network permission for a build does not authorize
a later verification request or an upload.
Retired CI generation
ci init is removed. Keep CI configuration in the site or Starter. Previously
saved CI plans are rejected by plans apply.
Explicit workspace registry
R6 supported local scope accepted
The registry and optional-tool boundaries passed frozen owning/runtime, actual
protocol, four-consumer parity/preservation and canonical source/render gates.
A07 adapter and A15 workspace supported scope is accepted locally in the
maintenance record.
A workspace is one explicitly supplied YAML registry, independently versioned
as oink.workspace/v1. It contains only site names and directories:
The registry must be a regular nonsymlink file containing exactly one YAML
document with known fields, 1–64 entries and at most 256 KiB. Names match
[A-Za-z][A-Za-z0-9_-]{0,63} and are case sensitive. Directories are literal
relative paths from the registry’s actual parent, or absolute paths. Variables,
globs, and sibling discovery are not evaluated. Explicit directory symlinks and
operating-system aliases resolve to their canonical identity. Duplicate names,
duplicate or overlapping actual roots, filesystem roots, dangling symlinks
and nondirectory ancestors are rejected. Missing directories with a proven
existing ancestor remain listed. Checking one returns that site’s 2 without
preventing later selected sites from being checked.
workspace list|check [GROUP] --workspace FILE [--sites NAME,NAME] selects all
registered sites when --sites is omitted. Explicit selections require exact,
nonempty, distinct registered names and retain registry order, including when
the names were supplied in another order. list needs no Hugo renderer.
check reuses the single-site engine and each site’s own Hugo inputs and
oink.policy/v1 policy. It never duplicates Hugo configuration in the registry.
The existing oink.result/v1 envelope contains data.registry,
selected_sites, sites: [{name, path, result}], completed_sites,
finding_sites and incomplete_sites. Each child is a full single-site result.
Completed sites include exits 0 and 1. Finding sites are the 1 subset.
The aggregate exit is 2 if any selected site is incomplete, otherwise 1 if
any has blocking findings, otherwise 0. Human output includes each site’s
result and findings. This aggregation does not infer completion for unselected
sites.
Supported single-site commands accept --workspace FILE --site NAME, with one
explicit registered name and no default site. init, artifacts and verify
do not accept this selection. A saved plans apply FILE must bind to
the selected canonical directory. Selecting another registered site returns
2 before source writes. There is no automatic multi-site apply or upgrade.
Existing candidate validation and source/dependency byte and mode guards still
apply. Registry listing/checking neither provisions missing sites nor installs
tools, commits or writes consumer configuration.
Optional check adapters
Explicit tools entries in each site’s oink.yaml select already provisioned
executables. These entries extend oink.policy/v1. They are not a second Hugo
configuration or an installer. Each kind has enabled (default true),
required (default false), command (default the kind’s name), config
(a clean site-relative regular file when supplied) and timeout_seconds
(default 60 seconds, with bounded nondefault values 1–300). Commands are one
executable name or absolute path, not shell expressions.
Kind
Owning check group
Current supported protocol
Configuration boundary
markdownlint
style
markdownlint-cli 0.49.1
Optional declarative JSON/YAML/TOML; no JS, JSONC, custom rules or extends
vale
style
Vale 3.24.0
Explicit INI plus captured styles from the supported declarative subset
Unconfigured tools are not discovered. A tool outside the selected check group
is visibly not_checked. A configured optional tool that is unavailable,
unsupported or cannot complete leaves an omission. Required incompletion
returns 2 and cannot be downgraded by rule severity, exclusions or a problem
baseline. Required and disabled cannot be combined. Completed typed findings
still follow policy. Blocking findings return 1. An unrecognized tool version
or invalid protocol output does not count as a completed check.
data.adapters records each kind, requirement, status, typed diagnostics,
adapter.KIND coverage, raw process evidence, omissions and provenance.
Provenance includes the observed supported version, executable SHA-256,
captured configuration/style paths with SHA-256 and full mode, and pinned
public protocol sources. Tool logs stay in stderr and evidence. JSON stdout
remains one result. Per-process time and output are bounded, and changed
executables, captured configurations or tool-modified private inputs invalidate
their evidence.
Prose tools receive private masked copies of proven site-owned Markdown.
Front matter, BOM/CRLF and UTF-8 offsets, code, shortcodes, raw HTML, configured
math and attributes retain their source boundaries. Code prose is outside
source attribution. Markdown structure and fence/inline code boundaries remain
available to markdownlint. Vale receives the prose-only mask. Findings touching excluded or synthetic mask text are not
attributed to original source. Source locations are emitted only for proven
original lines/ranges. Unsupported syntax and
suppressed findings remain visible omissions. These adapters do not format or
rewrite original content.
Markdownlint uses an unpredictable generated JSON pointer to isolate the
captured rule object after upstream rc merging. Executable configs, custom
rule loaders and recursive extends are refused. Vale uses an explicit
captured INI, --no-global, and copied declarative styles. Sync, packages,
actions, scripts, conversions and style pipelines are unsupported. Lychee
accepts bounded timeout, max_retries and max_concurrency settings, plus
the literal cache = false. Caching remains disabled, and cache = true is
refused. Preprocessors and arbitrary command options are refused.
Offline is the default. Lychee is not invoked, including its version probe,
unless --network is explicit. Optional coverage is not_checked. Required
coverage is incomplete 2. It receives only observed external HTTP(S)
references from actual Hugo output. Local links remain the native check’s
responsibility. Definitive failed 4xx responses are policy findings, except
401, 403, 408, 425 and 429; those, 5xx, DNS/TLS failures and timeouts
are inconclusive, returning 2 when required and an omission when optional.
External fragments, browser behavior and remote content identity are not
verified. Findings retain the rendered output file and DOM pointer. No Markdown
line is invented from an external URL.
Child processes do not receive caller proxy-URL/credential settings or Node
preload variables. Literal NO_PROXY/no_proxy host-list data may be forwarded
for the qualified runtime. Tool preparation and any
network operation remain separate explicit actions. No tool is installed by
these commands.
Offline and compatibility boundary
Offline is the default for managed subprocesses. Dependency misses are
incomplete work. --network explicitly enables network use for the current
operation. It conflicts with --offline. Isolated checks may seed disposable
caches from already provisioned local modules. Downloading into a disposable
cache does not promise a persistent cache for the next invocation.
Only module download artifacts are seeded. Isolated resource caches start
fresh. The CLI does not reuse a global GetRemote cache to promise offline
remote-resource builds. Required resources must be available as local inputs,
or that operation must explicitly enable network access.
The CLI does not download a Go toolchain, install packages, alter global
configuration, or enable telemetry.
The theme uses plain CSS and is tested on Hugo 0.170+; earlier CLI snapshots
targeting OINK 1.5.1 required Hugo Extended for LibSass. Do not enable
--panicOnWarning or HUGO_PANICONWARNING;
warnings stay visible. Initialized sites use the CLI’s separately maintained Starter
snapshot; theme upgrades follow the upgrade guide.
Initialized sites retain ordinary Hugo inputs and need only their documented
dependencies after removing the CLI.
Retired local Studio
studio is removed from the CLI. Use an ordinary editor and oink dev for
a site preview. Read maintenance facts through inspect and structured reports.
The dated R7 acceptance remains historical evidence for its identified inputs.
Retired management API
The CLI no longer serves a management API. Earlier Studio API acceptance
does not describe the current executable.
Historical capture limits
Historical R7 limits belong to the dated acceptance record. Current command
coverage and supported inputs are defined in this contract.
Retired general editing
edit and Studio editing are removed. Edit source with an ordinary editor,
then run check. new, move, review records, and baseline plans retain
candidate validation and byte/mode guards. Previously saved editing plans
are rejected. The dated R8 record remains historical evidence.
Retired text and field editing
The CLI no longer owns general text or front matter editing forms.
Retired snippets and attachment editing
Write Markdown and add attachments with the site editor. The CLI no longer
provides a snippet catalog or general attachment editing command.
Retired Studio editing
The CLI does not serve an editor or accept browser Apply requests.
Verification and remaining scope
Use make test for offline Go tests and vet. Use make test-hugo for actual
Hugo integration and make test-tools for configured optional tools.
Local integration gate rechecked on 2026-10-14
make test (offline Go tests and vet) and make test-hugo passed on macOS
arm64 with Go 1.27.1 and Hugo Extended 0.166.0. The cold-cache configuration
failure is fixed: both JSON readers accept leading hugo: collection notices,
retain raw evidence, and reject unexpected prefixes or malformed JSON.
A deterministic regression forces the notice on every configuration call.
Native-rule checks also passed against the audited public v1.2.0 sources.
Optional tool adapters require their separate make test-tools gate.
The dated maintenance acceptance record
preserves earlier R1–R8 and A18 evidence. Declared targets are macOS arm64 and
Linux arm64/amd64. Darwin amd64 is experimental and unqualified. Windows is
unsupported.
7.7.6 - Component refinement across four visual presets
Consistent component surfaces and controls, with three optional Markdown presentation variants.
Accepted in OINK 1.4.0
Shared component styling and three optional presentation variants ship in 1.4.0.
The component contract owns
their behavior; the comparison guide shows them together.
Context
Cards, disclosures, Tabs and code controls had accumulated different spacing,
borders and feedback treatments. A shared refinement keeps familiar authoring
syntax while making related components feel consistent. The
dated review records
implementation and acceptance evidence, including the original staged plan.
Accepted style rules
Use the existing page, content and floating surface tokens. Independent cards
have their own boundaries; grouped lists share a frame and internal dividers.
Nested code and tables should not accumulate redundant borders.
Keep labels and hit targets fixed during press feedback. Reserve space for
localized copy feedback, show success only after copying succeeds, and preserve
visible failures. Keyboard focus is immediate; touch controls have usable hit
areas. Reduced motion keeps state changes clear without travel.
Paper and Slate retain rounded surfaces. Ink keeps square, flat geometry;
Terminal keeps compact, flat geometry. Paper’s decorative heading tails are
removed. Ink and Terminal remain opt-in experiments; component refinement does
not promote them to stable presets.
Optional authoring variants
The default grid, steps and code blocks remain available. Authors select a
variant only when it suits the content.
Divided card list
- [Installation](/docs/start/) — Set up a local site.
- [Configuration](/docs/customize/config/) — Configure the site.
{.cards .td-cards-list}
This produces a single-column group with internal dividers. The full shortcode
accepts cards variant="list". Item order, links and descriptions are preserved.
Compact command block
```bash {class="td-code-command"}
hugo server
```
A marked one-line command becomes a compact strip with a dedicated copy control.
Multiline, numbered or collapsed blocks warn and retain regular presentation.
Literal source and copied text are preserved.
Compact steps
1. Prepare configuration.
1. Run the local preview.
1. Review the generated page.
{.steps .td-steps-compact}
The full shortcode accepts steps variant="compact". Smaller markers and
spacing suit short procedures while retaining numbering, nesting and anchors.
Unsupported shortcode variants warn and use the default presentation.
Scope and compatibility
The same style rules cover tables, Fields, badges, Landing actions and shell
rows. Existing renderers, clipboard behavior and tokens remain the owners.
There is no new JavaScript dependency, font download, global density setting
or external Sass executable. Native Markdown, no-JavaScript reading, Print and
machine-readable outputs retain their content.
A moving selection background was evaluated but deferred. OINK 1.4.0 keeps
static selection feedback. Any later motion trial needs its own acceptance.
Validation and delivery
Focused theme checks cover components, content primitives, code blocks,
reading, shell, presets and namespace boundaries. The real site’s component
presentation and appearance suites cover EN/ZH, light/dark, desktop/mobile,
keyboard, touch, reduced motion and printing. The three variants and shared
styling ship in 1.4.0.
7.7.7 - Paper and Slate visual presets
Accepted phase-one visual identity and appearance controls, with separate reader style and mode state.
OINK 1.2.0
Paper and Slate ship in 1.2.0. Ink and Terminal are included as explicit
opt-ins; their remaining design work is recorded below.
Decision
Paper is the default, with warm paper/ink colors, blue links, IBM Plex Sans,
heading hairlines and framed tables. Slate retains the v1.1.0 palette,
Inter/Chakra/Plex Mono roles and Landing grid/glow. This gives reading sites a
quieter default while preserving an explicit compatibility choice. The cost is
a visible default change: existing sites can set params.ui.preset: slate.
The 1.2.0 release notes and upgrade guide call out this default change.
The reader menu is opt-in (preset_menu: false). The docs site enables it.
One Appearance disclosure combines native Style and Light radio groups;
mobile uses a modal dialog in the browser top layer. It is reachable by touch
and keyboard without relying on hover. The cost is replacing the old one-click
mode toggle with a selection panel; the t shortcut still toggles mode.
Style and mode use separate attributes and storage keys. Choosing the site
default preset clears the style key. Hugo renders the default without JavaScript;
an allowlisted inline script restores reader state before CSS. This prevents
the common initial preset mismatch, while keeping blocked storage usable.
Presets ship in one stylesheet, at the cost of additional CSS bytes.
brand separates the wordmark from display headings. Paper adds the local
OFL IBM Plex Sans variable font, including normal/italic and the six supported
small writing-system subsets. Font files download on use; system typography
and explicit role overrides retain priority. Chinese uses the system stack.
Phase 1 includes no serif face and no external font request.
Page task determines density: Landing keeps display scale, long articles keep
their reading measure, and navigation/configuration tables remain compact.
No global spacing increase, new shell, or geometry abstraction is introduced.
Giscus and print follow the preset; API vendors and charts retain their current
mode-only behavior. This keeps the first implementation bounded.
Later work
On 2026-10-24, the maintainer accepted removing Paper’s trailing heading
hairlines because the decoration adds visual clutter. The OINK 1.4.0 implementation
removes the line in both light and dark mode while retaining heading typography
and anchors. This revision ships in OINK 1.4.0; the 1.2.0 decision above records
the original appearance.
A subsequent October 5 experiment implements Ink and Terminal behind explicit
configuration; see the experiment record.
They are not stable defaults. preset_menu: true offers Paper/Slate and the site
default; an explicit list can expose either experiment. The menu uses the same
compact icon-and-name buttons for all four, without experiment badges.
This gives reviewers actual theme output without changing ordinary menu choices.
The cost is additional scoped CSS and a larger menu when experiments are enabled.
The experiment uses owned component rules for square/2 px geometry and compact
desktop navigation instead of introducing a global density framework. It reuses
existing local fonts, state handling and accessibility controls. Charts and API
vendors stay mode-only; comment palettes and print follow the experiments.
Remaining work is visual acceptance, wider device review and any decision to
promote them into the stable set.
On 2026-11-26, the maintainer asked for a refinement pass over all four
presets and for copied passages that paste cleanly into rich-text editors.
Paper’s canvas became ivory #faf9f5 and it gained a clay accent, because the
earlier grey canvas and link-blue accent left Paper too close to a warm Slate;
links stay blue and Dark Paper keeps its canvas. The cost is a visible accent
change on Paper sites that set no theme_color. Slate’s palette stays frozen.
Ink headings dropped to weight 700, the heaviest weight the platform CJK faces
carry, with a one-pixel section rule. Terminal’s heading marks were lightened
and spaced so the hashes stay distinct. All presets gained keycaps for bare
<kbd>, quieter list markers and zero heading tracking in CJK passages.
A second pass the same day settled reading texture. Paper and Ink links moved
from semibold to an underline at prose weight, because several bold links in
one paragraph read as emphasis the author never wrote; Slate and Terminal keep
the semibold cue. Paper and Terminal inline code dropped to weight 400 so it
stops competing with authored bold. The v key now steps through the offered
presets and y toggles light and dark; y no longer switches language.
On 2026-11-27 the maintainer accepted a Chinese typography for each preset.
The four Latin voices were distinct, but Han fell to the same platform Hei in
all of them. Each preset now arranges Song, Hei and Kai differently from fonts
the reader already has: Paper sets Song headings over Hei text, Ink Hei
headings over Song text, Slate stays Hei, Terminal sets mono prose. Kai carries
emphasis and quotation. The cost is a Latin change too, because a serif must
stand beside Song: Paper headings and Ink prose move to a system serif and
Terminal prose to mono. Bundling a CJK web font was rejected for its size.
Windows and Android rendering is unverified.
A follow-up shortcut pass on 2026-11-27 finalized the bindings: t steps
through offered presets, y cycles light, dark, and system color modes, l
switches blog/release/case index layouts, and v cycles site versions.
Typeset copy reuses the print palette instead of adding a third palette. The
architecture contract owns its
behavior. These changes ship in OINK 1.7.0.
On 2026-11-28 the maintainer judged the 1.7.0 Paper refresh a regression:
readers of the default preset met a different page with no setting changed.
Paper returns to its 1.6.0 look. Canvas #f7f6f3 and ink #21201c, IBM Plex
Sans headings over the platform Hei, link blue as the accent, semibold prose
links, inline code at its usual weight, a hairline quote rule and the 1.6.0
print, typeset-copy and comment palettes all come back. Typography shared by
every preset stays: upright Kai for Han emphasis, keycaps, quieter list
markers, tabular figures and untracked CJK headings. The 1.7.0 look is kept
as the experimental News preset rather than discarded. It is a printed
column after Typora’s Newsprint theme: the ivory palette and clay accent,
serif text and headings with Song for Han and Kai for quotations, a
text-weight title over a double rule, open tables between ink hairlines,
italic Latin quotations and underlined links. Its navigation, search and
menus keep the UI sans, because Song thins out at control sizes.
A second experiment, GitHub, reproduces Markdown as GitHub renders a README
in light and dark. Its values come from github-markdown-css 5.9.0 and
@primer/primitives 11.10.0, both MIT. Three values move for contrast: the
dark primary-button hover becomes #268838, the light selected-tab underline
takes #bc4c00 instead of a 2.15:1 coral, and the dark focus ring keeps the
link blue. Han emphasis keeps OINK’s Kai rather than a slanted sans.
The Style menu follows the six presets. Its trigger shows a palette whenever
it offers Style. Three, five or six presets sit in three columns over the
three mode cards, and the legends name the t and y keys while keyboard
navigation is on. folio and canvas stay reserved. The cost is that sites
which adopted 1.7.0 see Paper change back; they can choose news.
These changes ship in OINK 1.8.0.
Later the same day the maintainer asked for a second pass. The serif preset
is named News, and the menu reads Paper, Slate and GitHub over Ink, News and
Terminal. Each dark mode should be its own experience, with the fonts of its
light mode and a palette of its own. Dark Terminal becomes a phosphor screen
in the manner of a film’s green code rain: green type on black, glowing
headings and links, faint scan lines and green monochrome syntax. Dark Ink
becomes a stone rubbing, rice-paper type on blue-black with a cinnabar seal,
and dark News a candlelit edition, parchment type and gold links on warm
brown. Paper, Slate and GitHub keep their dark palettes: Paper has just been
restored, Slate’s palette is frozen, and GitHub follows GitHub. Ink is
rewritten as a brush-written page. Han headings take Kai and its text Song;
Latin takes Palatino, a roman drawn from Renaissance pen lettering. The title
is set at text weight, sections open under a tapered brush stroke, hr is
one stroke and quotations hang from a fading cinnabar stroke. The crimson
accent becomes a seal red and Swiss uppercase labels go. OINK Kai gains a
bold face that names only installed bold Kai, so Kai headings draw a real
bold. No font file ships; a system without Palatino or Kai falls back to its
serif and Song. These changes ship in OINK 1.8.0.
A third pass that evening set the two paper presets apart, following the
Ink and News proposal: Ink is the
written page and News the printed one. Ink moves to warm paper #f3ead7 that
darkens toward the window’s edges, with ink #241a10 and vermilion #a8321b
as its two inks. Its Chinese text takes Fangsong through a new local() alias,
OINK Fangsong, and falls back to Song; page titles take a chancery for Latin
(Apple Chancery, Gabriola or URW Z003) beside Kai; every heading stays at text
weight, sections in Palatino’s italic. Chinese strong becomes vermilion
emphasis dots, Blog and Book text opens on a vermilion initial, the current
row carries a vermilion dot and the header wordmark is framed as a seal. Dark
Ink replaces the stone rubbing with gold and silver writing on indigo-violet
paper #1b1730, because the rubbing’s near-neutral black sat too close to
Paper’s dark grey. News moves to grey newsprint #f0eee8, press black and one
spot blue #1f4f7a, dropping clay, which read too close to Ink’s vermilion.
It sets headlines in heavy Times New Roman over Songti Black, a deck and an
uppercase dateline under the title, a thick-and-thin rule over each section,
pull quotes between rules and a masthead rule under the header, with no radius
or shadow. Dark News replaces the candlelit edition with a darkroom, silver
type on #0f0f0f with a safelight orange #f2804a, because parchment and
gold now belong to Ink. check-presets.py now also checks text contrast at
the extreme of a shaded canvas, --td-preset-canvas-edge. Three parts of the
proposal stay out: per-language Japanese and Korean stacks, because preset
font roles live on the bare root selector so typography: system and
params.ui.fonts keep winning; a kicker above the headline, which would need
new markup; and newspaper columns for Blog lists, which switch between three
forms at runtime. The cost is a visible change for sites that chose ink in
1.7.0. These changes ship in OINK 1.8.0.
A calibration pass followed the same night, after the maintainer reviewed the
three presets on the site. Ink’s chancery and seal went: Apple Chancery on the
home page read as ornament rather than text, and a red frame round the
wordmark was a mark too many. Ink now speaks one voice, Palatino for Latin
everywhere and Kai for Han in headings and the interface, Fangsong staying in
the text; its display role is its heading face. News sets its interface,
menus and lists in its text serif rather than IBM Plex Sans, and squares its
interface parts, so each page reads as one printed sheet. Dark Terminal had
turned the whole screen green, so that text, chrome and code were hard to tell
apart; its text and chrome return to a pale grey-green, phosphor green stays
for headings, links and a cursor bar on the current row, amber takes heading
marks and quotation rules, and code regains distinct hues. The Appearance
trigger shows the reader’s color choice again, a sun, moon or half-filled
circle for System, instead of a palette, and the color group is labelled
Color. Paper, Slate and GitHub are unchanged. These changes ship in OINK 1.8.0.
Evidence
On 2026-10-25, the maintainer authorized component refinement using the existing
four presets. Shared surfaces, grouped rows, stable labels, and background-only
press feedback reuse current tokens and CSS. Markdown remains the primary
authoring path; the three local presentation variants are explicit opt-ins.
Paper/Slate keep rounded surfaces, while Ink/Terminal retain flat, square/2px
geometry. The moving selection trial is deferred: static states provide the
needed feedback without a second geometry or runtime layer. These changes ship in OINK 1.4.0; the component contract
owns their supported syntax and fallback behavior.
The architecture contract and
shell contract own behavior.
check-presets.py owns token parity, AA palette checks, the frozen Slate
v1.1.0 palette and strict configuration output. Font, parameter, vendor,
namespace, action and runtime checkers retain their existing ownership.
The documentation site’s appearance.spec.mjs tests real output; the
dated acceptance record
distinguishes executed checks from remaining experiments.
7.7.8 - Expo image collections
Record the reasons for album bundles, shared appearance, three display modes, and the image viewer.
Docs organizes explanations. Blog organizes posts. Book organizes chapters.
Expo organizes image collections into topics and albums. Readers need to scan
an album, select an image, and inspect its details.
The Graph experiment used a separate copy of an existing collection. It contained
7,658 originals in 149 albums. The images included mixed dimensions, long images,
GIFs, captions, and existing citation anchors. This collection supplied the
initial content and scale requirements.
Decisions
One bundle per album
An album is one Hugo leaf bundle: index.md and image files. Filenames provide
default titles. Optional resources metadata adds descriptions, credits, order,
explicit IDs, and paths to separate originals.
Model considered
Effect on authoring
One directory and metadata file per image
Many small files to manage for a large collection
One Markdown page per image
Useful when each image needs an article, but adds a page model to every image
One bundle per album with optional resource metadata
An album can start with image files and one page; metadata can be added later
Expo uses the third model. The album owns the URL and reading sequence. Each
image has a fragment anchor. Authors use explicit IDs for lasting citations.
They split large collections into albums themselves. This version has no
resource pagination or separate image database.
Shared appearance and compact controls
Expo is a layout. It uses the existing Paper, Slate, GitHub, Ink, News, and
Terminal presets and their light/dark modes. Shared colors, type styles, navigation, and corner
settings keep the album consistent with the rest of the site.
Three adjacent radio cells expose all display choices: Wall, Cards, and Seamless.
The play/pause button and size slider follow them. Icons keep the toolbar compact.
Localized names, tooltips, and focus indicators make the controls usable with
keyboards and assistive technology.
Reader display choices persist across albums and appearance changes. Appearance
controls stay in the navigation. The image toolbar supplies album actions, so
the album body omits the article action menu. The gallery fence remains the
component for image groups inside text pages.
Animation and image viewing
GIFs play by default. Pause and the system’s reduced-motion preference provide
still previews. Readers can start playback explicitly. Lazy loading reduces
initial requests, but large GIFs still transfer the original files. Authors must
consider album size when they group animated images.
The viewer starts at original size and shrinks large images to fit. Expand to fit
uses the smaller width or height ratio. This rule keeps the whole image visible.
Manual zoom, mouse dragging, and WASD movement let readers inspect details.
Q/E and H/L move through the album. J/K control zoom, R resets, and F expands to fit.
These shortcuts apply inside the viewer so they do not also move the page.
Original-file and album-location links preserve access and citation. A native
modal dialog supplies focus containment. Expo loads its own album runtime only
where needed. Ordinary Image Zoom keeps its existing single-image behavior.
Without JavaScript, readers can still use the image links and captions.
Stable geometry and shared outputs
A width-consuming scrollbar changes the grid width. A new width can change the
row count and total height. Near the viewport boundary, these changes can make
the scrollbar appear and disappear repeatedly. This feedback caused the reported
flicker even when the viewer was closed.
Expo reserves scrollbar space and preserves the grid width during modal scroll
locking. The regression test forces a width-consuming scrollbar and samples
successive frames. A single screenshot cannot detect this failure.
One image resolver supplies HTML, Print, Markdown, LLMSFULL, RSS, and album covers.
This keeps image order and metadata consistent across outputs. Static formats
remain usable without viewer JavaScript. Changes to the resolver require checks
for each affected output.
Validation and ownership
The theme repository owns the resolver, layouts, runtime, schema, and focused
checks. The documentation site owns the bilingual examples, browser
tests, and desktop/mobile visual review. Acceptance includes all four presets,
light/dark mode, keyboard input, focus, animation, and static outputs.
The copied Graph collection supplies additional evidence at a larger scale.
Its original acceptance checked 7,658 file hashes, image anchors, and the unchanged
source collection. Personal image data, generated output, and screenshots remain
outside the theme and documentation source repositories.
Use the commands in the Expo contract
for current acceptance.
7.7.9 - Blog posts as a gallery
Keep articles as the content model while reusing Expo geometry for a fourth blog index view.
Accepted in OINK 1.4.0
This decision records the released gallery blog view and its compatibility
boundaries.
Some blog sections are most easily scanned by their covers. The existing row,
card, and table views prioritize article information. Expo already supplies
image-wall geometry, but its album resources and image viewer have a different
content model and destination.
Decisions
Gallery is a fourth blog_index form. It consumes the same paginator slice
and featured-image resolver as the other blog views. Articles retain their
URLs and metadata; authors do not duplicate them in an album manifest.
Share Expo’s row geometry and control styling. Keep the blog runtime and
reader preferences separate, because a blog cover opens an article rather
than an image viewer. The wall, cards, and seamless arrangements are
choices within the gallery, while the outer view switch selects among the
four blog forms.
Contain each cover within bounded tile proportions. This preserves the image
at the cost of some blank space for extreme aspect ratios. Narrow layouts
use tighter bounds so captions retain a readable width. Touch captions stay
below the images and contribute to row height; keyboard focus reveals desktop
captions. Missing covers keep an article link, and a no-JavaScript grid keeps
titles and descriptions visible.
Consequences
An enabled view switch publishes markup for all four forms. Hidden views use
lazy images, but preparing their thumbnails still costs build time. Authors
can disable switching to emit only their chosen form. This change adds no
remote image service or new browser library.
Native blog section indexes own the automatic integration. Custom home and
term templates must explicitly render the gallery and its controls. A site
configuration setting does not replace custom templates.
Verification and ownership
Theme checks in bin/check-shell.py compare article order, pagination,
external links, missing covers, and invalid configuration fallbacks. The
configuration schema follows the theme defaults and resolver. Runtime tests
verify the four-form cycle and saved preferences.
The documentation site’s tests/browser/blog-gallery.spec.mjs owns browser
acceptance with synthetic, bilingual content. It covers layout changes,
resizing, independent preferences, keyboard navigation, touch captions,
failed images, no-JavaScript output, and gallery accessibility.
7.7.10 - Explicit table reading
Separate technical table layout from an optional corner action for reading in a larger viewport.
Accepted in OINK 1.4.0
This decision records the released .expand table-reader behavior.
Most documentation tables fit ordinary reading. A few package, parameter, or compatibility tables benefit from more room. A toolbar above every table adds visual weight to an occasional task. The reviewed prototypes compared a corner expand action and a hover-revealed ellipsis menu.
Decision
Use .expand to opt individual Markdown tables into a native reading dialog. .wide controls intrinsic table sizing independently; {.wide .expand} combines both. Do not infer expansion from size, column count, or .wide, and do not add a site-wide switch.
A single expand action needs one click. Place it at the top-right corner, revealing it on desktop hover or keyboard focus and keeping it visible on touch devices. The visible icon stays small; its touch target is at least 44px. Do not add an above-table toolbar or a one-item ellipsis menu.
Move the original table and its scroll wrapper into one modal dialog; preserve text size, native semantics, links, selection, and authored order. Restore that same node, inline scroll offsets, page position, and entry focus on close. Numbered captions supply the dialog title without duplicating IDs. Restore the table synchronously before browser printing. Without JavaScript or dialog support, readers retain the original inline table.
Boundaries
This delivery has no sorting, filtering, TSV export, density/wrapping switches, new column-pinning controls, virtualization, separate reading route, or Fullscreen API. Existing .matrix semantics remain available. Only theme-rendered Markdown tables opt in; .fields warns and ignores .expand. Tables with external headers or ARIA references stay inline because the modal makes their external targets inert. Custom ancestor-dependent styles need review when a table moves to the dialog.
The dialog inherits existing preset and light/dark tokens. Paper is the reviewed entrance design; other presets receive compatibility checks rather than new visual variants. Mobile reading still uses horizontal scrolling when the data is wider than the viewport.
Ownership and validation
The theme owns table rendering, the capability-gated runtime, localization, and scoped CSS. bin/check-content-primitives.py covers opt-in, invalid combinations, localization, and static outputs. The documentation site’s tests/browser/table-reader.spec.mjs owns keyboard, touch, links, selection, focus/scroll restoration, printing, failures, and accessibility checks. Runtime checks and both site Make suites remain delivery gates.
The original draft is retired from active proposals and retained in Git history. The research describes dated experiments, including features intentionally excluded here.
7.7.11 - Translation comparison
Compare a page with an existing same-origin translation in a two-pane reader that loads only when asked.
Accepted in OINK 1.5.0
This decision records the released params.ui.compare translation reader.
Translated documentation is often read and reviewed side by side. Without built-in support, readers had to open two browser tabs and scroll each one manually. Generating a dedicated layout or prebuilt language-pair pages at build time would multiply the output tree and duplicate content. Because OINK sites already publish each translation as a standard HTML page with aligned heading IDs, a lightweight reader can pair those existing pages directly in the browser.
Decision
A single boolean parameter, params.ui.compare (default false), enables comparison. Hugo lists only published, same-origin HTML translations of Docs, Book, and blog pages. Drafts, non-HTML output formats, external hosts, and the language-home navigation fallback never qualify. Neither do translations whose build policy writes no HTML (build.render: link or never, set directly or by cascade), nor blog archive pages after the first, which have no counterpart. Any language that sets compare: false under languages.<lang>.params.ui is excluded as both a host page and a comparison target. Authors do not need to add front matter, custom layouts, or extra output formats.
The reader loads on demand: from an icon button beside the page actions, via the B keyboard shortcut when keyboard navigation is enabled (pressing it again closes the reader), or through the Command Palette action compare_translations. It opens two existing HTML pages inside same-origin frames within a modal dialog. The current page stays on the reading-start side, so right-to-left host pages mirror the pane order. Across the UI, the feature uses a single name: Duo View, with the trigger labelled Open duo view (it shipped in 1.5.0 as Bilingual View; see Revisions).
The Sync Scroll switch matches shared visible heading IDs and interpolates smoothly between them. Partial matches use the available anchors; when two pages share no headings, the reader falls back to overall document progress. An orange exclamation mark beside the switch explains either case. Matched headings that cannot scroll to the reading line do not count as a mismatch. Duplicate or out-of-order heading IDs disable synchronization while leaving both panes independently scrollable. Clicking Close, pressing Escape or B, or navigating Back restores the host page’s scroll position and focus. Reloading an open reader or returning to its history entry reopens the view in place so a single Back step still closes it.
On viewports narrower than 900 CSS pixels, the reader displays one retained pane at a time beneath a compact toolbar row and a language switcher bar (which also holds the target-language menu). At 320 × 256 CSS pixels (roughly 400% zoom), at least 160 CSS pixels of vertical reading space remain visible.
Pane documents suppress shell navigation runtimes, search, comments, and theme-managed analytics. When params.ui.compare is enabled, the theme renders Google Analytics through its own pane-aware template so pane loads are not counted as separate page views; a site’s local override of Hugo’s google_analytics.html partial is not used. Custom scripts in head hooks can check window.OinkComparePane.
Boundaries
This release does not include cross-version diffing, manual page-pair maps, paragraph-by-paragraph row locking, text diffs, or cross-origin targets. Panes require frame-src 'self' and same-origin framing: X-Frame-Options: DENY or frame-ancestors 'none' blocks frame loading and falls back to a direct link. While open, the host page and its two panes exist as three live documents; nothing extra is fetched until the reader opens.
Ownership and validation
The theme owns discovery, the lazy entry and reader runtimes, the 32 interface catalogs, and scoped CSS. bin/check-compare.py covers discovery, Docs, Book and blog pages, the per-language opt-out, keyboard hints, analytics, output isolation, and how every runtime behaves inside a pane. tests/js/compare-scroll.test.js covers scroll geometry. The documentation site’s test:compare suite owns sync, lifecycle, reload, narrow and zoomed layouts, right-to-left order, eight languages, failures, and accessibility.
Revisions
v1.5.1 (2026-11-06): The interface name changed from Bilingual View to Duo View (Chinese 双列视图). The reader sets any two pages side by side, including same-language script pairs such as Simplified and Traditional Chinese, so a short name for the two-pane layout fits better than one about two languages; each locale uses its own concise equivalent. The entry, Command Palette action, title and help panel follow; the parameter and action ID are unchanged. B now toggles between the page and the reader, and scroll keys work as soon as it opens. The last chosen target language and Sync setting are remembered in the browser, and a reload or back/forward restore also brings back the visible pane and both reading positions. Sync Scroll became a switch. Its warning became an orange exclamation mark without a badge, with a note on hover, focus or tap that distinguishes a partial match from overall-progress sync. A matched heading that merely cannot reach the reading line no longer reports a mismatch; when no shared heading can anchor the map at all, the note says that sync follows overall reading progress.
The proposal draft is retired from active proposals and retained in Git history.
7.7.12 - Keyboard map
Record why OINK binds twenty-nine single-key shortcuts in three groups, dims what a page cannot run, and adds local history, fold-all, and a reader width.
Accepted in OINK 1.7.0
This keyboard map, local history, fold-all, reader width, and reader shortcut switch ship in OINK v1.7.0.
The Shell contract defines the
required bindings, hooks, and storage. The
keyboard guide explains them to readers.
Context
Shortcuts had grown one feature at a time. Several keys carried two meanings
or an alias (l and y for language, g beside Enter in the tree, n only
on the home page), the help sheet split into two
uneven columns, and frequent page actions such as editing, printing, or
handing a page to an assistant had no key at all. Readers also asked for three
capabilities the theme lacked: returning to recently read pages, opening every
folded block at once, and using spare width on large screens.
Decisions
Three groups
The project owner set the map on 2026-11-27: ten shortcuts for navigation,
nine for actions on the page, and ten for the view, each a bare key with one
meaning.
The help sheet shows the same three columns in the same order, so the sheet
doubles as a keyboard diagram. Neighboring keys share a purpose: wasd for the tree, qe for paging, /\ for search and commands, []
for ChatGPT and Claude, ,. for image size, -= for width.
Change
Reason
Retired 1.6.0 bindings (h Zen → z, l/y language → x, g tree open, home n)
Each letter is needed for its own feature; one key per action keeps the sheet honest
Commands stay on \ (with c)
Mirrors / for search and stays consistent with earlier OINK releases; Gemini is omitted because it has no prompt URL parameter
Help is '
' sits beside ;, which cycles gallery layouts next to l for index layouts
m opens Markdown
Duo View, Zen Mode, and Markdown form one row of reading views: b, z, m
? and the digits stay unbound, and modifiers suppress every binding except
Shift when it produces ,.;<>= or +, so browser and assistive-technology shortcuts
keep their keys. Readers can also turn off all single-key shortcuts for
themselves in the help sheet (td-single-key-shortcuts:<basePath>), keeping
Cmd/Ctrl+K and Escape active.
Dim, do not hide
Rows a page cannot run stay in the sheet, dimmed and announced as unavailable,
instead of disappearing. Hiding them made the sheet change shape from page to
page and taught readers nothing about where a feature does exist. The sheet is
one cached template per language; availability is decided in the browser each
time the dialog opens, because it depends on live state such as a visible
gallery or an open drawer.
Full sheet on hover, modal dialog on click
Hovering or focusing the bottom-bar ? button reveals the full three-group
cheat sheet above the footer (three columns side by side on wide screens,
wrapping cleanly on narrower screens), with unavailable rows already dimmed for
the current page. Clicking ? (or pressing ') opens the same sheet as a
centered modal dialog with the Enable shortcuts toggle.
History stays in the browser
h lists recently read pages from localStorage, newest first, without the
current page, so h then Enter means “back to the previous page”. The list is
keyed by the site’s base path so that two sites on one domain never mix, is
capped at 100 entries, accepts only same-site paths, and can be pruned entry by
entry or cleared. It is never transmitted, and it exists only where keyboard
navigation is on, so a site that turns shortcuts off records nothing.
Fold everything, keep your place
o treats every disclosure as one set: sidebar and right-rail groups,
<details>, and shortened code blocks. Anything folded means “expand all”;
otherwise it collapses all. Collapsing keeps the current page’s branch open,
the rule the sidebar already applies to persisted state, and the line being
read stays put while content above it changes height. Popover menus and rail
visibility are excluded: they are transient surfaces or layout, not content.
A reader width with a way back
- and = move the reading column in 100 px steps between 600 px and the
space between the rails, and the choice applies site-wide in this browser.
Reaching the rails stores “fill” rather than a pixel count, so a larger screen
still fills. A step that reaches the page’s own width stops there and forgets
the stored value, which restores every page’s authored page_width without a
separate reset key.
Two assistants with prompt URLs
ChatGPT and Claude accept a prompt in their URL; Gemini documents no such
parameter, so OINK does not include a built-in Gemini handoff. Both assistant
actions stay behind the opt-in assistant_links gate, so no site sends a URL
to a third party without choosing to.
Consequences
Readers who learned the retired 1.6.0 keys must relearn them, and sites that
documented the 1.6.0 keys (h, l, y, t, g) must update their pages. The keyboard chunk now
carries the history runtime, and every page with keyboard navigation writes
one small localStorage entry per visit. No new configuration, network
request, or build step is introduced.
Verification and ownership
The theme’s bin/check-keyboard.py checks the bound keys against the
documented map, the chunk assembly, and the gating; tests/js covers the
runtime units. The documentation site’s tests/browser/keyboard-nav.spec.mjs
owns browser acceptance: the three-column dialog and its dimmed rows, the hover sheet,
history recording and pruning, fold-all, the reader width across reloads, and
the page-action keys.
7.7.13 - Unified diagram reading
Shared Mermaid and local PlantUML viewing, source export and demand loading.
Accepted in OINK 1.4.0
Shared diagram viewing, source export and demand loading ship in 1.4.0.
Components, Architecture and browser printing own the behavior.
Context
Before this change, Mermaid had a pan/zoom dialog but loads its engine at page startup and
renders a second SVG for the dialog. Local PlantUML loads both engines at startup
and offers only horizontal scrolling. Both preserve authored source.
Scope
Share the existing dialog and styles, source viewing/copy, and standalone SVG
download. Defer large engines and rendering until a diagram is within 320px of
the viewport. Do not change pinned libraries, server-mode PlantUML, other diagram
families, the CLI, or ordinary consumers’ Hugo-only build requirements.
Behavior and boundaries
One lightweight scheduler serializes both engines on the main thread. Each engine
loads once. Hidden or zero-width containers wait until visible. Theme changes
invalidate old results; the open viewer retains its reading position. The viewer
reuses a rendered snapshot, supports touch pan/pinch, wheel and keyboard controls,
fit, Escape, focus restoration and reduced motion. Source is available even after
an error. Copy and export report failure, and downloads report initiation only.
PlantUML stays in Blob images; its SVG is never inserted into the live DOM. SVG
exports embed their styling, remove active content and reject external resource
dependencies. No includes, themes or optional libraries are downloaded. Browser
printing shows a rendered diagram or readable source synchronously; it cannot wait
for an asynchronous engine in beforeprint. Dedicated Print, Markdown and RSS
retain their existing source fallback.
Compatibility
No configuration or build step is added. Local PlantUML remains opt-in; explicit
endpoints retain the legacy renderer. Without IntersectionObserver, bounded
scroll/resize checks perform the same visibility test. Source survives disabled
JavaScript and blocked assets.
Implementation and acceptance
Extract shared scheduling and viewing from assets/js/mermaid.js; retain engine
adapters and the existing dialog partial. Update focused output checkers, runtime
tests, real EN/ZH documentation and browser tests. Verify multiple and wide
diagrams, hidden tabs/disclosures, rapid themes, errors, blocked resources,
source fidelity, standalone exports, touch, keyboard, accessibility and printing.
Compare requests before/after.
Decision log
2026-10-25: Initial bounded design. Main-thread serialization and Blob isolation
are retained. Immediate browser printing uses source for unrendered figures.
Local implementation and focused browser acceptance are complete; broader site
validation is recorded with the delivery evidence. This behavior ships in OINK 1.4.0.
7.7.14 - Local search refinement
Mixed-language queries, technical identifiers, section results, and palette scope in OINK 1.4.0.
Accepted in OINK 1.4.0
Owner: OINK maintainers. Affected contract: Shell.
This search behavior shipped in OINK 1.4.0. In OINK 1.6.0, the bundled Lunr
runtime was replaced by a zero-dependency scanning BM25 engine
(Shell contract); this record preserves
the 1.4.0 query, section, and scope decisions.
Evidence and scope
The previous CJK path required one contiguous query in one field. English uses
Lunr, and both return page links without section context. Preserve the one local
index per language, existing commands, input-method composition, exclusions,
keyword weights, and positive page boosts. No dictionary, service, account,
external executable, configuration key, or extra build step is introduced.
Accepted behavior
Split whitespace and Latin/CJK boundaries while preserving technical identifiers
such as shared_buffers, pg_basebackup, --baseURL, and /pg/data. Match terms
across indexed fields. Return all-term pages first, with contiguous phrases ahead
of other matches; only when no page covers every term show partial matches with
visible coverage. Apply the page boost within those tiers. Keep English stemming
and bounded spelling fallback through the bundled Lunr runtime.
One result per page selects its best matching section and excerpt. Read actual
rendered heading IDs, never reconstruct a slug. Preserve language and base paths.
Store body text once, with UTF-8 byte offsets for section boundaries. Heading and
summary scopes keep heading anchors but do not silently index full bodies.
Add a labeled native radio group inside the existing palette, offering all
pages or the current top-level content root. Default to all pages; commands and
actions remain available. Announce result counts and partial coverage. Preserve
keyboard selection, focus trapping, and deferred search during IME composition.
Compatibility and checks
Existing page metadata and scope configuration remain valid. Sections are additive
index metadata; the engine continues to accept old indexes without sections.
Theme owners: check-search.py, search-engine/runtime tests, and palette checks.
Site owners: bilingual real-content query expectations, root/subpath anchor checks,
and browser keyboard, composition, scope, responsive, light/dark, and axe checks.
Compare old/new results and latency on identical real corpora. Record page and
section counts, tool versions, warmup/repeats, and raw/gzip bytes. Every language
must remain within 2 MiB raw and 512 KiB gzip. Synthetic cases cover ambiguous
identifiers and duplicate, Unicode, explicit, and special-character heading IDs.
Decisions and acceptance
2026-10-25: Implemented locally after the initial design. The Shell contract
and Search/Command palette guides now own the behavior. Theme checks exercise
all four index scopes, actual UTF-8 section offsets, multilingual/subpath IDs,
legacy index compatibility, boosts, and root-aware dialog caching. The site
owns tests/search/queries.json and scripts/check-search-corpus.mjs; its
summary query gate runs in root and subpath integration builds.
On the frozen documentation source ab2747a (149 pages and 1,321 headings per
language), the 43-query set includes two negative summary cases. Top-five
expected-page hits are EN summary 7/7 → 7/7, ZH summary 2/7 → 7/7, EN content
10/10 → 10/10, and ZH content 6/17 → 17/17. These are curated regression
expectations, not general relevance scores. 连接池 超时 has no full match in
this corpus and deliberately checks labeled partial results; a synthetic owner
case checks the full match.
Frozen summary indexes are 185,183/184,281 bytes raw and 39,529/43,208 bytes gzip
(EN/ZH), within budget. Full-content diagnostic indexes are 1,640,294/1,516,283
bytes raw and 536,971/578,674 bytes gzip, over the gzip budget. The maintained
site retains summary scope; enabling all historical research text is not a
budget-compliant configuration. The implementation never silently truncates it.
Browser acceptance covers EN/ZH, 390/1440 px, light/dark, real anchor navigation,
visible/announced partial states, native scope selection, Blog/Book roots,
composition and command retention. The local artifact archive for this run
recorded exact commands, JSON timings, logs, and screenshots. These dated
measurements describe that corpus; 1.4.0 includes the accepted behavior.
2026-10-26: Fixed cross-output contamination during index reads, added multi-output
owner coverage, and completed the failed-route accessibility and file-tree retries.
2026-10-26: Refined the palette after visual review. The two scope choices are
visible as compact segments with native radio keyboard behavior and 44 px hit
areas. Reduced the desktop panel and row spacing, softened the selected result,
and combined live status and keyboard hints into one footer.
2026-10-26: Adversarial review corrected normalized excerpt/highlight offsets,
distinguished heading IDs from data attributes and script strings, and scoped
English spelling fallback to the selected root. Regressions cover compatibility
characters, combining marks, shortcode headings, and literal HTML in result text.
7.8 - Design research
Dated experiments and consumer evidence that inform OINK design decisions.
Dated research records
Research records capture measurements, inputs, and tool versions from specific studies. Current behavior is defined by the Design contracts and the toolchain contract.
Publish research in the Design tree only when another maintainer can inspect
its method, understand its scope, and repeat the applicable check.
Keep raw agent transcripts, temporary build logs, and local absolute paths out
of research records.
Dependency migration, interaction and failure-path repairs, three-engine acceptance and publication boundaries
Publication rules
A research record states its date, inputs, applicable versions, method, result,
and known limits, with changing counts labeled as snapshots. External framework
comparisons should be refreshed from primary sources before publication and
focus on conclusions that affect OINK.
When a result becomes an accepted product choice, link it from an accepted
decision. If it proposes behavior that does not exist,
move the design question to Proposals.
7.8.1 - Goldmark block-attribute evidence
Repeatable probes of lists, images, tables, passthrough blocks, fences, callouts, and nested containers on Hugo 0.160.1 and 0.164.0.
Verified snapshot
These probes produced identical relevant output bytes on Hugo Extended
0.160.1 and 0.164.0. They explain OINK’s native component forms.
The current component contract defines required behavior.
Method
The probe used a minimal Hugo site without OINK templates, with render hooks
printing their context fields and .Attributes as visible markers.
The site enabled Goldmark block attributes and passthrough delimiters for inline
and block math, allowed unsafe rendering to inspect raw HTML, and
set wrapStandAloneImageWithinParagraph: false.
Each source shape was rendered with the minimum supported Hugo and the then
current Hugo version, comparing relevant output byte for byte to record
Goldmark’s structural behavior.
Findings
Source shape
Hook result
Design consequence
Ordered list with paragraphs, fences, callouts, nested lists, and {.steps}
The class attaches to the outer <ol> and rich list-item blocks survive
A Markdown list is the native Steps form
Heading inside a list item
The heading remains inside <li> and enters .TableOfContents
Native Steps can carry navigable headings
Nested list with {.filetree}
The class attaches to the outer <ul>
FileTree needs no outer wrapper to preserve hierarchy
Standalone image plus {#id num= caption= .class}
render-image receives IsBlock=true and all attributes
A Book figure can have a native image form
Inline image inside a paragraph
IsBlock=false; the image receives no block attributes
Inline images cannot use the block-figure contract
Block math plus {#id num=}
render-passthrough receives block type and attributes
A numbered equation can use the native passthrough form
Table plus {.fields #id num= caption=}
render-table receives the class and named attributes
Field tables, matrix markers, captions, and Book numbering can share one hook
Fenced code plus {#id num= caption=}
The code-block hook receives the attributes
A numbered example can be the fence itself
Callout plus {icon= tab=}
The blockquote hook receives callout metadata and attributes
Folding, inline title markup, icon, and tab metadata can coexist
Attribute line separated from its block by a blank line
The attribute silently disappears
Source checks must reject orphan attribute lines
Adjacent tables with tab=
Each table hook receives its own tab label
Adjacent-block tabs can extend beyond code fences
Container boundary
Hugo’s % shortcode delimiter renders .Inner as Markdown.
Its template must put a blank line before and after the inner Markdown.
Without both blank lines, Hugo may treat a following list as literal HTML-block
content instead of Markdown.
A multi-line % container inside a CommonMark list item has another limitation:
its generated HTML lacks list-content indentation, so the list closes before
the container and restarts after it. OINK therefore keeps a full Steps form for
steps that must contain another full container. Ordinary rich blocks, fences,
and < shortcodes do not have this limitation.
In the applicable collector shape, nested % shortcodes receive inner HTML
that is already rendered. If a collector requires the child’s original
Markdown, it uses < delimiters and renders the captured body through the
shared scoped block renderer.
Attribute ownership
Each hook enforces an explicit attribute allowlist, rejects style and inline
on* handlers, and validates URL-bearing values through the shared URL policy.
A hook retains a site class only where downstream CSS is an established
extension mechanism.
The experiment showed that gallery images inside list items can be block images,
but the image hook still does not receive their parent list’s marker. A runtime
therefore relies on a theme-emitted marker or a structural fallback.
Limits and verification
These results cover Hugo 0.160.1 and 0.164.0 with the stated Goldmark settings.
Before updating this snapshot for a minimum-version change, rerun the
focused component, Book, table, gallery, and Markdown-output checks.
7.8.2 - OINK 1.3.2 and Hugo 0.168 consumer inventory
Local inventory of 37 maintained OINK sites using v1.3.2 and Hugo Extended 0.168.0, with visible warnings and separate publication evidence.
OINK v1.3.2 was published
on 2026-10-18 at 13:37 UTC. Its tag resolves to
bd2e856e6e2f7027a9189af009701f5b8cf562cf.
All maintained sites use this release and Hugo Extended 0.168.0. CI, local
checks, preview, and deployment commands omit the warning-fatal flag;
HUGO_PANICONWARNING must also remain unset. Warnings stay visible for review.
The upstream LibSass deprecation notice is accepted. No external Sass compiler
is required, and older Hugo versions are no longer development targets.
The observed local tools were Hugo 0.168.0+extended+withdeploy on macOS arm64
and Go 1.27.2. Module verification disabled environment replacements and
both Go and Hugo workspaces. Classic consumers were compared with the release’s
runtime sources. All 37 builds preserved Paper and the explicit four-preset
reader menu.
Sites
Paths are relative to the home directory. Every row uses OINK v1.3.2 and Hugo
Extended 0.168.0. “Module” means the resolved public module; “copy” and
“submodule” identify classic themes/oink consumers.
Checkout
Theme source
Local production build
pgsty/barn.pgsty.com
module
Passed
pgsty/boar.pgsty.com
module
Passed
pgsty/caps.vonng.com
module
Passed
pgsty/cloudexit.org
module
Passed
pgsty/exp.pgsty.com
module
Passed
pgsty/oink-starter
module
Passed
pgsty/oink.pgsty.com
module
Passed
pgsty/pgetcd.pgsty.com
module
Passed
pgsty/pgext
module
Passed
pgsty/pgredis.pgsty.com
module
Passed
pgsty/pgsilo.pgsty.com
module
Passed
pgsty/pgsty.com
module
Passed with local report data; see below
pgsty/pgsty.pro
module
Passed
pgsty/pig.pgsty.com
module
Passed
pgsty/pigsty.cc
module
Passed
pgsty/pigsty.io
module
Passed
pgsty/repo.pgsty.com
module
Passed
pgsty/silo.pgsty.com
module
Passed
pgsty/sow.pgsty.com
module
Passed
pgsty/wok.pgsty.com
module
Passed
www/aiempire
module
Passed
www/ca.vonng.com
submodule
Passed
www/ddia
module
Passed
www/dharma
module
Passed
www/doc.pg.center
module
Passed
www/fzb/site
copy
Passed
www/lzj
module
Passed
www/muse.vonng.com
copy
Passed
www/pg-internal
module
Passed
www/pg36g
module
Passed
www/pgweekly
module
Passed
www/piglet.run
module
Passed
www/sg.vonng.com
submodule
Passed
www/tpme
module
Passed
www/us.vonng.com
submodule
Passed
www/vonng.com
module
Passed
www/zj
module
Passed
Boundaries
pgsty.com could not fetch its separately published report manifest: the
remote request returned an unexpected EOF or timed out. Its build passed
with the existing local report dataset and HUGO_REPOORT_USE_LOCAL=1.
sow.pgsty.com was checked on its existing publication-review branch.
Non-Git and source-copy consumers were validated in place.
pgsilo/work/silo-docs is a frozen delivery baseline, as its owning
repository documents. It is excluded from maintained-site upgrades.
This inventory records local source, module-resolution, build, and
rendered-menu verification against the published v1.3.2 tag.
7.8.3 - Ink and Terminal experiment, 2026-10-05
Explicit experimental presets in real theme output, their design tradeoffs, checks and remaining work.
Local experiment record
Ink and Terminal compile into the theme stylesheet and use the Appearance
control. They remain explicitly enabled experiments, pending design acceptance.
Inputs and method
This extends the Paper/Slate implementation
on the October 5 working trees. Tools: Hugo Extended 0.166.0, Go 1.27.1,
Node 26.9.0, and Playwright 1.62.1 on macOS ARM64. The documentation site’s
local sibling-theme build is the integration surface; its published pin remains
v1.1.0.
The same Home, configuration, callout, and tab content is compared across four
presets, EN/ZH, 390/1440 px, and light/dark mode. Checks inspect real rendered
fonts, overflow, appearance controls, and local font requests. Further component
checks cover code, parameter fields, Blog, Book, API, Mermaid, ECharts, search,
and print. API vendor DOM is excluded from axe under the site’s existing policy.
The local docs site enables this list. Select Ink or Terminal in Appearance,
then choose light, dark, or system independently. Following the October 5 menu
revision, all four options use icon-and-name buttons without experiment badges.
A site may set either as preset without enabling reader choice.
preset_menu: true remains Paper/Slate plus the site default.
Selecting the site’s default preset clears the saved preset.
Font overrides, system typography, and pre-CSS initialization use the same
contracts as Paper/Slate.
Verification
Executed check
Result and scope
check-presets.py
AA text/link/accent contrast on three surfaces, light/dark token parity, advisory canvas luminance, frozen Slate v1.1.0 palette; seven strict builds and 28 document roots
Theme checks
Parameters, font roles, 32 catalogs with 205 keys, generated schemas, component/output contracts, runtime isolation and namespace passed; 52 existing output goldens unchanged
Eight suites passed 170 tests; the appearance suite passed all 49 after fixing the default-Terminal build issue below (219 checks total across the initial run and focused rerun)
Appearance coverage
Four presets × EN/ZH × 390/1440 px × light/dark on Home, configuration, callouts and tabs; local font requests and menu axe checks; state, keyboard, print and Giscus asset checks; four experiment/mode checks over 11 page types plus search, and shared Mermaid contrast
Font/configuration builds
Actual docs site rebuilt with Terminal as default: system fonts with/without explicit overrides, plus explicit technical-font overrides; all three passed
Browser engines
Six checks passed on Chromium, Firefox and WebKit at 390/1440 px, including pre-CSS state, keyboard selection through Ink/Terminal, persistence and focus return; desktop Chromium also used 4× CPU throttling
Visual review
96 actual-output viewport captures; representative Home, Docs and mobile menu images inspected. The local comparison gallery selects content, language, size and mode without injecting styles
The standard sitemap axe pass used 15 routes: EN/ZH Home, configuration,
callouts, tabs, and OpenAPI; English search, Mermaid, ECharts, Blog, and
/book/04-design/. The existing responsive axe matrix also ran.
Standard browser checks used the 4173 fixture server; the engine gate used the
sibling-theme dev server at port 1313. No external font request was observed in
the appearance matrix.
The first default-Terminal font build found an omitted entry in the advisory
canvas-luminance map, causing false accent-contrast warnings. Both experimental
canvases now participate, with checker assertions and authored-accent fixtures.
Only the affected appearance suite was rerun after this correction. The added
research index entry and updated proposal description were reviewed before
refreshing the corresponding two changes in the LLMS golden.
The experiment exposed two new styling faults: the global underline suppression
hid Ink’s links, and Terminal’s selected search row retained dim summary text.
Both received scoped fixes. A separate inherited Mermaid dark-label pair
(#cccccc on #585858, 4.43:1) reproduced in Paper and Slate. The shared
mode-only default label background is now #404040; authored Mermaid values
retain priority.
Remaining work
Before stable promotion, review the look on real Windows and Android devices,
including CJK fallback faces, underlines, mono heading wraps, and long parameter
tables. Manual screen-reader speech and first-paint filmstrips remain unverified.
Mermaid/ECharts keep mode-only palettes, API widgets keep vendor styling, and
Giscus coverage checks generated palette assets. The decision to promote
Ink/Terminal or redesign chart palettes remains open.
7.8.4 - OINK 1.2 pre-release review, 2026-10-05
Local 1.2.0 candidate review, cleanup, compatibility, resource provenance and publication checks, with release boundaries.
Local candidate review
This review covers the October 5 working trees prior to tagging v1.2.0.
The public theme tag and the documentation site’s consumer pin were still v1.1.0 at review time.
Scope and inputs
The theme starts at a1979a4 and the documentation site at ed2d0e3.
The reviewed working trees also contain the CJK keyword-summary, literal-percent
outline, and repository-source-path fixes, the site’s existing English editorial
changes, and the cleanup below. The separate optional CLI is outside this
theme release.
Most checks used Hugo Extended 0.166.0, Go 1.27.1, Node 26.9.0, and
Playwright 1.62.1 on macOS ARM64. Official, checksum-verified Hugo Extended
0.160.1 and 0.165.0 binaries were used for selected compatibility checks.
Review findings and cleanup
Finding
Correction
Impact
The 1.2 release draft omitted the new default and appearance controls
Update both release drafts and upgrade guidance with Paper, the Slate compatibility setting, independent persistence, current-state icons and experimental preset selection
Readers can identify the visible upgrade change before adoption
Current proposal, decision, experiment and source comments still described preview letters, experimental badges, a separate Default card or an undecided release target
Align current descriptions with compact icon/name buttons, site-default reset and 1.2 release preparation; preserve dated test evidence
Guidance agrees with the accepted interface while keeping historical results intact
A working-tree ignore rule hid all site tests/ except two files
Remove that broad rule; retain existing generated-output exclusions
New regression tests remain visible to Git
Development previews do not expose production-only analytics
Inspect strict production output and distinguish core local resources from explicitly configured services
The local-first boundary is verified against production output
These cleanup findings required no runtime change. Earlier working-tree runtime
fixes are covered by their owning checks and the final integration run.
Executed verification
The local candidate passed the following technical pre-release checks. No
release-blocking theme defect was found within this scope. Counts are dated
snapshots of this working-tree review.
Check
Result and scope
Preset checker
Passed: seven warning-strict configuration builds, 28 document roots, light/dark token parity, AA text/link/accent checks on three surfaces and the frozen Slate v1.1.0 base palette
Runtime tests
49 Node tests passed, including current-state icons, search summaries, outline tracking, clipboard and dialog focus
Theme regression and tooling checks
40 checker/tool commands passed, including 90 migration tests, snapshot/consumer safety and current output goldens; the PDF browser case was then rerun with an explicit browser, with all three isolation tests passing
Documentation checks
Final make check: 57 tests passed; 143/143 bilingual files, 1,197 source headings, 228 rendered content pages and internal links checked; only the new research index entry and changed release title/description required reviewed Markdown-golden updates
Standard browser suites
One complete make browser run passed all 219 checks across nine suites, including the full 372-route sitemap axe scan; no failed, flaky or skipped cases
Documentation follow-up
A fresh build passed a separate axe scan of 14 updated EN/ZH routes, including this new report pair
Browser engines
Six appearance checks passed on Chromium, Firefox and WebKit at 390/1440 px; pre-CSS restoration, keyboard selection, persistence and focus return; desktop Chromium also used 4× CPU throttling
Visual spot checks
Current-output captures inspected for the Chinese mobile Paper menu, English desktop dark Paper menu and Chinese Terminal reading on mobile/desktop; two-column icon/name options, current-state icons and reading layout confirmed
Hugo compatibility floor
0.160.1 passed preset and reading/math checkers plus a strict minified production build of the actual documentation site
CI Hugo version
0.165.0 passed a strict minified production build of the actual site, Hugo Module/include/static/print checks, system typography, legacy Sass font overrides and expected rejection of invalid typography
Production resources
28 page visits across four presets and seven routes; core fonts and scripts served from the site’s origin; configured external services recorded separately
Production output security
Passed on 921 files in the final strict production build with the documented third-party integration policy
Book publication
Root and subpath EPUBs passed the theme checker and EPUBCheck 5.3.0 with zero errors/warnings; both PDFs passed the 23-page, five-chapter structure checks; the root PDF script-isolation probe passed
Published consumer pin
Existing v1.1.0 resolved and passed the site’s release-pin check with environment replacements and both workspaces disabled
The full sitemap scan follows the site’s existing axe policy: OINK-maintained
surfaces are checked, Giscus requests are blocked, and Swagger UI/Redoc vendor
DOM is excluded. Responsive checks cover 360, 768, 820, 1024, 1200, and 1440 px
in English/Chinese and light/dark mode.
Appearance checks use the same Home, configuration, callout, and tab content in
four presets, both languages, 390/1440 px, and light/dark mode. They also cover
search, code, tables, input/focus states, Blog, Book, API, diagrams, and print.
Ink and Terminal remain explicitly selected experiments.
Publication used local Pandoc 3.11, Java 26, and Chrome headless-shell
151.0.7922.34. The first attempt with the full Chrome for Testing application
timed out on this Mac. Selecting headless-shell explicitly, as CI does,
produced the verified PDFs. CI pins Pandoc 3.10 and Java 21 on Linux.
Local-first resource boundary
IBM Plex Sans, Inter, IBM Plex Mono, Chakra Petch, icons, KaTeX fonts, and core
browser libraries are bundled locally. Preset switching introduces no runtime
font-service or CDN-script dependency. System typography and explicit font-role
overrides retain their documented precedence.
The production audit loaded Home, Chinese configuration, math, Mermaid,
Markmap, ECharts, and OpenAPI under each preset, then switched dark/light mode.
The production base origin was preserved while built files were served locally.
Request tracing recorded and blocked off-origin requests; local fonts and
diagrams still loaded without uncaught JavaScript or local HTTP errors.
Two configured services requested external scripts: Giscus and Google
Analytics. Giscus is an optional comments integration; its OINK
palette files are local. This documentation site configures an
analytics ID, so production output includes Google Tag Manager’s script.
Neither service is required by the new presets. Authored remote media and
explicitly selected diagram services retain their opt-in boundaries.
Repeating the checks
Run owning theme checks before the real-site checks. These commands use the
sibling theme through the documented Make targets:
The full theme checker set and publication commands are defined in
.github/workflows/ci.yml. Run all owning checkers with fresh fixtures,
including parameters/schema, vendored assets/fonts, navigation/search/actions,
components, output/namespace/goldens, migrations, snapshot protection,
consumer tooling, and PDF isolation. The engine suite is
npm run test:appearance:engines in the site repository.
For compatibility checks, put the selected Hugo binary on PATH, disable
inherited Go/Hugo workspaces, and identify the sibling replacement explicitly.
Build the real site with --environment production --minify --printPathWarnings --panicOnWarning into a separate output directory. For published-pin checks,
disable the replacement as well.
Remaining release steps and limits
Local technical pre-release acceptance passed. Completing the release requires
assembling reviewed changes into commits, running CI on those commits,
publishing the tag and module archive, updating downstream pins, and verifying
the hosted deployment.
Real Windows/Android font rendering, manual screen-reader speech, and first-paint
filmstrips remain unverified. Windows source-path behavior was checked through
deterministic fixtures. Ink/Terminal design follow-up remains in the
experiment record.
7.8.5 - Visual preset acceptance, 2026-10-05
Local Paper and Slate verification, real theme output, and bounded browser evidence.
Local verification record
This record covers sibling-checkout theme output for the Paper and Slate
presets prior to tagging v1.2.0.
Inputs
Theme and documentation working trees on 2026-10-05; Hugo Extended 0.166.0,
Go 1.27.1, Node 26.9.0, and Playwright 1.62.1 on macOS ARM64. The ordinary
browser suite uses Chromium; the additional engine gate uses Chromium, Firefox,
and WebKit.
The site pinned v1.1.0 at the time of this run; make check, make browser, and
make dev select the local sibling theme.
Executed checks
Evidence
Result and scope
check-presets.py
Paper light/dark token parity and AA text/link/code/copper contrast; frozen v1.1.0 Slate base palette; four strict configuration builds and 16 HTML roots including 404 and print
Existing theme checkers
Parameters, font roles, vendor inventory, 32 locale catalogs, actions, shell, output, namespace, Landing and runtime isolation passed; generated schemas match their sources
check-goldens.py
52 surfaces passed after reviewing and updating the 34 HTML/print expectations affected by root attributes, prepaint colors, the menu and its action/runtime; other output formats were unchanged
Strict site build
Real sibling-theme EN/ZH site built with --panicOnWarning; translations, rendered Markdown and internal links passed
node --test 'tests/js/**/*.test.js'
49 runtime tests passed
appearance.spec.mjs
25 tests passed: Paper/Slate × EN/ZH × 390/1440 px × light/dark on Home, configuration, callouts and tabs; menu axe checks; keyboard, persistence, default reset, language navigation, cross-tab sync, blocked storage, invalid values, no JS, print, command palette, reading-anchor/breakpoint handling and generated comment stylesheets
appearance-engines.spec.mjs
Six checks passed: Chromium, Firefox and WebKit at 390/1440 px; stored state and browser chrome color restored before CSS, native keyboard selection, focus return and language navigation. Desktop Chromium also used 4× CPU throttling
Font requests
All observed fonts were local. Paper requested no Inter; Slate requested no Plex Sans. Two real-site overlay builds proved system typography requests no bundled text face and explicit font roles override both presets
make check
Complete non-browser suite passed: 57 tests, 141/141 translated pages and the existing Markdown/rendered-content/internal-link checks
make browser
197 tests passed across all nine standard suites; sitemap axe scan scoped to the 15 routes below
Visual inspection
Actual Paper desktop Home, mobile long-form Docs, English/Chinese light/dark Appearance panels and Slate dark Home reviewed from browser test captures
The browser suite’s sitemap axe pass is scoped with A11Y_PATHS
to 15 representative routes: EN/ZH Home, configuration, callouts, tabs, and
OpenAPI; English search, Mermaid, ECharts, Blog, and a Book chapter. The existing
responsive axe matrix runs in addition. Cross-origin Giscus and vendor API
widget DOM retain the suite’s established exclusions.
The integration run found and fixed Paper dark highlighted-line gutter contrast
and smooth-scroll interference with reading-anchor restoration. Theme-color
checks now assert both presets: Paper’s opaque warm selection surface and
Slate’s existing translucent selection surface.
Limits and next checks
Manual screen-reader speech and visual filmstrip/paint traces remain unverified.
The blocked-stylesheet and throttled-CPU assertions verify initialization order.
Slate comparison freezes base palette values and verifies rendered font behavior.
Mermaid/ECharts retain mode-only palettes. Ink and Terminal remain research;
serif display headings, full geometry/density tokens, and preset-colored charts
remain future work.
7.8.6 - Consumer and migration evidence
A dated consumer corpus survey that informed OINK shells, authoring primitives, and deterministic Book migration rules.
Dated corpus snapshot
These counts describe repositories inspected in August 2026 to inform OINK’s
shell, component, and Book migration design.
Corpus
The authoring survey scanned the content/ trees of eleven OINK consumer sites
and found 5,325 Markdown files, of which 5,293 had YAML front matter.
The survey included single-language English and Chinese references, bilingual
product sites, release archives, custom landing pages, and separate Book consumers.
The survey measured source Markdown, counting
shortcode calls, fenced-code attributes, callouts, table markers,
raw HTML, front-matter keys, content types, and site-local layouts.
A later Book-focused survey added five long-form consumers.
Findings that changed the design
Evidence
Resulting choice
Content ranged from nearly plain Markdown to pages with many nested components
Native Markdown is the default form; a full form survives only for a named capability gap
Documentation, Blog, Landing, releases, and books repeatedly reimplemented navigation or cards locally
Extend the shared shell, registry, and primitive rather than adding a parallel system
Site-specific table classes were common, while canonical Field-table headings were rare
Hook attributes use an allowlist but preserve documented site-class extension points; Fields cannot be inferred from arbitrary two-column tables
Book sites carried private figure, table, equation, example, and cross-reference conventions
Numbered primitives and migration profiles need deterministic classification, stable IDs, and rendered-target verification
Sites mixed single-language, peer-file bilingual, and generated-language content
Language authority and generation boundaries must be explicit; a migration never treats an untracked generated tree as source
Rich HTML pages still needed print, Markdown, feeds, and agent output
Every component declares its output degradation before its interactive HTML is accepted
The evidence also ruled out several additions: documentation sites did not
require a second Landing system, Book sites did not need a new cover component,
and a serial archive did not require a new shell type. Remote API collection
belongs in site-side CI, outside a Hugo theme built for local rendering.
Block and table evidence
A focused survey of eleven sites plus Book consumers found 11,484 pipe tables,
but only eleven matched the strict Field-table heading vocabulary. Roughly 874
were reference-style tables and about 1,300 were compatibility matrices. OINK
therefore uses explicit .fields and .matrix markers rather than inferring
these components from table shape.
The same survey found eighteen Steps blocks in the eleven-site corpus, all
using the full form with headings and rich content. Platform probes showed that
a native ordered list could contain most of that content, but not another full
% container inside a list item. OINK keeps both forms because their technical
capabilities differ.
Deterministic Book migration
Three dated dry-run profiles checked whether migration rules accounted for
every recognized source without inventing meaning:
Profile snapshot
Classified result
Manual boundary
DDIA v2
106 figures, 3 tables, 22 code examples, and all 304 relevant links accounted for
One caption link flattened to visible text; no unaccounted skip
DDIA v1
90 numbered figures and 203 matching references
14 decorative or unnumbered images deliberately left alone
119 figures, 5 tables, and 136 numbered references
3 ambiguous images retained for manual review
Each profile first ran without writes, and writes began only after reviewers
understood its ambiguous inputs. A second run produced zero changes.
Each profile built with warnings fatal and passed rendered kind/number/anchor
checks. The public migration toolkit and current profile boundaries are
documented in
Writing a book and the
migration contract.
Publication adoption snapshot
An isolated 2026-08-24 check tested the released generic Book publication
path with two consumers:
Consumer
Generic publication evidence
Downstream status
DDIA
23 ordered pages, 131 typed targets, and 292 resolved cross-references; EPUBCheck, internal, and PDF checks passed
At this snapshot it still retained a semantic preprocessor pending independent acceptance of the new gate
TPME
18 ordered pages, 41 typed targets, and 1,062 resolved cross-references; the same generic checks passed
A second consumer confirmed portability; it created no upstream migration gate
These results record downstream adoption of the generic publication pipeline.
Limits
Repeating this survey requires a fresh repository list and a new dated
snapshot. This public record omits local filesystem paths, uncommitted content,
private repository names, and generated build artifacts.
7.8.7 - OINK comprehensive review, 2026-08-26
Evidence-based review of post-v0.7.0 implementation, configuration, outputs, security, tests, performance, bilingual contracts, and the real integration site.
Historical review snapshot (2026-08-26)
This page records the 2026-08-26 audit of github.com/pgsty/oink and its integration site.
OINK 0.7.1 subsequently fixed code findings F01–F06 (see the 0.7.1 release notes). Current behavior is defined by the Design contracts.
Review verdict
OINK’s main-line quality was substantially higher than that of a typical Hugo theme: the default path built successfully, bilingual coverage was strong, and component tests were broad.
The project treated output and trust boundaries seriously.
The real site showed no general breakage on desktop, mobile, light/dark modes, or primary accessibility paths.
Theme and site worktrees were clean. Their latest remote checks succeeded, and every locally rerun first-party suite passed.
While those checks passed, this review found 4 P1, 9 P2, and 5 P3 findings, where some early or peripheral features fell short of OINK’s modern contract.
The gates preserved selected positive scenarios very well, but did not systematically cover configuration combinations, static-output behavior, or the semantic accuracy of public documentation.
Before the next release tag, at minimum:
Disable Swagger UI’s default online validator. Verify no implicit outbound requests with a non-localhost browser test.
Apply common type, range, URL, and CSS-value validation to all public configuration and Landing data.
Redesign Swagger, Redoc, and Asciinema behavior in static outputs and their runtime gates.
Repair generated schemas. Update public configuration and front matter references to match behavior.
Baseline and method
Review baseline
Item
Snapshot
Theme repository
clean main at fe439fdb1d7c2df745088c9bfcbb8c350403ee63, equal to origin/main
Current stable tag
v0.7.0 at cbb6f4e0bfe47e17ba7aa41d04b8651c943cf858
Documentation site
clean main at fd5fcde, publicly pinned to github.com/pgsty/oink v0.7.0
Local tools
Hugo Extended 0.164.0, Python 3.14.6, Node 26.4.0, npm 11.17.0
All 40 HTML/Print/Markdown/RSS/LLMS golden surfaces passed.
The strict tests/site Hugo build passed.
The real bilingual site’s npm test passed: 121/121 page pairs, 886 heading IDs, 24,860 internal links, and 3,172 fragments.
The full real-site Playwright suite passed: sitemap-wide axe, 29 accessibility cases, and 45 responsive/navigation cases.
It also passed 16 keyboard, 10 content-component, 18 code-block, 4 PRD5, and 5 theme-color cases.
Extra visual review at 320 CSS px covered EN Home, ZH configuration, ZH Book, and OpenAPI/Redoc, with no page-level horizontal overflow.
npm audit found no advisory among the site’s 79 npm dependencies.
An OSV Query API batch for 26 exact VENDOR.json versions found no known advisory.
measure-baseline.py assets --fixture-site passed its isolated strict build.
Severity
Level
Meaning
P1
Breaks a core product, security/privacy, or ordinary-editing invariant; fix before the next tag
P2
Material behavior, contract, or compatibility defect; fix soon with a behavior gate
P3
Maintainability, performance, process, or documentation-governance debt
Finding summary
ID
Level
Finding
Default-site impact
F01
P1
Swagger UI enables its online validator on production URLs
Pages using swagger only
F02
P1
Invalid configuration can crash ordinary Hugo or silently emit bad output
Depends on authored configuration
F03
P1
Swagger/Redoc/Asciinema violate static-output and runtime-isolation contracts
Pages using those shortcodes
F04
P1
Landing sends unvalidated data to safeCSS and lets other bad values pass silently
Related Landing fields
F05
P2
Custom page-action and archived-version URLs bypass the shared URL policy
The supposedly complete configuration/front-matter references lag v0.7 behavior
All maintainers and consumers
F08
P2
Design contracts and proposal lifecycle present conflicting authorities
Maintainers
F09
P2
OpenAPI accessibility defects are excluded while Redoc is presented as an alternative
OpenAPI readers
F10
P2
Strict-CSP guidance omits theme-owned inline script and style
Strict-CSP consumers
F11
P2
No browser support baseline; automation is Chromium-only
Firefox, Safari, RTL, forced-color users
F12
P2
Output-security and rendered-Markdown gates have systematic blind spots
Consumers relying on those verdicts
F13
P2
Real cross-repository candidate integration is manual and non-atomic
Every public behavior change
F14
P3
Checker duplication and source-string coupling are high
Maintainers and isolated worktrees
F15
P3
Baseline CSS and fonts remain the main first-visit payload
Every HTML page
F16
P3
Vendor integrity is strong, but vulnerability/SBOM and CI supply-chain gates are manual
Release maintainers
F17
P3
Changelog, implemented proposals, and behaviorless metadata reduce signal
Maintainers and upgraders
F18
P3
The Print isHTML FIXME no longer explains the real dependency
Print-template maintainers
Detailed findings
F01 — Swagger UI implicitly contacts the online validator (P1)
layouts/_shortcodes/swagger.html initializes SwaggerUIBundle without validatorUrl: null.
Vendored swagger-ui-bundle.js defaults to https://validator.swagger.io/validator.
It suppresses the badge only when specification URLs contain localhost or 127.0.0.1.
On deployed hosts, it creates an online-validator badge whose request includes the specification URL.
This violates the promises of disabled-by-default theme network features, local same-origin specifications, and local-first operation, and can disclose internal hostnames or specification URLs on intranet deployments.
The localhost exemption explains why every local browser test missed the request.
Set validatorUrl: null explicitly.
Any future online validator should require an explicit opt-in URL, use the shared URL policy, and have privacy/CSP integration documentation.
Test a production-like, non-localhost origin while intercepting every request.
Require same-origin specifications to fetch only first-party resources.
F02 — Invalid configuration does not consistently warn and fall back (P1)
ui-param.html says callers validate types. Some callers do not. Minimal builds produced these results:
Input
Actual result
ui.blog_index_size: nope
ordinary build fails because .Paginate requires a positive integer
ui.sidebar_expand_levels: nope
ordinary build fails in add
ui.sidebar_menu_truncate: nope
ordinary build fails while first casts the value
offline_search_summary_length: nope
ordinary build fails while truncate casts the value
the non-boolean string is truthy and enables folding
ui.blog_index_size: 0
Hugo default silently converts it back to 12
Landing marquee.rows/capabilities.columns and Asciinema numeric parameters also call int/float directly.
Other invalid types, including print.toc and offline_search_max_results, silently change behavior.
This directly contradicts the Diagnostics decision: ordinary hugo server can become unusable, while some invalid input passes strict publishing gates without warnings.
Add shared validators for integers, positive integers, ranges, paired ranges, and grid counts.
Normalize values before arithmetic or output.
For every public key, test valid site and page cases, invalid ordinary cases with warnings/fallbacks, and invalid strict cases with failures.
Domain resolvers should enforce cross-field rules such as min <= max, pager size >= 1, and integer grid counts.
F03 — OpenAPI and Asciinema remain HTML-only islands (P1)
Architecture and Components require Markdown/LLMS without theme markup, static Print, and safe static RSS or explicit omission.
The observed behavior conflicts with these requirements:
Redoc emits <style>, <div class="td-redoc">, and <redoc spec-url=...> into generated .md.
Swagger puts an executable inline initializer in its shortcode.
Asciinema .md contains the complete td-asciinema tree and JSON script.
Asciinema Print loads about 185 KB of player JS/CSS and prints only an incidental frame.
Swagger/Redoc leave empty Print containers and can select 1–2 MB runtimes.
These shortcodes are absent from the Markdown/RSS/Print golden matrix.
The result is theme HTML in agent output, empty shells for paper/EPUB readers, useless runtime in Print, and a strict-CSP violation from Swagger.
Reader-facing guides describe these defects as output behavior, conflicting with normative contracts.
Make all three branch on tdOutputFormat. Provide full behavior in interactive HTML.
For Print/Markdown/RSS, provide a titled static link with the specification or cast address, or explicitly omit the component.
Only interactive HTML should set capability flags.
Move Swagger initialization to a stable chunk and Redoc styles to a stylesheet.
Add four-output goldens and assertions that unwanted runtimes are absent.
F04 — Landing CSS, URL, and numeric inputs do not share one trust boundary (P1)
hero.html validates title_size, but concatenates media.ratio and media.max_width unchanged before marking the full string safeCSS.
This input:
Landing accepts inline sections in page front matter, so authors can supply these values directly.
Other sections handle columns, rules, dimensions, styles, icons, and URLs inconsistently.
A javascript: URL often becomes #ZgotmplZ without warnings. Invalid columns become ZgotmplZ.
Some direct integer casts abort builds.
Add section normalization with common handling for classes, icons, URLs, CSS lengths, grid counts, booleans, and enums.
hero.media.ratio should accept two constrained track values, not arbitrary CSS.
max_width should use the length validator. All Landing actions should use content/url.html.
Each built-in section needs negative tests.
F05 — Two configuration URL surfaces bypass shared policy (P2)
params.ui.page_context_menu.links passes through url-template.html directly to safeURL.
url_latest_version is also treated as trusted configuration and marked safeURL.
Neither path validates schemes, hosts, whitespace, or protocol-relative URLs. Warning-free builds can produce:
Clicking executes JavaScript, which violates the published safe-URL model and gives copied configuration fragments unnecessary execution capability.
Use the shared resolver to allow only HTTP(S) and explicitly supported first-party relative URLs.
Also validate archived-version URLs.
The browser action registry’s second check provides useful defense, but progressive-enhancement anchors must not bypass it.
F06 — Generated schemas disagree with actual YAML (P2)
The small parser in generate-config-schema.py does not remove inline comments. At least 11 defaults become strings.
These include print.toc, which becomes "true # ..." instead of a boolean, and print.section_break_wordcount.
Both index column counts and enum defaults such as footer_style, blog_index, and typography are also affected.
Comment association is also incorrect.
Breadcrumb commentary attaches to section_index; quick-link commentary attaches to sidebar_icon_policy.
Taxonomy-icon commentary attaches to pager_types; local-interface commentary attaches to image_zoom.
The front matter schema offers removed detector keys: release, upstream_attribution, and downstream_modified.
It incorrectly treats navbar-menu Params.columns as page front matter.
The drift check compares the same defective generator with committed output, preserving the error.
Use a real comment-preserving parser or explicit machine metadata markers. Do not extend the ad hoc parser.
The scanner must distinguish page, menu, shortcode, and legacy-detector contexts.
Tests should compare schema defaults with Hugo’s actual parsed values and exclude removed keys from completion.
F07 — Public configuration and front-matter references are not current (P2)
Both reference pages claim to list every key read by the theme. Material differences include:
Long English date defaults, although hugo.yaml uses ISO 2006-01-02.
Blog docs omit hero, table, toggle, size, toc_style, and toc_taxonomies.
Removed release maps and filters are presented as current, while release_url is absent.
images: [] is described as disabling featured images, although bundle discovery continues.
upstream_modified is described as adding a line, although it changes the attribution verb.
Invalid-input claims conflict: immediate failure versus warnings in ordinary previews and failure only at strict gates.
The Book guide says OINK stops at Print HTML, although v0.7 shipped BookManifest/EPUB/PDF tools.
Asciinema/OpenAPI guides present static-output defects as product contracts.
Features lists 28 vendor dependencies, although the authoritative manifest has 26.
English and Chinese usually share the same outdated answer. Translation parity cannot detect that error.
Treat both references as a focused contract migration.
Derive comparable key inventories from implementation/schema. Review semantics manually.
Check current-key coverage, placement of removed keys, enums, and defaults.
F08 — The Design tree contains conflicting authorities and unretired proposals (P2)
Shell retires navbar columns/mega panels and promises a warning with one column.
Landing still says navbar mega-menu columns accept 1–4. Implementation and tests follow Shell.
The lifecycle is also incomplete. config-schema is marked implemented but remains an Active proposal.
Book publication has shipped the manifest, EPUB, PDF, and most CI work, but a Draft proposal duplicates the Architecture contract.
Media convergence keeps implemented milestones and open M4 in the original design record.
Correct Landing. Move stable config-schema facts to Architecture/Decision and retire the proposal.
Reduce Book publication to the remaining consumer-migration question, or replace it with a focused follow-up.
Active proposals should not define a second current API.
F09 — OpenAPI accessibility claims conflict with test exclusions (P2)
The axe suite excludes .td-swagger-ui and .td-redoc.
Its comments identify Swagger’s unnamed server selector and version stamp that cannot scroll by keyboard.
They also identify Redoc operation-description contrast.
The guide discloses only Swagger defects and presents rendered Redoc as the alternative.
This implies that Redoc meets the site’s zero-violation gate.
Publish the actual boundary in both languages. Fix Redoc contrast in theme CSS where possible.
Use a narrow post-render adapter for fixable Swagger DOM.
For remaining upstream defects, provide versioned waivers, upstream issue links, and a separate axe report.
Do not exclude the entire supported feature while claiming zero site-wide violations.
F10 — The current theme does not directly support a strict CSP (P2)
Deployment guidance says strict CSP is workable.
It lists only author scripts, ECharts callbacks, analytics, remote specifications or diagram services, and Giscus.
Ordinary Docs pages already emit two theme-owned inline scripts for initial theme display and shell prepaint, plus inline styles.
Markmap, Swagger, Algolia, and Google CSE add more theme-owned inline initializers.
There is no nonce API, hash manifest, or complete sample policy.
script-src 'self' blocks initial theme display and shell-state restoration.
style-src 'self' blocks theme colors, font roles, Landing, and several inline custom properties.
Consumers must add 'unsafe-inline', maintain hashes, or override templates. The guide states none of these requirements.
Move stable initializers to same-origin chunks with data/JSON configuration.
For unavoidable inline content, provide a generated hash manifest or one nonce hook.
Publish policies for minimal core, Markmap/OpenAPI, and third-party integrations. State the style-src requirements.
F11 — Browser compatibility has no baseline or cross-engine proof (P2)
CI installs only Chromium. Product documentation gives no minimum Chrome, Firefox, or Safari version.
The implementation uses or enhances content with :has(), dialog, inert, color-mix(), @property, logical properties, and discrete display transitions.
Some paths have fallbacks, but there is no engine matrix.
RTL checks mostly use source markers, small JS tests, and one element-level geometry change.
They do not use a complete RTL-language site.
Most forced-color checks verify SCSS strings instead of computed behavior.
Publish a small support matrix. Test core shell, navigation, content, and dialogs on Chromium, Firefox, and WebKit.
Add a real languageDirection: rtl integration configuration.
Also test forced colors, reduced motion, 320 px, and 200% zoom.
F12 — Output-security and Markdown gates do not inspect every claimed surface (P2)
For .md, check-output-security.py checks only Markdown links. It does not send raw HTML through the HTML scanner.
Redoc/Asciinema scripts, spec-url, and raw href are therefore invisible.
It also ignores CSS and JSON URLs. The fixture uses a broad --third-party allowance.
check-rendered-markdown.mjs has a misleading name. It scans generated HTML text for leftover Markdown syntax, not generated .md.
The actual Markdown golden set covers 15 pages and omits OpenAPI/Asciinema.
Use clearly named gates for HTML trust, machine-output purity, and rendered-text residue.
Give generated Markdown a narrow raw-HTML allowlist.
Deliberately parse CSS URLs, form actions, JSON URLs, and non-executable JSON scripts.
Every public shortcode should have at least one Markdown/Print/RSS behavior case.
F13 — Candidate integration across the two repositories is manual (P2)
Theme CI tests only synthetic tests/site. Documentation-site CI tests only the public tag in go.mod.
Real EN/ZH and Playwright validation for theme PRs depends on local maintainer HUGO_MODULE_REPLACEMENTS.
Changes in both repositories cannot be committed atomically.
Both repositories can pass checks while public references differ from implementation, as this review shows.
The written separation of release states is correct, but automation does not enforce delivery of implementation, owning checker, and paired contract together.
Add a read-only candidate workflow. Check out a theme PR SHA and a declared documentation-site SHA.
Apply a temporary module replacement, then run npm test and critical browser suites.
Allow Design-contract PRs to identify candidate theme SHAs.
Tag, pin, and deployment remain distinct. The candidate pair gains one traceable joint result.
F14 — Checker maintenance cost and source coupling are high (P3)
Coverage is valuable, but 34 check-*.py files contain 546 read_text() calls.
Many repeat require, temporary-site creation, file writes, Hugo invocation, and error aggregation.
Many assertions preserve template/SCSS spelling, nearby comments, or complete file equality instead of observable behavior.
Some helpers hard-code theme: oink with --themesDir <repo-parent>, making the checkout or worktree basename an implicit requirement.
Without a common Python lint/type gate, checkers are quick to add but can retain shared testing omissions.
Create a common fixture builder and assertion library. Put negative cases in table-driven data.
Keep source checks only for actual topology rules. Move other checks to parsed output or computed styles.
Load themes through explicit symlinks or module replacements instead of repository basenames.
F15 — Runtime splitting succeeded, but baseline CSS/fonts dominate first visit (P3)
The isolated strict fixture baseline was:
Metric
Value
Cold/warm build
1.256 s / 1.273 s
Pages
249
Stable JS chunks
18
Main + Font Awesome CSS
549.8 KB raw / 91.1 KB gzip
Fonts total (FA portion)
999.7 KB raw / 248.5 KB gzip
Median Docs-page JS
176.9 KB raw / 55.3 KB gzip
Generated public
26.2 MB
v0.7.0 Go module zip
7.8 MB (about 20.5 MB and 1,140 files expanded)
Stable first-party capability chunks removed bundles for feature combinations correctly. Large third-party runtimes remain page-local.
Bootstrap/theme/Landing CSS and the complete Font Awesome distribution are the remaining common cost.
Do not prune Font Awesome based on theme template usage. That would violate the authoring contract.
Measure whether Landing, Book, or Swagger CSS can be independently cached and limited to relevant pages.
Inspect fonts requested on first visits. Maintain a trend report instead of an arbitrary hard threshold.
F16 — Vendor builds are reproducible, but advisory and CI supply-chain gates remain manual (P3)
Positive evidence: VENDOR.json pins 26 packages, 56 artifacts, 31 license files, and tree hashes.
check-vendor.py passed. OSV and npm audit found no known advisory in this snapshot.
The custom manifest is outside common SBOM/advisory gates. npm audit cannot inspect vendored browser packages.
Two documentation-site workflows download Hugo .deb files and immediately run sudo dpkg -i without checking a checksum.
Actions use movable major tags. Theme CI uses floating Python 3.x.
Generate CycloneDX/SPDX from VENDOR.json. Schedule OSV scans.
Pin Hugo archive/deb SHA-256 values and trusted release actions to commit SHAs.
Select a specific Python version or matrix.
F17 — Design and release records have lost signal (P3)
CHANGELOG.md has 1,768 lines. Its v0.7.0 section has about 300 lines, and Unreleased uses about 20 lines for one checker retry.
These narratives provide useful engineering history, but make breaking changes, migrations, and observable behavior harder for upgraders to find.
Contracts recognize book_kind and book_part, and content front matter repeats them, but templates explicitly do not read them.
They impose API-like authoring work without behavior. Implemented proposals that remain active provide another duplicate answer.
Keep changelog entries focused on observable changes, breaking/migration notes, and concise fixes.
Move long design accounts to Blog/Research and link them.
Give metadata without behavior a consumer/schema, or make it site-owned.
F18 — The Print isHTML FIXME is no longer accurate (P3)
hugo.yaml says to leave isHTML unset until Hugo fixes issue #14381.
Hugo closed it on 2026-01-17, and the fix shipped before OINK’s 0.160.1 floor.
Enabling isHTML: true still produces missing page/section/landing Print-layout warnings in this theme, which fail strict builds.
The dependency changed from “waiting for an alias fix” to “the current Print template names rely on non-HTML lookup
rules.” Do not simply remove the workaround.
First complete the HTML-classified Print lookup matrix and alias/subpath tests.
If false remains intentional, explain the actual reason in the comment.
Add a test to prevent cleanup based only on the closed issue.
Strengths
Source, local validation, commit, tag, public module, consumer pin, and deployment are explicitly separated.
The Hugo 0.160.1 floor plus 0.164/0.165 theme matrix is strong.
Most newer components follow warning/fallback, four-output, shared URL/attribute, and capability-flag contracts.
The 32 locale schemas match, with strong real EN/ZH page, heading-ID, link, and narrow-navigation gates.
Search, keyboard behavior, surface coordination, page actions, and theme color have both unit and browser behavior tests.
Vendor license/hash checks and EPUB/PDF path, loopback, CSP, and overwrite boundaries are thoughtfully designed.
Manual 320 px review found no page-level overflow; current core visual quality is good.
Builds are fast, and first-party JS now uses stable capability chunks.
Recommended remediation roadmap
Phase 0: before the next tag
Set Swagger validatorUrl: null and add a production-origin no-network test.
Build the public-parameter inventory and validate every F02/F04 field with negative cases.
Redesign four-output behavior and runtime gates for Swagger, Redoc, and Asciinema.
Validate custom action and archived-version URLs.
Repair the schema parser/scanner and regenerate both schemas.
Synchronize paired Config, Front matter, OpenAPI, Asciinema, Book, Features, and Landing-contract pages.
Phase 1: contract gates
Create a minimum HTML/Print/Markdown/RSS coverage map for all 29 shortcodes.
Split and strengthen output-trust and machine-output-purity gates.
Normalize all Landing section input centrally.
Externalize theme-owned inline initializers and publish CSP guidance.
Add a cross-repository candidate workflow.
Phase 2: compatibility and structure
Add Firefox/WebKit, real RTL, forced colors, and 200% zoom.
Consolidate the Python checker harness and source-string assertions.
Evaluate surface-specific CSS and actual font requests.
Generate an SBOM, schedule OSV, and pin CI download digests.
Retire implemented proposals and reduce changelog volume.
Acceptance criteria
A same-origin Swagger specification on a production-like origin makes no third-party request.
Every invalid public configuration warns and falls back/omits in ordinary builds, fails strictly, and emits no ZgotmplZ.
Generated .md contains no td-*, theme script/style, or empty interactive container.
Print loads no Swagger/Redoc/Asciinema runtime and provides an understandable static alternative.
Schema default types exactly match Hugo parsing, and removed keys are absent from completion.
EN/ZH configuration and front-matter key/enum/default inventories match implementation.
Core Playwright passes on Chromium, Firefox, and WebKit, with real RTL and forced-color behavior assertions.
Every candidate theme SHA has a traceable joint validation against the real documentation site.
Review limits
This review did not individually audit consumer repositories, production response headers/CDN caches, real Firefox/Safari, or screen readers.
It did not manually reverse-engineer 13 MB of minified third-party source.
Advisory checks are a 2026-08-26 snapshot and may change.
Existing CI/contract evidence covered DDIA/TPME EPUB/PDF consumers.
7.8.8 - Community issue and PR review, 2026-09-19
Evidence, acceptance advice, and focused remedies for community issues 40, 41, 42, 44 and pull request 43.
The reports identify useful problems, but they are not all defects of the same kind.
Fix hidden navigation focus first.
Accept PR #43’s direction as a small correctness fix after clarifying its boundary and adding coverage.
Treat search-tail registration and public sidebar state as additional APIs requiring their own acceptance work.
Self-root collection ignores an explicit sidebar_root_menu: false. Reproduced.
Conditional acceptance: the patch correctly filters the global candidate list. Document the current-root exception, add regression tests, and obtain successful CI.
There is no supported way to append a query-dependent action to local search.
This is a reasonable small extension proposal. It does not identify a failure of existing local search. Correctness repairs have higher priority.
Baseline and method
GitHub API reads found four open external issues and one open external PR.
The other open issue, #37, was the maintainer’s release tracker.
The external items had no discussion comments or submitted PR reviews at the snapshot time.
Input
Verified snapshot
Remote theme main
93ac292014a3cd81f7c41caec4df98ed9d2dc45a
Local theme
75ddc95. Only the release text in CHANGELOG.md differs from remote main.
PR #43 head
8eeb8ecaf525097cc56572fe22234db381bfc16a, one changed template line
Local documentation
ff0ba39. go.mod still requires OINK v1.0.0.
Published release
GitHub’s latest release is v1.0.0. The remote query returned no v1.1.0 tag.
Build tools
Hugo Extended 0.166.0, Node 26.9.0, npm 11.19.1
Browser observation
macOS, Chromium 153.0.0.0, light theme, real sibling documentation site using a command-scoped module replacement
The method combined complete issue/PR bodies and comments, the exact diff, and bilingual Design contracts with inspection of owning templates and JavaScript.
It also used a temporary bilingual site under the /sub/ base path and targeted documentation-site browser interactions.
No theme implementation changed in the shared checkout.
PR 43: accept the small fix with a precise boundary
The first pass in root-menu-roots.html
filters top-level sections by sidebar_root_menu.
The second pass collects sections with sidebar_root_for set to self, but omits that filter.
Sections excluded in the first pass can therefore return in the second.
The PR adds the same explicit-false predicate to the second pass:
The patch keeps the default for absent or true values, the section constraint, and URL deduplication, while preserving navigation-tree order, pager order, and language-specific caching.
These properties make it a focused correctness fix with no need for a broader navigation refactor.
However, root-menu-entries.html
subsequently appends the current resolved root when absent.
This existing behavior is documented in the navigation guide, so it is not a new PR regression; it does prevent the broader claim that false hides the root on every page.
The local probe used a top-level Blog root and nested Docs root, both with sidebar_root_for: self and sidebar_root_menu: false.
It also included a visible Docs root and a self-root without a visibility override.
English and Chinese results were identical and retained language-aware /sub/ URLs:
Viewed page
Before the PR
With the PR
An unrelated Docs page
Both hidden self-roots appear
Both disappear
A page inside the hidden Blog root
Blog appears
Blog still appears through current-root fallback
A page inside the hidden nested root
Nested root appears
Nested root still appears through current-root fallback
A visible self-root
Appears
Still appears without duplication
Recommended contract: false excludes roots from site-wide selectable candidates, but the current root may remain for orientation.
Keeping this exception is the smallest compatible interpretation. State it explicitly in both languages.
If the intended contract requires absolute exclusion, change the current-root fallback and switcher trigger together.
Another predicate alone is insufficient. Check zero and one-entry states.
Before merging:
Add output-based bin/check-shell.py cases for hidden top-level and nested self-roots, absent/true values, deduplication, and current-root behavior.
Cover one-entry degradation and EN/ZH subpaths.
Update the Shell contract and navigation guide together.
Change the PR description’s YAML comment from // to # so readers can paste its example.
Resolve the workflow’s action_required result and run required checks on the final head.
At this snapshot, the PR head had no completed check runs (MERGEABLE, UNSTABLE).
The maintainer can add these small changes while preserving the contribution.
Do not make acceptance depend on #40 or all of #41.
Issue 41: repair isolation, then expose state
There are two separate findings.
Whole-sidebar hiding uses transforms and, on desktop, opacity.
Drawer and collapse controllers leave hidden controls in keyboard navigation.
In the browser probe, Collapse sidebar left focus on the transparent collapse button.
Tab then moved focus to the hidden root switcher.
The panel had zero opacity and no effective inert or aria-hidden ancestor.
This is a reproducible keyboard usability defect.
Closed mobile panels use similar off-screen positioning without explicit isolation.
Disclosure writes are duplicated across
the click controller and responsive relocation
and cached active-path hydration.
There is no public setter, getter, or committed-state event.
Existing storage for sidebar collapse, width, and scroll position does not persist per-branch disclosure state across page loads.
The authoring guide’s local expansion-state claim needs this distinction.
Recommended repair:
Centralize whole-sidebar isolation at initialization and every open, close, collapse, hover-overlay, restore, and breakpoint transition.
Remove isolation before moving focus inside.
Return focus to a visible external control before making content inert.
Isolate content while keeping the external restore button and desktop edge hover target active.
Applying inert to the pointer sensor would break hover interaction.
aria-hidden alone does not prevent keyboard focus.
The HTML inert contract controls interaction and accessibility exposure.
Route disclosure changes through one commit function separately.
Update aria-expanded, the open class, and localized label before emitting one event.
Repeated writes of the current value should have no effect.
Expose a small setter/getter and event only after defining stable IDs, invalid-ID behavior, initialization readiness, and restoration order.
Keep version/locale storage policy downstream-owned. Let the active path take precedence after restoration.
The proposal needs a scope correction.
Responsive TOC/backlink/taxonomy groups can move from the sidebar to the right rail.
A controller searching only current-sidebar descendants cannot control wide-layout writes.
Register OINK-owned targets independently of their current DOM parent.
Restrict the public sidebar API to its intended registered subset.
Acceptance must check real Tab order and the accessibility tree in hidden states.
It must also check restored desktop collapse on first load, hover entry/exit, focus return, Escape, backdrop close, and scroll unlock.
Cover the 768/1200 breakpoints and preserve #24’s visible no-JavaScript fallback.
Issue 44: real symptom, partly expected behavior
On the documentation configuration page, clicking the article heading focused main#td-main-content.
Clicking table headers focused div.td-table-scroll; clicking code focused pre.chroma.
In each case, :focus-visible was false after clicking and true after pressing unbound z.
Main/code outlines changed from none to browser auto outlines. Tables used the theme’s solid outline.
This reproduced the mechanism without the reporter’s Linux compositor or Super key.
The Selectors specification
explicitly describes keyboard activity changing focus indication while focus stays on the same element.
The report therefore provides useful UX feedback.
Browsers are not required to keep mouse-focused elements free of focus rings after keyboard activity.
Recommended treatment:
Keep the main skip-link target and focusability.
Replace its oversized outline with a local, visible content-entry cue, such as a title-area indicator.
Verify actual skip-link activation.
Keep visible keyboard focus on scrollable tables and code. Normalize its appearance if needed.
Focusability enables keyboard scrolling.
Do not apply global outline: none, remove all tabindex attributes, or blur focus on arbitrary keypresses.
If OINK suppresses only pointer-origin reading focus, define that behavior explicitly for these non-editable containers.
Test pointer, Tab, skip-link, and programmatic focus, including dark and forced-colors modes.
A global input-modality framework is disproportionate to this report.
This review recommends a focused presentation improvement while keeping table and code keyboard focus cues.
Issue 42: distinguish hiding from grouping
The question names _index.json and supplies screenshots instead of a source fixture.
This review could not visually inspect the original screenshots. The author’s intended first change remains unresolved.
When replying, request a small directory tree and actual index/front matter.
Without that evidence, do not assume _index.json is a supported page source or a typo.
The existing options have different meanings:
Option
Current behavior and limitation
no_list: true
Removes the child list from the section’s content body. It does not hide the section’s sidebar row.
hide_summary: true
Removes an item from a parent section’s body list. It does not change sidebar grouping.
toc_hide: true
The content-tree walker filters out the node before recursion. This also removes its subtree from that tree.
sidebar_root_menu: false
Controls root-switcher candidates. It does not control the node’s row in the reading tree. See PR #43.
sidebar_root_link_self: false
Redirects a self-root’s row to its parent. It does not make the row a non-link group.
sidebar_divider: true
Emits a non-link heading. The shared renderer does not emit the supplied children in that branch.
build.render: link
Suppresses the section HTML and retains its permalink. The current sidebar still emits a link to it. This option alone is insufficient.
The temporary site confirmed that divider sections keep child HTML while child sidebar links disappear.
Sections with only build.render: link have no section HTML, but keep clickable sidebar rows and children.
This matches Hugo’s build-option semantics
and the theme’s shared node renderer.
For a real “group label with child links, but no directory-page navigation” requirement, first consider completing sidebar_divider for sections.
Keep leaf dividers and section children. Use real disclosure buttons when folding is enabled.
Check existing consumers before adopting this interpretation.
Add a separate node switch only if the divider contract cannot express it compatibly.
Keep section publication separate from whether its navigation label is linked.
The change must preserve hierarchy and active-path expansion in both walkers, and keep children in the pager.
If a section is intentionally unpublished, the change must avoid dead targets in breadcrumbs, search, root switching, Print, and machine-readable navigation.
Hiding whole nodes with CSS is not a solution.
Issue 40: a narrow extension is reasonable
Source inspection confirms the gap.
groupsFor
creates only built-in page/action groups. The public Palette object has no provider registration.
registerExecutor
accepts only built-in action IDs.
Static URL commands cannot replace rows carrying the current query.
The proposed search-tail slot is a useful upstream boundary if its scope stays small.
It uses synchronous data-only row creation, asynchronous activation, and local results first.
OINK controls rendering, selection, keyboard handling, and ARIA.
It needs no bundled AI provider, credentials, remote search, or generic plugin system.
Before adopting the proposed API, settle and test:
Define which settled text-search states call providers.
Preserve empty, command, choice, loading, and default no-extension behavior.
Snapshot the query/locale used for each rendered row.
Preserve native empty/index-error messages, retry behavior, and the difference between local page counts and all selectable rows.
Validate and copy descriptors. Render titles and descriptions as text.
Isolate provider exceptions, duplicate IDs, and invalid descriptors.
Handle synchronous throws and rejected promises. Clear pending state and reject duplicate activation.
Cancel stale sessions. Ensure unregister handles remain safe when IDs are reused.
Test handoff to another dialog.
Palette close already avoids returning focus when focus moved outside. Preserve this guard.
Define how successful handoff differs from cancellation.
An “every close aborts activation” rule can cancel the assistant being opened.
Preserve default local-only network behavior and conditional bundles.
Document that registered extensions run as trusted first-party scripts in the page context.
Before implementation, record the accepted API in a bilingual Design proposal.
Downstream Ask AI wrappers can continue until a tagged release provides the hook.
This is not required for the small correctness fixes.
Delivery order and ownership
Order
Delivery
Owning checks and documentation
First
PR #43 completion and hidden-sidebar isolation as separate small changes
check-shell.py; site responsive/keyboard/accessibility cases; EN/ZH Shell contract and navigation guide
Next
Main-content focus styling and clarified grouping behavior
Content/reading and navigation checkers as appropriate; browser focus/scroll/skip tests; EN/ZH architecture, shell, and authoring guidance
Later
Public disclosure controller, then search-tail API
Theme JS tests and check-navigation-contract.py / check-palette.py; real site fixtures; accepted bilingual API contracts
For each behavior change, run its owning checker first.
Then use the sibling site’s make check, make browser, and make dev for relevant integration and visual review.
Do not combine unrelated proposals into one large sidebar/search rewrite.
Do not delay small fixes until all features exist.
Suggested response content, not posted: acknowledge #43’s filter defect and explain its current-root exception.
Accept #41’s isolation defect separately from the API request.
Acknowledge #44’s reproduction and explain standard focus behavior.
Explain #42’s options and request minimal input.
Describe #40 as a scoped enhancement, not a local-search failure.
Historical external issues are closed.
#22 was resolved by enabling Goldmark passthrough, with reporter confirmation.
#21 received the Mermaid viewer and corrected centered presentation.
Arbitrary right alignment was explicitly excluded. Do not silently count either issue as a new open defect.
Validation and limits
Executed for this review:
python3 bin/check-shell.py passed on the local baseline and in an isolated checkout at PR #43’s exact head.
Palette controller and model tests passed: two test files, no failures.
Strict temporary Hugo builds before/after the actual PR diff reproduced EN/ZH self-root filtering and fallback under /sub/.
The same fixture demonstrated grouping limitations.
The real bilingual site built with --panicOnWarning using the local theme.
Targeted Chromium interactions reproduced all three focus outlines and the desktop hidden-focus defect.
Bilingual, rendered-content, and link checks passed, along with all 57 non-browser tests.
Initial make check stopped at the llms.txt snapshot because this report added an index entry.
After verifying that one-line addition and updating the golden, affected and remaining groups passed on rerun.
Local verification used Hugo 0.166.0 on macOS. Linux Super-key behavior, mobile accessibility-tree isolation, dark/forced-colors cases, and the exact #42 screenshots are covered in the follow-up acceptance below.
Implementation and acceptance follow-up
The maintainer chose to merge the contributor patch first, then complete repairs and extensions directly on main without another PR.
PR #43 merged as
6e814089.
The merge was pulled while preserving the local release-note commit.
The implementation follow-up is 56bfe37.
Item
Implemented behavior
Owning acceptance
#43
Both root collectors honor explicit false. Current-root orientation remains compatible. Dividers and unpublished sections do not become switcher links.
Strict EN/ZH subpath fixtures cover hidden top-level/nested roots, absent/true values, deduplication, current-root fallback, zero and one entry.
#41
One disclosure controller commits ARIA, classes, labels and inert state. A late-safe API supports downstream persistence. Hidden whole-sidebar content is isolated. Hover and drawer restoration remain usable.
Runtime tests plus browser checks for atomic events, no-op writes, scope, active paths, blocked storage, responsive relocation, focus return, real Tab traversal, Escape, backdrop and breakpoints.
#44
A pointer-origin mark suppresses later incidental container outlines. Tab and fresh programmatic focus retain visible cues. The skip destination outlines the title.
Browser checks for article/table/code in light, dark and forced-colors modes, plus keyboard and skip-link regression coverage.
#42
Divider sections keep their children under a non-link label. build.render: never suppresses their own page. Breadcrumb, search, pager, navigation JSON, Book TOC/Markdown and Print agree. Explicit navigation also works under bilingual subpaths.
Strict generic/data-tree fixtures, Book depth-three heading checks, EN/ZH browser fixtures and no-JavaScript traversal.
#40
Trusted site scripts can register synchronous data-only search-tail rows and asynchronous activation. OINK continues to own native ordering, ARIA and validation. It also owns error isolation, cancellation, unregistering and focus handoff.
Runtime lifecycle tests and a Chinese browser scenario cover pointer/keyboard selection and literal display text. They also cover context snapshots, external-dialog focus and unregistering.
Acceptance used the sibling theme checkout on macOS with Hugo Extended 0.166.0, Node 26.9.0, and Chromium:
All 44 theme JavaScript tests passed.
check-shell.py, check-reading.py, check-palette.py, and check-keyboard.py passed.
A broader run passed 29 of the other 31 theme CI commands.
Two local failures involved the media checker’s version-specific processed-image hashes and four goldens with Hugo 0.166’s changed KaTeX output.
Ordinary navigation markup matched after preserving its existing whitespace.
Fixed-toolchain verification is recorded below. Unrelated expected outputs were not rewritten.
make -C ../oink.pgsty.com check passed bilingual source/rendered/link checks and all 57 non-browser tests.
make -C ../oink.pgsty.com browser passed all 141 tests:
30 accessibility, 45 responsive/blog/palette, 16 keyboard, 10 content, 18 code-block, 4 scenario, 5 theme-color, and 13 community regressions.
Accessibility included the complete multilingual sitemap scan.
Strict theme fixture output and namespace checks passed.
Local Book packaging produced an EPUB with five chapters and zero checker errors.
It also produced a 23-page PDF with all five expected Book pages and zero checker errors.
make dev served the real site for desktop-light, Chinese-dark, collapsed-sidebar restore, and 375px mobile-drawer review.
Escape returned focus to the visible drawer opener.
The temporary viewport and development server were cleaned up afterward.
Accepted contracts are in Shell and Architecture, with matching Chinese sources.
Navigation, organization, palette, and Print guides were also updated.
The documentation repository owns regression suites. The theme keeps focused checkers and synthetic inputs.
The merged PR’s fixed-toolchain CI passed all three jobs.
The final implementation’s CI run also passed at exact revision 56bfe37092a43fc12c0e16f865d3d3407c55cbde.
Hugo 0.165.0, browser runtime tests, and Book publication succeeded.
This included media and four-state golden checks that differed locally on Hugo 0.166.0, plus root/subpath publication.
The supported 0.160.1 floor was not separately retested. The declared continuous-test toolchain remains 0.165.0.
At this checkpoint, the documentation repository stayed pinned to v1.0.0 while awaiting the v1.1.0 tag, and issues #40, #41, #42, and #44 remained open pending release publication.
Image-copy follow-up
The maintainer also reported preview instructions below images after copying blog articles to rich-text editors.
The blog pins OINK v1.0.0 and enables params.ui.image_zoom.
That release and the reviewed main revision inserted a visually hidden text span after every eligible image.
Native Chromium copying reproduced Open image preview and its Chinese equivalent in clipboard content.
This is a theme defect independent of the destination editor.
Theme commit 75052f8 puts image descriptions and localized actions in the button’s aria-label, keeping helper text nodes out of the article.
Image alt text, authored captions, native button behavior, and dialog focus return remain intact.
The component contract
and image guide document this copying behavior.
check-image-zoom.py and all 57 non-browser site tests passed.
The focused browser run passed 16 tests: 14 content-component cases and two desktop-light/mobile-dark dialog accessibility cases.
Component cases included four new EN/ZH image/gallery clipboard regressions.
The regressions read plain-text and HTML clipboard data and check text without its original styles.
They verify retained image URLs, alt text, captions, and accessible names.
Downstream blogs pick up the fix once they upgrade their theme dependency past v1.0.0.
7.8.9 - OINK 1.1 release review, 2026-09-20
Five reproduced runtime defects, documentation corrections, validation evidence, and the OINK 1.1 publication follow-up.
Historical release review (2026-09-20)
This record captures the pre-release validation and five runtime fixes for OINK 1.1, followed by the v1.1.0 publication record.
Scope and baseline
The review starts at theme commit
75052f8a3106d13ef313644836a5ad545135f484,
after the community fixes and image-copy repair.
It examines the v1.0.0..main changes and behavior requested by issues
#40,
#41,
#42,
#44, and merged
PR #43.
It also examines bilingual documentation and the release boundary.
The previous review
records those original reports and their implementation.
The method inspects owning JavaScript, templates and contracts, then exercises transition boundaries with focused regressions that compare failing assertions before each fix with the repaired implementation.
Theme checkers and the real sibling documentation site’s integration and browser suites provide the subsequent acceptance evidence.
At this snapshot, the public release, documentation go.mod pin and configured public version are still v1.0.0.
The blog consumer’s theme pin is unchanged.
Findings and repairs
Five P2 correctness defects were reproduced and repaired in theme commit
08f6563, pushed to main.
They concern ordering in the new APIs and existing focus/navigation behavior.
They require no new configuration format or content migration.
Finding
Trigger and observed failure
Minimal repair
P2: sidebar readiness fires before hydration
A consumer awaits OinkSidebar.ready or handles oink:sidebar-ready. The readiness microtask can run between DOMContentLoaded listeners. The cached sidebar’s active path is not yet hydrated, so consumers see incomplete initial state.
After all initialization listeners and aside placement finish, resolve readiness in the next task. Preserve the existing ready Promise and event contract.
P2: a pending action can enter a native choice menu
Start an asynchronous search-tail action, then activate a native choice such as theme selection. The pending guard ran after the choice branch. This allowed that menu to replace the pending action’s rows.
Check pending activation before any row-type branch. After completion, ordinary choice activation is available again.
P2: a collapsed right TOC rail remains focusable
Collapse the desktop right rail. Its hidden control and links remain keyboard targets. Focus can stay inside the hidden panel.
Apply inert and aria-hidden to the rail panel. Move focus to the visible restore control. On restoration, return focus to the column control. When relocated, keep the movable aside outside that isolation.
P2: arrow navigation skips non-link groups
From a child of a divider-only group, Left/a cannot consistently return to the parent disclosure and fold it. The group button is absent from the tree’s focus sequence.
Include group disclosure buttons in tree focus navigation and direct-parent traversal. Right/d opens or enters the group. Previous/next page navigation still uses links only.
In the mobile drawer, collapse an aside group and wrap with Shift+Tab. Hidden descendants still count as focusable. They can make the wrap fail or leave focus stuck.
Exclude controls under inert or hidden from the drawer’s focusable set. Also exclude controls with hidden/collapsed visibility.
Implementation and regression ownership:
Finding
Theme implementation
Owning regression
Readiness
assets/js/sidebar-state.js
tests/js/sidebar-state.test.js; site tests/browser/community-feedback.spec.mjs snapshots the active path from both readiness signals in EN/ZH
Site tests/browser/community-feedback.spec.mjs covers EN/ZH collapse, Tab traversal, restoration, reload and aside relocation across desktop/tablet/mobile
Group keys
assets/js/keyboard-nav.js
tests/js/keyboard-nav.test.js covers LTR/RTL, arrows/WASD and link-only paging. Site community tests exercise real EN/ZH groups.
Drawer trap
assets/js/docs-shell.js
Site community tests collapse relocated groups and wrap Shift+Tab and Tab. They assert that focus never enters an inert or hidden subtree.
The readiness and pending-choice regressions failed against the previous implementation before their fixes.
The right-rail browser assertions also failed in both English and Chinese before isolation was added.
The repairs remain small: they change timing, move one pending guard earlier, add explicit rail isolation, and adjust tree focus targets and the drawer’s visibility filter.
These changes preserve the already accepted behavior: both root collectors honor sidebar_root_menu: false, and non-link groups retain their children.
Pointer focus avoids incidental article outlines while keyboard cues remain visible.
Search-tail callbacks retain their cancellation and handoff contract.
The image preview fix continues to use an accessible name without inserting helper text into copied article content.
Final regression results are recorded below.
Documentation readiness
The current documentation update covers 28 files in 14 EN/ZH pairs:
The six Design contract pairs use candidate-v1.1.0.
They describe implemented main behavior without announcing a published release.
Navigation, layout and front-matter guides match current root filtering, divider groups and bilingual deployment paths.
They also match the centered navbar, narrow-screen drawer and in-place navbar reveal behavior.
Organization and palette guides explain runtime load order, readiness and feature detection.
They also explain site-owned persistence/integrations. Keyboard and image guides explain the fixes and the older-version boundary.
Installation guidance distinguishes the validation toolchain from the public version.
Existing heading IDs remain stable. The new sidebar API heading has a matching Chinese ID.
The two 1.1.0 release-note files and two upgrade-guide files are also prepared.
The release note remains a draft/candidate. Both home-page release entries point to the published 1.0 version.
Validation snapshot
Counts below describe the 2026-09-20 snapshot for theme 08f6563.
Site acceptance uses the sibling checkout through a command-scoped module replacement.
Local site checks used Hugo Extended 0.166.0, Node 26.9.0 and Playwright 1.62.1.
Candidate CI used the pinned Hugo 0.165.0 toolchain.
The 0.160.1 floor was checked separately with the official binary.
Check
Result and scope
Baseline 75052f8 CI
Passed all three jobs: pinned Hugo toolchain, browser runtime tests and Book publication. Exact baseline run.
JavaScript unit suite after the fixes
Passed: 44 tests.
Official Hugo Extended 0.160.1
Passed the focused i18n and shell checkers. i18n covers 32 catalogs × 194 messages. The real documentation site also passed a production build against the local candidate with --panicOnWarning: 376 pages per language. The draft release is absent, and both home-page links point to 1.0.0.
Bilingual source and style checks
Passed including this report: 129/129 page pairs, 988 source headings, Markdown style and git diff --check.
Final focused theme checkers
Passed: shell, palette, keyboard and image zoom.
Final real-site non-browser suite
make check passed all 57 tests. It checked 200 rendered content pages, 331 linked HTML pages, 39,803 internal links and 3,863 fragment links. Only the two expected Markdown goldens changed, for the release summary and documentation index. The floor production build also passed link checks: 327 pages, 39,059 internal links and 3,833 fragments.
Final browser suite
make browser passed all 149 Chromium tests in eight suites. The suites contain 30 accessibility, 45 responsive/blog/palette, 16 keyboard, 14 content components and 18 code blocks. They also contain 4 scenarios, 5 theme-color and 17 community regressions. Coverage includes the full multilingual sitemap and six viewport widths. It also includes light/dark, forced colors, clipboard and no-script cases.
Agent documentation sample
93/100 (A) across 50 same-origin sampled pages. Sampled links resolve. 49 pages provide Markdown, and all 270 sampled code fences close correctly. The checker warns that the HTML llms.txt discovery hint is missing or too deep.
Rendered review
Reviewed the Chinese release note in a desktop dark view and English in a narrow light view. Right-rail collapse removes its descendants from the accessibility tree. It also moves focus to the restore button. Restoration returns focus to the visible rail button.
Final theme revision and its CI
08f6563 passed all three jobs: Hugo 0.165.0, browser runtime tests and Book publication. Exact candidate run.
Public v1.1.0 tag, consumer upgrade and deployment
Not performed.
Within this review’s scope, no unresolved implementation blocker remains.
The candidate is ready for the publication steps below.
Repeat the checks from sibling checkouts.
During development, keep the published dependency pin intact:
# From the theme repositorynode --test tests/js/*.test.js
python3 bin/check-shell.py
python3 bin/check-palette.py
python3 bin/check-keyboard.py
python3 bin/check-image-zoom.py
# The site Make targets apply a command-scoped sibling module replacement.make -C ../oink.pgsty.com check
make -C ../oink.pgsty.com browser
Remaining publication steps
Publication has not been executed. After the final revision passes acceptance:
Finalize CHANGELOG.md, the release date and the release record.
Publish the v1.1.0 tag and GitHub Release from the verified theme revision.
Verify that the module proxy resolves that tag to the intended revision.
Update the documentation consumer pin and version configuration together with its home-page release entry and contract status.
Set the release-note state to draft: false in the same update.
Rebuild and accept the documentation site using the published dependency, without HUGO_MODULE_REPLACEMENTS.
Deploy it and verify the public routes.
A future improvement is an earlier, consistent llms.txt discovery hint for agents entering through HTML.
Limits
Browser verification ran in Chromium. The automated accessibility gate covers theme-owned surfaces while retaining its existing exclusions for vendored Redoc and Swagger UI, and Hugo 0.160.1 floor checks ran on the focused i18n, shell, and production build paths.
Publication follow-up
After this review, the v1.1.0 release
was published on 2026-09-20 from
3a18234.
Only the changelog differs from the accepted 08f6563 implementation.
All three release-commit CI jobs
passed before the annotated tag and stable GitHub Release were published.
A download with a fresh cache, using only the official Go module proxy, resolved the tag to that exact commit.
Its .info, .mod, .zip, version-list entry and signed checksum record were verified.
The module checksum is h1:121L5g57ChRCPyidzEBBcln2Co+0zYRQ+XDDXjymd0Q=.
The go.mod checksum is h1:pHvbUhJCfseB41n5RGwsF7abT3i32VSTpofLQoq4b7Y=.
The public records are the proxy version
and checksum entry.
The documentation publication update pins v1.1.0 in go.mod and go.sum.
It aligns the advertised version and both home-page release entries, and publishes both release notes.
It also promotes the six contract pairs to released-v1.1.0.
The historical acceptance tables above continue to describe the earlier sibling-checkout run.
The site’s Site checks
and Browser quality
workflows track published-dependency validation separately, with both Go and Hugo module workspaces disabled.
Local validation of this published module passed all 57 non-browser tests and 26 focused Palette/community browser tests.
It also passed the strict production build with 378 pages per language.
The checks ran with GOWORK=off, HUGO_MODULE_WORKSPACE=off, and no HUGO_MODULE_REPLACEMENTS.
The publication commit’s Browser quality workflow also runs the complete 149-test browser suite.
7.8.10 - CLI maintenance acceptance on 2026-10-03
Dated source and binary evidence for the local R1–R8/A18 program, preserving the initial audit, failed trials, and final acceptance scope.
Historical CLI maintenance acceptance ledger (2026-10-03 to 2026-10-04)
This record preserves the initial audit, intermediate trials, and local R1–R8 and A18 runtime/archive acceptance for the CLI maintenance roadmap. On 2026-10-04, the CLI surface was simplified to the Cobra/text/JSON/YAML command set defined in the current CLI contract and CLI introduction. These results apply only to the recorded historical source and binaries; later changes to the reduced CLI require separate validation.
Scope and evidence rules
The maintenance roadmap
defines the authorized R1–R8 scope. The current CLI contract
defines its compatibility baseline; the original roadmap
does not add Docsy migration, version lifecycle, OpenAPI, theme publication,
or the conditional E1–E4 extensions to this program. Hugo remains an external
renderer. Generated sites remain ordinary Hugo projects.
Stages are accepted in dependency order. Each stage needs a complete usable
flow supported by owning tests and relevant actual Hugo integration, together
with known limits, a reviewable diff, and accepted EN/ZH contract and guide
updates. New public behavior moves from
the proposal into the owning contract only after its implementation and
acceptance evidence exist.
In the tables below, existing, not rerun means code or a named test was
inspected but its current runtime outcome was not established. Partial
means the first candidate provides a reusable part of the required behavior.
Open means new implementation or decisive acceptance evidence is missing.
Passed, failed, unverified, and unsupported describe a
specific executed input and scope when later runs are recorded.
Inspected inputs and tools
The initial 2026-10-03 audit read both repositories’ instructions and the
documentation README and translation rules, both maintenance PRD languages,
the original proposal, and the current CLI contract. It also inspected existing
Go packages and test names. Execution was limited to version and Git inspection
commands, without running the owning suites or writing consumer sources.
Input
Observed initial state
Host and Go
darwin/arm64; go version go1.27.1 darwin/arm64
Hugo
hugo v0.166.0+extended+withdeploy darwin/arm64, Homebrew build dated 2026-09-09
Node and npm
v26.9.0; 11.19.1; contributor/documentation tools, not CLI consumer requirements
Shared page identity, languages, publication state, source provenance, actual outputs, translations and observed references from Hugo; oink.yaml owns check policy only; links/translations/style share analysis; severity and exclusions cannot hide required incompletion; trustworthy locations
Partial: internal/site isolated snapshots and Page.OutputFormats probe, internal/outputcheck, internal/report; no shared translation/page facts or policy commands at initial audit
Real Hugo routes, aliases, mounts, unlisted/generated-source cases and language relationships; public focused-check/policy cases; required unknown/tool/build/input failures remain 2; source locations only when reliable
R2
Three language layouts; strict/manual and localized policies; duplicate, missing and draft states; explicit versioned review records bind source language and source/translation hashes; bounded native syntax rules; effective-theme coverage; visible versioned baseline; reviewed fixes validate before narrow apply
Open: no translation/review/native-rule/baseline public command at initial audit; rendered-reference checks remain reusable
Preserve thin default build/dev; build --check checks and manifests one strict Hugo output, exports only to new/empty target; digest/provenance manifest and optional minimal public identity; both local CI templates upload the same tree; release diagnosis; explicit-network public verification
Partial: direct wrappers, strict isolated checks and licensed workflow inputs exist; managed build/export, digest verification, CI plans and public verify are absent at initial audit
A08–A10; exactly one Hugo build; stale-byte rejection; revision/dirty/input/theme/tool/settings/coverage provenance without secrets or machine paths; workflow customization/conflicts/provenance and immutable source input; example address policy; fallback/language/resource/canonical/timeout/auth/rate-limit HTTP fixtures
R4
new, snippets and editor setup create ordinary inputs without overwrite; docs/blog/book/project profiles compose one licensed Starter; upgrades provide readable diff and old/new routes, aliases and enabled outputs; unsupported migrations give manual action; existing protections survive
Partial: fixed archive language profiles and hash-bound single-site module upgrade with candidate validation, backups, dirty/workspace/replacement/vendor protection
A11–A12; all new profile/language combinations build with ordinary Hugo; unknown editor settings retained; upgrade route/capability regression and readable diff; source provenance and licenses retained
R5
inspect, impact --since, bounded context, preview move; shared plans include touched files, diff, base hashes, translations, attachments, output/route changes and alias advice; candidate validation and stale/concurrent-safe recovery; ambiguous references require review
Partial: module-specific upgrade plan/apply primitives; no shared content plans or inspect/impact/context/move flow at initial audit
A13–A15; deleting B includes unchanged inbound A; translation/attachment/derived-output impact; uncertain/global changes force full checks; no content execution; candidate/stale/failed-write preservation and ambiguous-link handling
R6
Explicit versioned site registry reuses single-site engine; per-site and aggregate completion; writes only to selected sites; configured preinstalled markdownlint/Vale/lychee adapters normalize findings and declare syntax/network coverage
Open: no workspace/adapter public command at initial audit
Read-only loopback Studio with overview, issues, translation comparison, page relationships and publication views; filters, known sources, actual Hugo preview, comparisons and copied actions; CLI parity; prebuilt assets; explicit allowlist, separate preview origin, Host/Origin/session protection
Open: no Studio server or assets at initial audit
A16; browser/keyboard/screen-reader/mobile/light/dark/long-list flows; same underlying results as CLI; unauthorized hosts/origins/sessions and preview-to-management requests rejected; Node unnecessary for consumer runtime
R8
Markdown/text and front matter forms, selected components and collision-safe attachments reuse plans; authorized allowed writes with visible diff, hashes and candidate validation; no-op bytes and unknown fields/comments/order/encoding/whitespace retained; unsupported form syntax stays text
Open: editing follows accepted read-only R7; no editor API at initial audit
A17/A14; byte-identical no-op, surgical YAML field updates and text fallbacks; stale external-editor saves, traversal/symlink escapes and preview requests fail safely; attachments never overwrite; no management API in static publication
Evidence pages
The stage-by-stage receipts are kept on two companion pages, moved there
unchanged on 2026-11-06 so each page stays small enough for people and agents
to read whole:
R1–R5 evidence: local validation for R1
to R3, authoring and upgrade acceptance (R4), and implementation and
documentation acceptance (R5).
R6–R8 and A18 evidence: workspace and
adapter acceptance (R6), the read-only Studio candidate (R7), accepted reviewed
editing (R8), and the 2026-10-04 runtime completion supplement (A18).
Acceptance case ledger
This ledger combines the initial audit with accepted R1–R7 evidence and the
qualified R8 candidate gates.
Protocol/public R1–R8 commands, frozen owning tests and exact-binary CLI/API reports. Unchanged result schema. Current eight owning gates/Linux qualification plus unchanged-runtime carry-forward of the preceding corpus in #a18
Passed supported current command scope
A02
Hugo resolves slug/url/permalinks/aliases, mounts, unlisted pages and language roots
Real PageFacts/manifest/custom-mount/translationKey fixtures. Preserved ordinary artifacts. Final consumer facts
R1 scope passed
A03
Definite local missing routes fail. Outside origin/path and declared external scope classified honestly
Actual rendered-reference fixture plus subpath/policy regressions and final real sites
Passed the required A03 scope. External availability remains unchecked
A04
Filename, directory and translationKey. Duplicate/missing/draft cases. Strict/localized policy
R2 translation engine, actual Hugo/public commands, final reports and numeric supplement
Passed R2 required scope
A05
Absent record unknown. Changed source/translation hash visible. No mtime inference
R2 hash/status/diff, public preview/apply and final reports
Passed R2 required scope
A06
Real fences, inline code, shortcodes, HTML, attributes, unknown fields and protected text boundaries
R2 actual syntax/provenance fixtures, reviewed corpus and final reports
Passed R2 required scope. Catalog and unsupported-source limits remain explicit
A07
Acknowledged findings visible. New findings block per policy. Required unavailable tools cannot pass
Candidate before apply. Stale/hash/write failures preserve later edits. Ambiguous references unchanged
R2/R4 shared safety, R5 full-mode/inventory moves and R8 regenerated intent/fresh-input candidate validation, guarded writer and stale/late-editor/attachment tests. Current eight owning gates/Linux qualification plus unchanged-runtime carry-forward of the preceding corpus in #a18
Passed supported R5 CLI and R8 CLI/Studio editing scope. Ambiguous or unavailable required inputs still block
A15
Workspace/direct parity. Selected writes only. Bounded context with paths/versions/reasons. No content execution
R5 bounded captured-source/context fixtures and four-site queries. R6 registry/direct/aggregate parity and explicit-name saved apply with other sites preserved
Supported context/workspace scope passed. No implicit batch writes
A16
Five useful CLI-parity views. Keyboard/mobile/light/dark. Source/preview isolation
Accepted R7 evidence retained. Historical source-bound R8 read-only 14 axe/screenshots and Editor 12 axe/screenshots with unchanged UI bytes. Current backend gates, ARM and corpus separately verified, native/API parity, preview isolation, four consumers and canonical render passed. Current eight owning gates/Linux qualification plus unchanged-runtime carry-forward of the preceding corpus in #a18
Passed supported local views. Required partial-preview incompletion/native findings remain visible
A17
No-op bytes. YAML unknown/comment/order preservation. Stale-save and attachment collisions rejected
Corrected frozen core/public/guarded-writer race, actual Hugo/tools, source-bound Editor/read-only browsers, exact-binary four-consumer proposal parity/preservation and guarded canonical source/render passed in #r8. Current eight owning gates/Linux qualification plus unchanged-runtime carry-forward of the preceding corpus in #a18
Passed supported local editing scope. Required partial preview/native findings still block Apply. Final A18 separate
Current freeze/source and repeated five-archive reproduction. Darwin arm64, native Linux arm64 and emulated Linux amd64 nonroot ext4/full offline unit-vet/selected Hugo/native archive/signal smokes passed in #a18
Passed current declared runtime/archive scope. Optional guest prerequisites remain explicit skips. Darwin amd64 is experimental/unverified and Windows outside scope
Candidate sites and source preservation
The selected acceptance inputs include the embedded Starter and three distinct
maintained consumer sites, reusing the historical corpus without writing
consumer sources. The Starter source checkout provides provenance, while
generated profile trials use disposable directories.
Input in the sibling checkout layout
Initial observed identity and purpose
Current candidate acceptance
oink-starter / generated Starter
Source 137843b, two initial status entries. Licensed fixed archive, language/profile/root/subpath trials
Source 907d873 with existing changes. Bilingual documentation/regression and explicit local-theme trial
Final R1 check and source preservation passed. Local-theme evidence remains distinct from public-pin evidence
pig.pgsty.com
Source 75050c0, five initial status entries. Root Docs/Blog rewrites and nonrendering sidebar entries. Declared v1.1.0
Final R1 check and source preservation passed
repo.pgsty.com
Unborn main, no HEAD revision. Materialized untracked sources, generated catalog and declared v1.1.0
Final R1 check and source preservation passed. Revision remains unknown
For each run, record effective module source and versions, flags/network
policy, exit/result/coverage, raw evidence location, and preservation outcome.
Before/after inventories must include all tracked and non-ignored untracked
source bytes and modes, Git status/index state, workspace/replacement files,
and effective vendor inputs. Compare exact inventories. Keep reports, isolated candidates, output and
caches outside consumer sources and outside Git. Full-build timing comparisons
must use the same current input baseline.
Owning checks and documentation gate
Start with the smallest affected Go packages and public behavior tests. The
existing repository gates are make test (offline tests and vet) and
make test-hugo (actual Hugo Starter, snapshot, manifest and public command
fixtures). The owning Hugo gate now runs all owning packages without the old
narrow test-name filter. New fixtures must remain in that gate.
Use a race run for concurrent plan/server changes when the focused tests justify
it. Unit fixtures remain offline. Networking requires explicit invocation.
For documentation, preserve EN/ZH heading number, order and stable explicit
IDs. Use these narrow source checks:
Both source checks passed after this record and its Chinese peer were added.
Eight Chinese research files passed the style checker. Translation source
coverage was 137/137 pairs with 1,082 source headings.
After building the relevant site, complete the rendered documentation gate:
npm run _check:markdown-style
npm run _check:translations
npm run _check:rendered-markdown
npm run _check:rendered-links
make build validates the declared published pin. make check selects the
sibling theme for the complete non-browser regression suite. Studio uses its own actual browser and
accessibility checks.
Delivery state and remaining limits
State
Current completion evidence. History retained above
Local implementation
Finite R1–R8 supported implementation completed locally, including Studio/read-only and opt-in reviewed editing. Current A18 runtime/archive scope passed. Canonical lifecycle rendering is bound separately to these exact bytes
Local validation
Historical R1–R8 owning/browser/corpus/render records retained. Current 2026-10-04 backend correction and eight current owning gates, actual three-target runtime/archive checks and unchanged-runtime carry-forward of the preceding four-consumer preservation/parity passed in #a18. Required repository findings/partial preview remain visible. Rendered navigation/URL checks have a separate exact-byte receipt boundary
Commits
Baseline CLI commit identified
Archive and runtime qualification
Current corrected source: Darwin arm64, native Linux arm64 and QEMU-TCG-emulated Linux amd64 passed installed archive/offline/signal/filesystem flows. Two fresh builds reproduce all five archives. Darwin amd64 remains experimental/unverified after actual failed execution
Public distribution and consumer adoption
Not performed in this local validation run
Deployment and public-content verification
Verified against local HTTP fixtures
The finite R1–R8 implementation and required current A01–A18 runtime/archive
scope have local acceptance evidence. Known repository findings and required preview incompletion
remain visible diagnostic outputs.
7.8.11 - CLI maintenance acceptance on 2026-10-03: R1–R5
R1–R5 local validation and acceptance evidence from the dated CLI maintenance record.
These R1–R5 sections of the dated record were moved here unchanged on
2026-11-06 so each page stays small enough to read whole. The scope, evidence
rules, case ledger and delivery state remain on the main page.
R1 local validation
R1 now provides shared Hugo page/translation/source facts, rendered reference
and anchor evidence, strict oink.policy/v1 input, check links,
--format json, visible reviewed exclusions/external scopes and required-work
precedence. Translation and style selections explicitly return required
unsupported coverage while those engines remain unimplemented. Default build/dev
remain direct Hugo operations.
Requirement
Executed evidence
Current outcome
Public result/policy and incomplete precedence
make test: all packages and vet; public severity/exclusion/unimplemented-group/JSON-alias tests; TestEveryRequiredUncompletedCoverageFails
Passed R1 scope; any required uncompleted status, including not_checked, remains 2
One build and shared facts
TestPublicCheckSharesOneBuildAndRenderedFacts
Passed; one strict Hugo build supplies page and observed target/anchor facts
Hugo authority and source mapping
Actual TestPageFacts* fixtures: translationKey, actual routes/aliases, unknown generated nodes, custom mounts, excluded-page analysis and failure preservation
Passed; separate analysis preserves production facts/artifact bytes and source bytes/modes
Repeatable real Hugo gate
Corrected make test-hugo includes TestPageFacts* and TestHugoRendered*, alongside Starter and manifest fixtures
Passed; scoped route/reference, reviewed external-scope and original-output preservation cases
Fresh Starter
Bilingual init, check links, ordinary strict Hugo using isolated provisioned v1.1.0 module archives
Markdown style under content/docs; bilingual source checker; JSON parse and equality of CLI/docs result schemas; scoped diff whitespace check
Passed: 88 Chinese docs, 137/137 source pairs and 1,085 headings; schemas remain additive oink.result/v1 with exits 0/1/2
Final candidate reports and rendered EN/ZH
Refreshed current-binary consumer reports; actual rendered source/Markdown/link owning checks below
R1 scoped gate passed; existing draft-release omission in production is recorded separately
Earlier offline R1 trials returned 0 without diagnostics on three consumers:
Earlier trial
Source files
Built files
HTML files
References
Page facts
Bytes/modes/Git inventory
OINK documentation
421
1,139
512
74,689
341
Exact before/after equality
PIG project site
858
1,392
424
64,440
248
Exact before/after equality
Repository catalog
2,294
3,287
1,635
851,535
1,572
Exact before/after equality
These earlier reports spell optional unselected coverage not_selected,
outside the existing result-schema enum. The final code corrects it to
not_checked and includes project.pages coverage. Their measured counts and
exact inventories remain valid observations of the earlier binary. The final
reports below establish final JSON conformance. Raw evidence stays in task-named local
acceptance directories outside consumer sources.
The final R1 binary was rebuilt from the dirty CLI working tree based on
e623d93d589c49e5c58b8fae1bd5db720fc904cb. The recorded input inventory includes
file hashes, modes and Git-status identity. Its SHA-256, computed over sorted
JSON serialization, is
518260f07f3c916468ee3d56c4eeca03c131514155aa82539564ccd2f3c1f664.
The exercised binary SHA-256 is
3deb7e357fc86f6907df60da0769d93f2d41ba5e01949b641548a67d7f459d12.
Each final result has required check.links: complete and project.pages: complete
coverage. Unselected translation/style coverage is optional and reports not_checked.
The final offline make test and vet passed; the corrected actual-Hugo owning
target also passed. The recorded tools remain Go 1.27.1, Hugo Extended 0.166.0,
Git 2.54.0 on macOS arm64. The three exact before/after inventories were
independently compared while preparing this record.
Production output passed rendered Markdown and link checks. Its global
translation checker returned 1 solely because the pre-existing draft
content/blog/release/1.2.0.md / .zh.md pair is absent from
production. The changed R1 pages rendered in both languages. A separate explicit
analysis build set HUGO_BUILDDRAFTS, HUGO_BUILDFUTURE and
HUGO_BUILDEXPIRED to true. All three owning checks passed: 137/137 paired
sources, 1,085 headings, rendered Markdown and rendered links. That view checks excluded sources in isolation while keeping production output unchanged.
R2 local validation
The local candidate now implements translation policy/status/diff/hash review,
syntax-bounded native content rules, visible reviewed baselines and shared
oink.plan/v1 preview/validate/apply. Default check requires links,
translations and style. Production output and the explicit draft/future/expired
analysis are separate. Stable behavior and
examples are in the contract. The R2 local gate passed owning checks,
final frozen-input consumer reports and rendered bilingual documentation.
The exact exercised binary and the subsequent narrow equality fix are recorded
below.
Requirement
Executed owning evidence
Outcome and limit
A04 translation relationships/policy
Actual TestHugoFilenameDirectoryAndTranslationKeyLayouts; scope, duplicate/missing/disabled-language, draft, strict/localized and selected-constraint tests
Passed owning tests; no universal heading/code/localization parity
A05 explicit review and diff
Full byte hash/current/source/translation/both-changed, mtime-independent, unknown/unreadable/ambiguous and malformed-record tests; public status/diff/review preview/apply fixtures
Passed owning tests; review state is change evidence, not semantic judgment
A06 source boundary and provenance
Actual Hugo enabled/disabled canonical title/block attributes and configured passthrough fixtures; front matter/CRLF/BOM/shortcode/code/HTML tests; every public v1.1.0 source/license SHA verified
Stale bytes/modes/existence/guards; edits during validation; exclusive commit collision; partial restore; later editor bytes/modes/deletion; old open inode write; new-directory children; confinement/identity/diff tests
Passed owning tests and vet; candidate/source overlap refused; later move/reference ambiguity remains R5 scope
Frozen runtime gates
macOS arm64 make test/vet, owning actual Hugo and focused race runs
Passed; logs /tmp/oink-r2-frozen-go-gate.log, /tmp/oink-r2-frozen-hugo-gate.log, /tmp/oink-r2-frozen-race-gate.log; final all-owning-package Hugo gate /tmp/oink-r2-owning-hugo-final.log explicitly includes configured passthrough
Bilingual documentation
Narrow source style/pairing/IDs, equal result schemas, scoped whitespace and actual production/analysis node checks
Passed scoped gate: 88 Chinese docs, 137/137 source pairs and 1,092 headings; production draft omission separately recorded below
The frozen parser corpus at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r2-source-corpus-lqx25kwr/summary.json
records parser input SHA-256
a601200ec4fe275d2bd4baf11d4db7d46a2cc6f1674900c1fd801769e55d12de.
Each scope parsed completely with zero findings. The core uses actual Hugo
site-source identities from the recorded configuration. Supplemental Markdown
includes disabled/unpublished files. It does not invent routes or relationships.
These captures precede the authorized R2 documentation edits.
Corpus
Unique actual Hugo source files
Supplemental local Markdown
Source inventory files
Bytes/modes/Git
Starter
52
78
97
Exact before/after equality
OINK documentation
272
274
421
Exact before/after equality
PIG
212
212
858
Exact before/after equality
Repository catalog
1,568
1,572
2,294
Exact before/after equality
Preliminary public-command reports at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r2-final-qu_zprps/summary.json
used binary c8d87e6d73d3101fefcb62c5d6845518573c02c400f474dc9f4603afafc774d5
and CLI input inventory d8a75be0e074365a4164b7aaaa27d82a1e844e04406a36c3dd6d39ff2b6e873f.
They precede the final parser/doc freeze and are not final acceptance evidence.
The initial Starter invocation selected the enclosing evidence folder and
returned 2. This was a validation setup error. Selecting its actual site child
returned 0, with evidence in
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r2-starter-27vmi0w5.
Preliminary check
Exit
Page facts
Built files
References
Translation statuses
Outcome
Correct Starter child
0
66
223
4,461
28
Complete; 97 source files/inventory unchanged
Documentation
0
341
1,139
74,755
144
Complete; 421 source files/inventory unchanged
PIG
0
248
1,392
64,440
120
Complete; 858 source files/inventory unchanged
Repository catalog
1
1,572
3,287
851,535
788
Completed policy check: 10,462 actual HTML_ID_DUPLICATE findings in existing merged-print output; 2,294 source files/inventory unchanged
The repository catalog run completed with policy findings from existing duplicate HTML IDs in merged-print output; informational review states remain visible.
The final frozen-input reports at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r2-candidate-6xzcs7fk/summary.json
exercise binary SHA-256
ff88b407a6cddb9007f94275c65a80ed4c9c4fd13f5e821f9b7a4a8973abaa56
from CLI input inventory
bd8c71b55250a89dc15c7534924bb82a5447d6f2628eba23c8cb3d864309ee9f.
All four exact source byte/mode/Git inventories were independently compared
equal before/after. These reports supersede preliminary public-command trials:
Final check
Exit
Source files
Page facts
Built files
References
Translation statuses
Starter
0
97
66
223
4,461
28
Documentation
0
421
341
1,139
74,825
144
PIG
0
858
248
1,392
64,440
120
Repository catalog
1
2,294
1,572
3,287
851,535
788
No final report has incomplete diagnostics. The repository catalog retains
10,462 actual merged-print HTML_ID_DUPLICATE findings and 788 informational
review states; the other sites retain informational unknown review states.
Kept production docs at
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-site-2201601475/public
passed rendered Markdown and links. Global translation checking returned 1
only for the existing draft release 1.2.0 pair absent from production. The
separate draft/future/expired analysis at
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-site-3698773232/public
passed all three node checks: 137 pairs/1,092 headings, 216 content pages/41,586
text nodes, and 347 pages/48,682 internal links/4,171 fragments. Evidence logs
are /tmp/oink-r2-docs-production-{translations,markdown,links}.log and
/tmp/oink-r2-docs-analysis-{translations,markdown,links}.log.
A final review identified optional equal_fields comparing JSON 7.0 with
YAML/TOML numeric 7 by representation. The narrow supplement now normalizes
decoded numeric values recursively to an exact rational number tag, preserving
strings versus numbers, map keys and array order. Tests cover decimals/exponents,
negative zero, integers beyond float64 precision, and nested differences. They
also cover source byte preservation and required incompletion for unrepresentable values.
Actual-Hugo translation tests passed in /tmp/oink-r2-numeric-translations-gate.log;
all public maintenance actual-Hugo cases passed in
/tmp/oink-r2-numeric-public-gate.log; owning vet and whitespace checks passed.
Supplemental source SHA-256 values are:
The frozen real-site reports and Linux qualification predate this
supplement; because those sites configured no numeric equality constraint, the fix does not
affect their recorded outputs.
At this stage, macOS arm64 was exercised; an attempted Darwin amd64 runtime
on this host failed with arch -x86_64 / posix_spawn: Bad CPU type in executable
(/tmp/oink-r2-darwin-amd64-gate.log) because Rosetta was not installed.
Both native Linux arm64 and Docker Desktop Rosetta-emulated Linux amd64
executed the same runtime/schema/license inputs. Their SHA-256 is
0f786df68ef3c4844c983a51595f79242d1cb1d2bf6c5b5eb7f2c6415fb8d861.
Evidence is retained at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-a18-linux-ajbbnvki
in arm64-results, amd64-results, commands.json, candidate-inputs.json,
preparation.json and qualify.sh. Each target passed 270 test/subtest cases with zero failures and two
optional external corpus/provenance skips. Checks included full actual-Hugo
go test ./..., vet, and built CLI version/bilingual init/doctor/full
check/translation status, plus missing-Hugo exit 2 smoke. JSON stdout and source
byte/mode inventories were verified. Go 1.27.1 ran on Linux arm64; Hugo Extended
0.166.0 architecture assets were SHA-verified.
R3 local validation
R3 adds managed build --check, oink.artifact/v1 sealing/export/local
verification, explicit-network HTTP verification, release diagnosis and
guarded local CI generation. The default build/dev path remains ordinary Hugo.
The executed runtime and paired contract/guide gates passed.
Requirement
Executed owning evidence
Outcome and limit
A08 one checked artifact
Public fake/actual Hugo one-renderer tests; exact export, manifest/marker, post-check byte/mode/missing/extra/symlink tampering, failure/concurrency and source-preservation tests
Passed local scope; a failed/incomplete check cannot seal/export; local artifact verification does not rebuild
A09 both CI providers
Offline deterministic generation, pinned source/Hugo archives and action revisions; safe bootstrap archives; guarded public preview/apply/stale-input cases; actual-Hugo original-input binding
Passed local configuration scope; every existing generated target is refused and custom workflows remain unchanged
A09 upload identity
Both local provider rehearsals and TestProviderUploadRehearsalPreservesActualSealedManifestIdentity
Passed: one managed build, separate verification, then the same tree; GitHub tar includes the hidden marker, Cloudflare rehearsal receives that verified directory; no provider upload executed
A09 custom workflow diagnosis
Generated-plus-other-custom and standalone-custom/no-metadata public tests, actual-Hugo preview and owning vet
Passed supplement in /tmp/oink-r3-ci-custom-owning-gate.log and /tmp/oink-r3-ci-custom-vet-gate.log; each unrepresented workflow stays unknown, informational and optional release.ci: not_checked, including beside valid generated metadata
A10 deployed identity
Local HTTP fixtures for all recorded files/routes/languages, marker, canonical/base/inert-template behavior, HTTP 200 fallback, wrong bytes/language/build, missing resources/Markdown/search JSON
Passed local fixture scope; definite mismatches return 1; browser JavaScript is explicitly unchecked
A10 unknown network state
Explicit network/credential refusal, timeout before headers/during body, authentication/rate-limit/server errors, required marker absence, bounded body/gzip and redirect/no-cookie fixtures
Passed local fixture scope; incomplete states return 2 with remaining requests unknown; no public deployment was contacted
Frozen runtime gates
Full tests/vet, owning actual Hugo and focused race checks
Passed on macOS arm64 in /tmp/oink-r3-frozen-go-gate.log, /tmp/oink-r3-frozen-hugo-gate.log, /tmp/oink-r3-frozen-race-gate.log; the subsequent custom-CI change has the focused supplement above
The latest single-binary corpus is retained at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r3-ci-final-ahc4csjk/summary.json.
It compiled an exact captured CLI input copy, with binary SHA-256
425845c1d2db7b1cd3c3cdb5f28475cb06ba6f656054909759e2359a39925dd2,
67 runtime/schema/license inputs SHA-256
6789a3a0235ff8d81453b9bfde37824979eac7d56af3710da390e4d2ef8479dc,
and 108 broader CLI inputs SHA-256
4ca473a4cb586d232baeb4cee029b281469c5bb03c831cc199b95451e6832c60.
Runtime inputs remained exactly equal after all runs. Live tools were Go
1.27.1 and Hugo Extended 0.166.0 on Darwin arm64. The manifest’s normalized
Hugo version excludes vendor build text and private paths.
Each run used offline build --check. It used fresh external
destination/manifest paths, the optional marker, and retained isolated work. These existing local
consumer inputs were checked without --release. Their configured workspaces
were preserved. Every raw report records exactly one strict Hugo renderer,
zero incomplete diagnostics and zero required unfinished coverage.
Final managed build
Exit
Source files
Copied source inputs
Page facts
Built files
References
Exported files
Local artifact verify
Starter
0
97
94
66
223
4,461
224
0
Documentation
0
421
427
341
1,139
74,825
1,140
0
PIG
0
858
861
248
1,392
64,440
1,393
0
Repository catalog
1
2,294
2,299
1,572
3,287
851,535
None
Not exported
Both inventories compare exact bytes, modes and file types before/after; the
primary inventory also compares logical Git state. Git sites include tracked
and non-ignored untracked sources; the non-Git Starter includes its existing
generated files and lock. The supplemental copied-source inventory also
includes ignored workspace/editor metadata read by snapshots, excluding
existing generated output/cache trees.
All four comparisons were exactly equal.
The repository catalog retains 10,462 existing merged-print
HTML_ID_DUPLICATE findings, so neither destination nor manifest was created.
Production review states number 28/143/120/786. Analysis includes
unpublished pages, which explains the earlier R2 144/788 counts. Existing custom
workflow information remains visible, and Starter’s example address is a
warning in this non-release run.
The three fresh exports match the retained independent ordinary-Hugo trees
in every original file’s SHA-256, size and mode. The sole extra file is
.well-known/oink-build.json. Their original source inventories and complete
manifest input hashes match the earlier capture, so reusing those ordinary
trees does not substitute different inputs. The helper source SHA-256 is
13e4957a3d7847eb28c8b1eeba3588a4f4a9982c2bfca2ebc729ab2827159607;
its binary SHA-256 is
b2699fe7a7aa3a34c41f9e4aba4b22d39cf8d0c156a369f3dfc4ca8c8c0fbce5.
Raw helper and ordinary evidence are in
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r3-candidate-wb643dhh;
the temporary compilation source was removed after building the helper.
Earlier R3 captures preceded the runtime freeze (oink-r3-final-pisrr21h preceded custom-CI
diagnosis), and an initial /Users/vonng/pgsty/PIG target selection returned 2 before switching to pig.pgsty.com.
The scoped R3 documentation gate passed at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r3-docs-render-pljj5aqd/summary.json.
Ten paired contract/guide/roadmap/index/overview edits were installed only after
the original bytes/modes matched. Their recorded hashes are at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r3-doc-drafts-s0b3g48l/applied-files.json.
Source style passed 88 Chinese docs; translation coverage passed 137 pairs and
1,099 headings; schemas remained equal and scoped whitespace passed. Actual
production Markdown passed 214 pages/41,871 text nodes; links passed 345
pages/48,344 internal links/4,171 fragments. Production translations returned
1 only for the unchanged draft release 1.2.0 absent from production. A
separate draft/future/expired analysis passed Hugo
and all three owning checks: 137 pairs/1,099 headings, 216 pages/42,177 text
nodes and 347 pages/48,720 links/4,199 fragments. All 421 canonical and 488
copied source files retained exact bytes/modes throughout these rendered
checks.
R4 authoring and upgrade acceptance
The supported R4 implementation and read-only corpus scope are locally
accepted after frozen owning/full gates. This record covers profiles, ordinary
authoring/editor/snippets and bounded upgrade views, along with guarded canonical
documentation promotion and fresh scoped rendered validation.
Executed profile evidence
Outcome and limit
One fixed licensed archive
Snapshot verification against commit 137843b25bacd76ddd1f7ce71330bf2e3155b954 passed without --write; archive SHA e55bde279715f6d8d19d3d88671a2cf7561b515be46915b0f12c640d0ce1d958 and MIT license unchanged; projection metadata/script match
All four profiles × three language choices × root/subpath passed 24 actual warning-strict offline builds using provisioned public OINK v1.1.0; complete source byte/mode/no-extra-file and rendered-reference checks passed
Public init workflow
Four profiles with en/en,zh, actual subsequent root/subpath Hugo URL facts/checks, workflow/license preservation and default parity passed; unknown/nonempty refusals 1, missing/failed Hugo 2, empty/absent targets and pure JSON/separate logs verified
Public authoring and source identity
Actual candidate/apply/ordinary Hugo, review-unknown and source preservation passed in /tmp/oink-r4-authoring-public-gate.log; fresh-directory/site guards and vet passed in /tmp/oink-r4-new-input-race.log and /tmp/oink-r4-public-core-vet.log. Actual ignored input refuses 2 without a saved plan or source writes even when source groups are disabled; selected draft peers still force analysis identity in /tmp/oink-r4-authoring-sourceproof-gate.log. Supported owning scope passed
Bounded upgrade owning gate
Seven actual-Hugo synthetic pinned module-fixture cases, observed-stream digest/inventory fidelity, independent cross-page alias-retarget blocking, source/concurrency/exclusive installation and later-edit rollback protection passed under race; vet passed. Final hardening logs /tmp/oink-r4-hardening-owning-gate.log, /tmp/oink-r4-hardening-final-focused.log, /tmp/oink-r4-hardening-vet.log; final public/full frozen gates passed
Integrated authoring/editor hardening
Actual-Hugo language-directory plan/apply/ordinary builds, link/never new-source refusal, external schema/license/full-mode/module identity and legacy schema reproof, shared translation/baseline/CI regression and full Starter docs→new draft peer→editor→check→ordinary Hugo flow passed. /tmp/oink-r4-app-authoring-hardening-gate.log (58.241s), focused race and vet passed; post-candidate external mutation proof /tmp/oink-r4-app-external-during-validation.log passed. Opaque saved external-input hashes and canonical workspace-origin guards passed /tmp/oink-r4-external-plan-binding-final.log, /tmp/oink-r4-workspace-origin-gate.log and their vet logs. Frozen full-stage, corpus and scoped canonical rendered documentation gates passed
Actual language mounts
Standalone ordinary per-language contentDir and explicit site-matrix fixtures each passed config/mounts/strict-render with source bytes/modes unchanged; Hugo0.166 emits sites.matrix.languages and distinct physical files with reciprocal public translations. /var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r4-language-mounts-lgmve1sk/summary.json; public actual language-directory plan/apply/ordinary-Hugo integration passed
Owning evidence is retained at
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r4-starter-owning-0pv41lw5/summary.json.
Logs are /tmp/oink-r4-starter-{unit,hugo,vet,snapshot,race}-gate.log and
/tmp/oink-r4-public-init-gate.log, /tmp/oink-r4-public-init-vet-gate.log.
Generated source counts are project 94, docs 58, blog 40 and book 34.
Final frozen gates all returned 0: make test/vet
/tmp/oink-r4-frozen-go-gate.log, make test-hugo/tmp/oink-r4-frozen-hugo-gate.log and actual-Hugo core race
/tmp/oink-r4-frozen-core-race-gate.log. The final public flow includes
Starter docs → primary/translation draft → editor → check → ordinary Hugo;
post-candidate external schema mutation still refuses before source writes.
Seventeen owning and three final gate logs are retained verbatim with hashes
in the final corpus’s owning-gates.json.
The exact four-site evidence is
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r4-corpus-lw2cjyq6/summary.json
with bounded summary.compact.json, raw JSON/logs and per-command inventories.
Binary SHA is c169b3d4d046c811dca80867068b86fb66ada5c8ce6910dd5cda7353c406f377;
82 runtime-input files bind SHA
fdff7f50d49b44f03fa1db79eec6b6c9b9bd5e52f8967a88aed84b3207a7b3c6,
which equals the final root inventory with no runtime changes. The broader
139 CLI inputs bind SHA
562e838d9eccb628eac86ae59b9b9587c1e23ad52991ec50eafb1e604e3924da.
Driver SHA is d3ac41dc2e18295bfb26134d1a696935c8174913e2801a5766dbf7a1139d89f8.
Actual tools were Go 1.27.1 and Hugo 0.166.0 Extended on macOS arm64.
Frozen consumer
Primary/copied source files
Pages; output files; references
Managed build / artifact verify
Read-only upgrade / new / editor
Starter
97 / 94
66; 223; 4,461
0 / 0; 224 exported files including marker
0 / 0 / 0
Documentation
421 / 427
341; 1,139; 74,937
0 / 0; 1,140 exported files including marker
0 / 0 / 0
PIG
858 / 861
248; 1,392; 64,440
0 / 0; 1,393 exported files including marker
0 / 0 / 0
Repository
2,294 / 2,299
1,572; 3,287; 851,535
Completed finding 1; no export/manifest
Completed finding 1; new/editor not attempted after blockers
Each managed build used exactly one strict production Hugo render and had no
required incompletion or uncompleted required coverage. Primary Git-visible
source bytes/full modes/logical Git state, supplemental copied inputs and
source directory modes matched exactly before/after every command and each
complete site flow. Repo’s 10,462 existing merged_print duplicate HTML IDs
remain visible.
Consumer upgrade previews selected the available public v1.1.0 pin and did
not apply writes. Cross-version route/alias/output regressions use explicit
synthetic fixture pins. New/editor
plans were validated previews without saving or applying consumer plans.
Multi-host and unknown relative-alias identities stay incomplete, and nondeterministic
output requires a fresh v2 plan preview.
Fresh canonical documentation acceptance passed after applying the
ten guarded files. Evidence is
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r4-docs-render-v01eima0/summary.json;
the promotion manifest is
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r4-doc-drafts-3i8bw994/applied-files.json.
The frozen c169b3… CLI performed one strict production render and its focused
link check returned 0.
Fresh canonical documentation gate
Executed result
Source owners
Translations 0: 137/137 pairs and 1,104 headings; complete canonical style 0: 137 Chinese files, 181 strong spans, no emphasis; ten-file whitespace check and public JSON schema equality passed
Production rendered Markdown/links
Both 0: 214 content pages / 42,214 text nodes; 345 pages / 48,360 internal links / 4,187 fragments
Production translations
1 solely for the pre-existing draft content/blog/release/1.2.0.md absent from production; no new pairing/heading finding
Separate nonpublishable analysis
Fresh ordinary Hugo with the actual original snapshot environment/rebased paths and explicit draft/future/expired flags returned 0; all three owners 0: Markdown 216 pages / 42,520 nodes, links 347 pages / 48,736 links / 4,215 fragments, translations 137/137 pairs / 1,104 headings
Source preservation
Canonical 421 Git-inventoried files and 427 copied inputs retained exact bytes, modes, Git state and directory modes; production copied 428 and analysis copied 427 files remained unchanged through their checks; analysis build also retained copied full modes
The temporary helper copied the frozen
core without modifying it: helper source SHA
7faea7e726a6c6fb2e0747be1a4428f4c5fb5734fa52b6f981157a5fe37d9989
and helper binary SHA
532638e76f96f8b173c122e512b3bf5fc2c4d4a7130f59c99c2c69e135e87073
are retained with raw logs.
R5 implementation and documentation acceptance
R5’s supported local scope is accepted after focused public/core, corrected
frozen full-stage, exact-binary read-only consumer and guarded canonical
source/rendered documentation gates.
The actual public Git/Hugo flow at /tmp/oink-r5-public-final-flow.log passed
in 53.963 seconds. Its committed synthetic site owns its local theme, bilingual
pages and binary attachment. Ordinary modes 0640 and 0600 remain full
current facts. Historic Git comparison uses only executable bits.
Deleting B selects unchanged inbound A, the remaining translation, removed
attachment and actual RSS output. Actual alias-inbound uncertainty, global
configuration/template/data and unknown-input changes expand full scope.
Completed inspect/impact/context returns 0 with separate current-check
findings 1. Check-since retains current quality 1 and full validation scope.
Missing/unborn/foreign history returns 2. It retains every known current
page/attachment/reference/output. It does not invent a prior identity or change.
Malformed selectors/limits, missing tools and failed renderer logs are tested.
Bounded context gives reasons/versions/source and excerpt hashes, visible
omission/truncation and no execution of literal document instructions.
Saved move preview/apply and subsequent ordinary Hugo passed, retaining
binary bytes, raw full modes, unrelated files and Git index/revision. Actual
opaque HTML/shortcode references remain manual. Inline/fenced/opaque spans
stay unchanged. Their broken final candidate returns 1, with no saved plan
or source writes. Source/config/attachment/mode/fresh-target drift returns 2
and preserves the later edit. A deterministic mutation after the actual
candidate renderer also refuses before writes and preserves editor bytes/mode.
Focused actual move race passed in 8.286 seconds at
/tmp/oink-r5-public-move-race.log; app vet passed at
/tmp/oink-r5-public-vet.log.
Before the cached-module supplement, frozen parent make test/vet and
make test-hugo both passed at
/tmp/oink-r5-frozen-go-gate.log and /tmp/oink-r5-frozen-hugo-gate.log
(actual app fixtures 185.709 seconds). Actual move/source race and vet passed
/tmp/oink-r5-move-hugo-gate.log, /tmp/oink-r5-source-move-race-gate.log
and its vet counterpart; full inventory/mode/selector plan safety passed
/tmp/oink-r5-plan-owning-final.log.
The first frozen consumer trial exposed a cached-public-module guard
gap. The original graph contained resolved module inputs that were absent from
a fresh outer candidate hash. It returned false incomplete 2, without source
writes. Content plans now resolve/capture the same module inputs before
comparison. Legacy metadata/authoring plan scopes remain unchanged. The separate
checksum-verified public OINK v1.1.0 regression passed preview, fresh saved
apply and ordinary bilingual Hugo in 27.42 seconds (package 28.220) at
/tmp/oink-r5-public-cached-module-move.log, including raw modes, binary bytes,
unrelated inputs and Git preservation. Corrected current-binary corpus and
supplemental race evidence remain separate from the earlier unaccepted trial.
The corrected current candidate passed full make test/vet at
/tmp/oink-r5-corrected-frozen-go-gate.log and actual make test-hugo at
/tmp/oink-r5-corrected-frozen-hugo-gate.log (app 278.787 seconds). The
cached/public and committed/in-site move safety race passed in 38.578 seconds
at /tmp/oink-r5-public-cached-seam-race.log; its app vet also passed.
/tmp/oink-r5-corrected-runtime-freeze.json records 96 runtime inputs with
SHA-256 e5b6e0eda972116dbb94a8086668e6ef34bfaa56138cf31f1f71f4832c477842
and 165 broader CLI inputs with SHA-256
4965a0c92cb6126f67a6dabd548c7c25ee5d7c9c57e14cce5e55ebb7a22fca2d.
The corrected binary SHA-256 is
d7675aecca2f77b1eb37bb4f664c3314cf5207149e6abbb86523686c5c50bff0.
The corrected four-consumer capture completed 16 commands
in 831.825 seconds at
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r5-corpus-corrected-y2eue81h.
Its bounded final-receipt.json has SHA-256
b86e0e6c7dbfbaed62c845c03a55d963068f7d9a16771de5ff3b0974e76fce3b;
the receipt retains 12 copied owning gate logs and all 20 observed move routes.
It links to the complete raw JSON/logs and per-move classifications.
Site
Primary/copied inputs/directories
Inspect/context
Current check
Impact
Move preview
Starter
97/94/21
0/0
0
2: no Git baseline
0: validated, unapplied
Documentation
421/427/109
0/0
0
0: complete historical comparison
1: six candidate missing references
PIG
858/861/52
0/0
0
2: historical foreign-input provenance incomplete
1: 32 candidate missing references
Repository
2294/2299/48
0/0
1: 10,462 existing duplicate HTML IDs
2: unborn HEAD baseline unavailable
1: the same existing duplicate IDs
Starter and Repository impact retain known current facts without inventing
prior pages or changes. PIG’s actual baseline is complete (theme v1.0.0 versus
current v1.1.0). Required foreign-input provenance is incomplete. The comparison
therefore expands full scope and returns 2. These are distinct outcomes.
Documentation impact completes with 192 captured input changes, 343 affected
prior/current pages and full scope. All completed fact queries expose current
quality findings separately. Repository inspect/context remain 0.
Documentation move proves 18 rewrites and four routes. Two ordinary literal
/docs/admin/comments/ occurrences in content/docs/customize/repository.md
at lines 216 and 313 remain manual because repeated source/output occurrences
cannot be attributed precisely across ordinary and print outputs. Their six
missing candidate references block validation. PIG moves two Markdown files
and four binary attachments, with eight proven page/processed-resource routes.
Equal-byte paired outputs prove processed featured_hu_* resources, but not
new URLs for the four original absolute image references
/article/pgext-day/{featured,topic,venue,schedule}.webp. Their 32 candidate
missing references block validation. Original-asset rewrites are not guessed.
These ordinary Markdown limits are separate from opaque HTML/shortcode limits.
Repository move proves ten rewrites and four routes. Its candidate retains
only the same 10,462 existing duplicate-ID findings. It has no new missing
reference or required incomplete finding. Starter’s zero-link bilingual move is
validated. All four moves remain unapplied. No consumer plans were saved.
No consumer source writes occurred. Failed candidates have validated: false.
All JSON stdout is pure. Primary/copied inputs, full modes, directory
inventories and logical Git/index state are unchanged. These comparisons include
ignored copied inputs. The Git metadata inventory excludes immutable object storage.
The runtime and broader CLI inventories still match the captured identities.
The first ten-file guarded canonical promotion was qualified in 62.37
seconds with the corrected frozen binary and runtime hashes above. The
separate rendered receipt is
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r5-docs-render-ks2tw82c/summary.json,
SHA-256 06ae844a4b3f1c01bb5faa8a21091d5461c28aab592d12c4310fb34bc176c5d4.
Canonical documentation gate
Executed result
Source owners
Translation 0: 137/137 pairs, 1,109 headings; style 0: 137 Chinese files, 181 strong spans, no emphasis; scoped whitespace and public JSON schema equality passed
Frozen CLI
Production check links returned 0 using the exact corrected binary
All per-command and overall guards passed: 421 primary files, 427 copied inputs, 109 directories and 36 mutable Git files retained bytes/full modes/logical Git state; both isolated source copies remained unchanged
The permanent first-promotion applied-files.json in
/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r5-doc-drafts-t3_klnck
retains the ten authorized files and their original modes. Core owning logs /tmp/oink-r5-frozen-core-hugo.log,
/tmp/oink-r5-owning-race.log and /tmp/oink-r5-owning-vet.log passed.
A13 impact, A14 move safety, and A15 bounded context passed their required supported CLI scope.
7.8.12 - CLI maintenance acceptance on 2026-10-03: R6–R8 and A18
R6–R8 and A18 workspace, Studio, editing and runtime evidence from the dated CLI maintenance record.
These R6–R8 and A18 sections of the dated record were moved here unchanged on
2026-11-06 so each page stays small enough to read whole. The scope, evidence
rules, case ledger and delivery state remain on the main page.
R6 workspace and adapter acceptance evidence
R6 supported scope is accepted locally after frozen owning/runtime, exact-binary
consumer parity/preservation and guarded canonical source/render gates.
The supported registry/tool fields are documented in the
contract and
command reference.
The registry has an independent version, oink.workspace/v1. It requires
strict one-document regular YAML, 1–64 entries, and at most 256 KiB. It requires
exact ASCII names, literal relative/absolute directories, and proven canonical
identities. It refuses overlap. Missing-site results stay per-site incomplete while later selected
sites run. Selection preserves registry order. There is no default named site,
sibling discovery, Hugo settings duplication or automatic multi-site apply. Optional tools extend oink.policy/v1, with pinned protocol versions,
configuration/full-mode provenance and typed omissions/coverage.
Workspace owning receipts
Focused gate
Executed local evidence
Registry core
Strict fields/document/bounds/names/literal paths, existing aliases/case-inode ancestry, duplicate/overlap refusal, missing-directory listing and exact subset order; go test -race ./internal/workspace -count=1 passed in 1.414 seconds, /tmp/oink-r6-workspace-core-race.log
Public actual Hugo
OINK_TEST_HUGO=1 go test ./internal/app -run '^TestPublicR6Workspace' -count=1 -v passed in 10.498 seconds, /tmp/oink-r6-workspace-public-hugo.log
Public race
The same workspace public suite with -race passed in 12.426 seconds, /tmp/oink-r6-workspace-public-race.log; excluded commands specifically reject registry selection
Vet
go vet ./internal/workspace ./internal/app completed with exit 0, /tmp/oink-r6-workspace-vet.log
Public outcomes
Actual bilingual committed fixture sites retain direct diagnostics/coverage/exit parity for links and full checks. A missing first site yields 2 while later clean/finding sites yield 0/1; explicit subsets preserve registry order, invalid unregistered siblings remain untouched and human output retains findings
Selected application
Saved translation-review preview is validated but unapplied; a different registered name is refused before writes and preserves plan/source bytes/full modes/Git. Explicit matching-name apply writes only its planned review file; other registered and unregistered sites remain unchanged
The inspected core workspace.go SHA-256 is
cf2cbc9509e8c83eedf6d8833c9eb0ea6492de9a85c959798112fa3f105213f4;
its owning test is
9070a8e2c3e58680f6567f2394160ec682bf0457c068c2addf354921e7612d6b;
the public test is
3e57a6417ae2e7604f7cb06933759bb06a2f40758ff7059848593cedbaa6570a.
All three inspected files retain mode 0600.
Corrected protocols and stage gates
Protocol or gate
Recorded status
Actual markdownlint-cli 0.49.1 and Vale 3.24.0
Corrected public trial passed: exactly one finding mapped to the original UTF-8/BOM/CRLF line; excluded front matter/shortcode/math/raw HTML/enabled attributes/code produced no false original attribution
Actual lychee 0.24.2
Corrected trial actually reached the local HTTP fixture: 200 → 0, 404 → 1, 401/403/429/503/timeout → required 2. Optional offline → 0, required offline → 2, both with zero HTTP requests
Final focused actual-tool receipt
/tmp/oink-r6-public-actual-tools-final.log passed in 15.192 seconds; the earlier corrected 14.686-second run is retained as prior evidence. Node preload and discovered JS configuration did not execute; source full modes/Git were preserved
Fake/protocol failure receipt
/tmp/oink-r6-public-fake-tools-final.log passed in 13.089 seconds: malformed output, version mismatch, timeout, unsafe configs, required missing/optional/group omissions and raw stderr normalization
Focused public race/vet
/tmp/oink-r6-public-tools-race.log passed in 30.273 seconds across fake and actual cases; /tmp/oink-r6-public-tools-vet.log completed with exit 0
Frozen runtime inputs
Parent freeze at 2026-10-03T10:58:01.807947Z, /tmp/oink-r6-runtime-freeze.json: 103 runtime inputs bind b85affd96378b45bfc56a996b0c5672d02ee4c6cc9bc95335fa5072f6c42a03b; 179 broader CLI inputs bind fbb8176ebc58f1aa26336f4e6036cf9bd5f7a0d62b142f16532b50a8071e9fbe. The exercised 0.3.0-r6-local binary SHA-256 is aa8b347fbe01071f9da729f4d98aa2f50d7264456be6c5f05771bcfadadc371f
Frozen owning suites
Full Go/vet completed with exit 0, /tmp/oink-r6-frozen-go-gate.log; full actual Hugo plus pinned tools completed with exit 0, /tmp/oink-r6-frozen-hugo-gate.log (app 382.832 seconds). Workspace/core/protocol/source-mask/policy/report race and vet receipts passed and are copied into the final receipt
Four consumer sites
Qualified: exact-binary direct/aggregate diagnostics, coverage, exit, identity and registry-order parity for all four sites; per-command/overall source byte/full-mode/type/logical and mutable Git/ignored-input/directory guards passed. Aggregate completed 4, finding 1, incomplete 0, exit 1
Canonical EN/ZH
Passed: guarded first ten-file promotion, source owners and fresh ordinary production/nonpublishable rendered evidence; only the known production draft-release omission remains
Stage decision
Supported R6/A07/A15 scope accepted locally after the required receipts
The durable focused-tool receipt is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r6-tools-6bf67ltv/r6-public-tools-acceptance.json,
SHA-256 16b6e47fc0618c76d2f9e3680a4112b6e47b478af8aabd3f2fc84821f840cc8a.
It binds the provision record, executable/configuration evidence and 1,422
resolved Node package files. Markdownlint reports original content/tools.md
line 7, bytes[80:92] (ppears here.); Vale reports the same line,
bytes[71:78] (BADTERM). Each of the seven network cases actually makes
one HTTP request.
The exact-binary consumer receipt is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r6-corpus-59_asiyr/final-receipt.json,
42,212 bytes, SHA-256
0ad86afaf235bdcff0c474e76b08e0591591a7b22c7992b02e20fb17975d029e;
the completed summary binds
467b66eb6d178829508115050d4243909313acf1b4d59317ecda37ab7383ca55.
It retains 14 copied owning/completion gate logs. The six original operations
sum to 314.912887 seconds, excluding candidate compilation and receipt-only
correction. workspace list returns 0; four direct full checks return
0/0/0/1; the aggregate returns 1 with all four sites completed.
Site
Preserved source files
Direct/aggregate child exit
Diagnostics/coverage
Recorded finding boundary
Starter
97
0/0
28/29
Translation review information only
Documentation
421
0/0
144/34
Translation review information only
PIG
858
0/0
120/41
Translation review information only
Repository
2,294
1/1
11,250/29
Existing 10,462 duplicate-ID findings and 788 translation review information items
Direct and aggregate child identities, order, every diagnostic and coverage
record match. After every operation and overall, all four consumer sources retain full
modes/types, logical and mutable Git metadata, ignored copied inputs and directory
inventories. The complete root CLI inventory still equals its frozen capture. The 478,603,149-byte direct repository JSON and
635,470,795-byte aggregate JSON were validated streamingly rather than
truncated. Separate pinned-tool fixtures qualify optional-tool protocols.
The consumer registry is task-local and writes no consumer policy.
The initial acceptance driver overwrote a summarized result’s command string
with invocation argv, producing a false parity exception after all six CLI
operations and their per-operation guards had completed. The failed driver and
summary remain preserved as pre-correction.r6_qualify.py and
pre-correction.summary.json. Receipt completion corrected only invocation
metadata. It verified unchanged raw-result SHA-256 values and header commands.
It retained all original full-stream diagnostic/coverage digests and rechecked
overall consumer/root guards. No CLI runtime correction or Hugo/CLI rerun was
needed. The receipt-only completion took 2.002 seconds and exited 0 in
/tmp/oink-r6-corpus-receipt-completion.log.
The executed driver SHA-256 is
4d2a360c6f7f6f96c38698bd189bc4d4b2cb02a7509858920d752897fdd85988;
the corrected driver is
4870f5c0374fcc11ad1a6b2e3aefe36f493b6f9f4666c293993dc6a59df8a11b;
the receipt-completion driver is
cd50d3fe704370f73fa4e7d94ce8e4bc925d11ec8ef04d463aacec37c2053daf.
The streaming helper binds
144f778cdb7907372797b47b97f817f340e70423701a2a958dee589281a9a11c,
and the inventory helper binds
d3ac41dc2e18295bfb26134d1a696935c8174913e2801a5766dbf7a1139d89f8.
This receipt qualifies local darwin/arm64 with Go 1.27.1, Hugo Extended
0.166.0, Node 26.9.0 and Apple Git 2.54.0.
The initial actual-tool trial exposed Darwin /var versus /private/var staging identity,
actual loopback proxy routing, and an invalid inline-block-attribute/line
assertion in the Vale fixture. Staging is now canonical. The Vale fixture uses
a real standalone block attribute. The source-mask boundary is unchanged.
The qualified child environment forwards literal NO_PROXY/no_proxy host-list
data while omitting proxy URLs/credentials and Node preload settings.
Supported source diagnostics require proven original ranges. Rendered lychee
locations remain output file/DOM pointers without inferring a Markdown line.
Offline lychee is not invoked. Authentication/rate-limit/server/transport
uncertainty cannot become required success through severity, exclusions or
baseline acknowledgement.
The first guarded ten-file promotion and its fresh rendered qualification are
complete. The receipt is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r6-docs-render-dcwtcmyl/summary.json,
555,297 bytes, SHA-256
ee153932900dc6f1ec62beef1a75927fc60b857efccfbcc558bf0e2c2b12cc04.
The 64.17-second run used the exact qualified aa8b347f…371f binary and unchanged
103-input b85affd9…a03b runtime inventory recorded above.
First-promotion documentation owner
Actual result
CLI production links
0; one strict production Hugo renderer, no analysis build
Ordinary production Hugo / Markdown / links
0 / 0 / 0; 214 content pages and 43,376 text nodes; 345 HTML pages, 48,438 internal references and 4,259 fragments
Ordinary production translations
1 only for the existing draft content/blog/release/1.2.0.md absent from production; not a new R6 failure
Independent ordinary nonpublishable Hugo / Markdown / links / translations
All 0; 216 content pages and 43,682 text nodes; 347 HTML pages, 48,814 internal references and 4,287 fragments; 137/137 pairs and 1,118 headings
Source owners / schema
Translation, style and whitespace all 0; 137/137 pairs, 1,118 headings; 137 Chinese files, 181 strong marks, zero emphasis marks; CLI/documented result schema both bind 7468c2d04cde8a368ce0ba44a1f27125b5fca364b6d4672353519b9545b3bdda
Preservation
All 12 owner commands, CLI/schema checks and overall comparison preserve 421 primary files, 427 copied inputs, 109 directories and 36 mutable Git files with full modes/types/bytes and logical Git; both private ordinary source copies and all 103 runtime inputs unchanged
The first-promotion installer receipt,
oink-r6-doc-drafts-ymjop499/applied-files.json, binds
13c965592d64056d8365aed1927d2d422fadec8adc54ee7050b22e2ea0ad6270.
It retains captured actual original inodes in private temporary storage,
preserving later old-open-handle writes. Recovery also preserves later target
edits or deletion.
R7 read-only Studio candidate evidence
R7 implements the embedded five-view browser and authenticated loopback API
candidate described in the contract. Frozen core/browser, exact-binary four-consumer
qualification, and guarded canonical rendered gates passed within the declared
scope.
Focused native and browser evidence
Owning boundary
Evidence status
Native/public parity
Actual shared check reports preserve diagnostic/coverage/exit identity for 0/1/2; explicit selected workspace startup, cleanup/signal and no-source-write proofs are recorded separately by the owning test receipts
HTTP management/source/preview
Literal-loopback selection; exact Host/origin/Bearer checks; no arbitrary request paths/writes; captured source/diff bounds and source-mode/output inventory guards; focused core/new browser and current corpus receipts below bind this supported scope
Initial held browser
14 axe checks with zero violations and 14 screenshots; five desktop light views, captured BOM/CRLF source/diff, desktop dark, mobile dark and all five 320-pixel light views plus capture changes. Synthetic actual-Hugo fixture retains 228 native diagnostics and coverage parity; copied suggestions use a private test clipboard, leaving the host clipboard unchanged
Browser preview attack
Actual attack script executes in the isolated preview, but parent access, management fetch and popup are blocked; token query refused. Actual draft-only page remains production 404
Snapshot preservation
Captured source instructions/HTML stay literal data; the initial capture retains its old bytes before refresh after an explicit task-fixture external edit. Source full modes/Git/directories preserved except that declared fixture edit; changes show the actual modified captured input
Preceding held browser
Passed refreshed held UI/backend receipt: all 14 axe checks zero violations and 14 screenshots, including declared/captured theme rows
New partial-preview browser
Passed new frozen partial-preview runtime: 14 axe checks with zero violations and 14 screenshots; actual Hugo normal HTML 200 and 67,108,865-byte output 413; native 1/228 diagnostics and coverage retained, required partial coverage visible and Studio/refresh 2
Initial browser receipt:
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-studio-browser-AfwaYi/summary.json,
SHA-256 930fbd1ab86806069b963bff2e3e95aaa07e3634400cec65e2b8c7922e2a1707.
Its exact binary binds
92e5b962e40fbe828a0b006f3ae76a2bddf4ad7e8b1c5b6967e365b8f1827879.
The qualified local versions are Node 26.9.0,
Playwright 1.62.1, @axe-core/playwright 4.13.0 and Chromium 151.0.7922.34.
The refreshed held UI/backend browser receipt is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-studio-browser-vn0ofb/summary.json,
SHA-256 520603779f712539865c6e9ef7a9ad3ad21ec1906adfb067ec607cc69d071b7e,
with exact binary 73bf90c69dce84849ee20ddfbfe825b9f2dd46f0cd37a228ce1b041a83afa33f.
All 14 axe runs and 14 screenshots passed, including declared/captured
theme metadata and all five views at 320 pixels.
The initial parallel whole-suite trials in
/tmp/oink-r7-frozen-go-gate.log and
/tmp/oink-r7-frozen-hugo-gate.log failed due to ten-second CI-test deadlines under parallel package
load and a graph test observer refreshing its own Git index. The isolated CI
target sets then passed in 12.149 and 2.291 seconds. The controlled Git-observer
graph run passed in 1.354 seconds. Only
internal/projectgraph/hugo_test.go changed: its read-only observer disables
Git optional locks, filesystem monitoring and the untracked cache. The ordinary
actual-Hugo graph run passed in 1.562 seconds after that test-only correction.
No runtime or embedded UI bytes changed.
The corrected freeze is recorded in
/tmp/oink-r7-corrected-runtime-freeze.json: the 113 runtime inputs retain
15a7de85a1ae9e6a73d8ea6570aa4f97bdd0ad5677ad7ca996fdd081ad43f7b5;
the 193 broader inputs now bind
67c6d36cf91d175f208f79cdd4d337aab6d2ef71e43453b20394b677678725e8,
with only the test-observer file changed from the preceding
85ad60d24c93e899020fbdcd34f8252c578253ce5afaf8652e561a432ecc8067
freeze. Corrected serial Go tests and vet passed in
/tmp/oink-r7-corrected-go-gate.log. The corrected serial actual-Hugo/pinned-tool
suite also passed in /tmp/oink-r7-corrected-hugo-gate.log, SHA-256
2aed822ff6fc8be04919aa74ca6ada721789232c14c1d77f1d44113bc0d235a7;
the application package took 220.782 seconds. The independent post-Go
source-preservation audit is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r7-postgo-audit-qygh7bcc/receipt.json,
SHA-256 5ee45fe041536243bc1229054516835c61b27909a4f296ac226b1a138e4bc8dc.
The durable corrected owning-gate receipt is
/tmp/oink-r7-corrected-owning-gates.json, SHA-256
c7f94a740e33a7349886b3f3689419719f857f39031375e80ca384a3dac36e67.
The prepared documentation renderer requires
the completed consumer receipt to prove a private captured-source rebuild
byte-identical to the final browser binary. Its source-only independent audit,
oink-r7-docdriver-audit-ig_r8ud1/receipt.json, binds SHA-256
858cc48bf602fbdb26fcbda03c78ca485338b1295d64257d32cfb14b24f1ade3
and prepared driver
f25d9ac4bf1a7ef43d5526b7b3cbadf84dd64ad8a57fd82d1c82e76fdb2b3435.
The first consumer driver trial, oink-r7-corpus-h1lOFl, stopped with
KeyError('preview_base_path') because it indexed a field omitted when
the actual preview base path is empty. Its private rebuild was byte-identical
to the final browser binary
73bf90c69dce84849ee20ddfbfe825b9f2dd46f0cd37a228ce1b041a83afa33f,
and all four consumer source inventories and the root inventory were preserved.
The fresh
oink-r7-corpus-corrected-cByXTa driver changes only those two accesses to
get(..., ''), with SHA-256
4c409acacbb9b82e658e6705eddefd9a3541def5c63c340b65678a6c9a8354e4.
That fresh run subsequently failed when the repository produced an inventoried
file larger than 64 MiB: the preceding runtime refused all production preview.
Its native check retained outcome 1, while required unavailable preview made
Studio outcome 2. Starter, docs and PIG completed that run with outcome 0.
All four source inventories and the root inventory were preserved.
A narrow runtime/test correction for partial
preview keeps the 64 MiB limit, exposes guarded production files within the
limit, returns 413 for the exact skipped oversized paths and keeps required
studio.preview coverage incomplete. Native check outcome remains unchanged.
Studio still returns 2 for required incomplete preview. The embedded UI is
held unchanged. The bounded coverage detail records actual omitted
relative paths, sizes and count. A prepared real-Hugo browser fixture adds
static/oversized.bin at 64 MiB plus one byte to exercise an available guarded
HTML preview, an exact skipped-file 413, native outcome 1 and required
partial-view outcome 2.
The new partial-preview freeze is
/tmp/oink-r7-partial-preview-runtime-freeze.json, SHA-256
c426ce3e641ed7b39bb711a26006306cab22e761c5062f2164f10deb4bea8765.
Its 113 runtime inputs bind
4900ae05abbdf4409b0be54f276fb4135269cf0a49e9071013ccf42544d35c84;
193 broader inputs bind
8b172cef2b228e2642f0139d6cc569136e86843f818e52e412fa4a2d56add25d.
Only internal/studio/preview.go changed among runtime inputs. The broader
changes also include its test and scripts/test-studio.mjs. All three UI files
retain their exact bytes and modes. Focused core final race passed in 1.748
seconds, with vet and scoped whitespace checks also passing. Its receipt,
oink-r7-partial-preview-owning-a56dunn4/receipt.json, binds SHA-256
7b6ecb491f283d04fe54347e564dba426b1a84d152040a1d945af54bc67756ac.
In the initial sparse-fixture mode trial, host umask 0077 made a
requested 0640 file actually 0600; explicit fixture chmod to 0640 corrected
the setup. Focused proof covers normal
200, oversized GET/HEAD413, changed identity 409, private path 404
and refusal for other unknown output errors.
Whole serial Go tests for the new partial-preview freeze then passed in 61.481
seconds, and vet passed in 0.571 seconds. Completed logs are
/tmp/oink-r7-partial-preview-go-gate.log, SHA-256
be7d6eccf99a6f4c1b8f09d1fb782455c7cbd3bad4a2f37e2f0e9da916bcb313,
and /tmp/oink-r7-partial-preview-vet-gate.log, the empty SHA-256
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.
The independent held-input audit
oink-r7-partial-held-audit-o6p98i1l/receipt.json, SHA-256
e567efc5f580db9395afab8ad36c4db842c3db95db442eb1cb1c740dbd43ec31,
verified all 113/193 inputs and physical/logical identities during that parent
Go/vet run.
The new whole actual-Hugo/pinned-tool invocation subsequently completed with
exit 1 after 285.649 seconds. Its sole failure was the parent’s unavailable
Markdownlint preparation path /md/node_modules. All other actual cases passed.
The log is
/tmp/oink-r7-partial-preview-hugo-gate.log, SHA-256
1ab6b8cfd399d484e08a1d1f05d25475754caa731991dd1eec1cca03cf6ce970.
The sole owning case was rerun with the exact provisioned
/markdownlint/node_modules executable. Source/runtime did not change. The case
passed: application package 2.317 seconds, wall 3.265 seconds. Its receipt is
/tmp/oink-r7-partial-preview-corrected-tools-gate.json, SHA-256
62b75e563e8074995ed9dd354434e653b2f5f2c6d20767226286d0c08d4c667c;
log SHA-256 is
e9bddac210654d219d9c5d6ebabaa3b91a0f5f4de4daf228b3ae21aeaac7673a.
The executable comes from provision receipt
268e601e81bc03a263296d57257b85635371bda642d0632532a7d9318c981461.
The independent case-matrix/held-source audit verifies cumulative executed
actual-owning-case coverage 0 from the whole invocation plus that
corrected case. Its receipt,
oink-r7-partial-case-matrix-audit-16_bl9hr/receipt.json, binds SHA-256
0a9e4a1a1e1a08f597becb2f27e743c9f23df672c713c2757241704edb16b51e.
All 113/193 physical/logical inputs remain frozen. Optional
TestArtifactCorpus and TestPublishedRuleSourceProvenance cases were explicitly
skipped.
The new post-Go input audit,
oink-r7-partial-postgo-audit-g1hcqdtl/receipt.json, SHA-256
b369737ec48456f673c850ea702cb3cb7efffb8ecc129d87e00dc03af82b2e3b,
then confirmed the complete held 113/193 physical/logical inputs after Go/vet.
The new partial-preview browser passed against exact binary
f39d6754f7ad13599e4e849394e0f470b2c6f26edf96ce40f199d27b65a8030e,
version 0.4.0-r7-local, 16,000,578 bytes and mode 0700. Its summary is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-studio-browser-cE9be3/summary.json,
SHA-256 9099e6c407fd0f9de3c29ce80e03f034a4223d7d7a7c1f1378052e8b9084e0ae;
provenance SHA-256 is
85b9f537fb09eecbb09d133b53a297c78184c11200ab0938734c0d10f3449095.
The private oink-r7-browser-partial-ZZIqzZ/source-binding.build.json, SHA-256
7a89ab8318c3a38455ab6ce12bcdbc53ae5ce0674fb5aaaa1df0fcf68a093399,
binds all 113 runtime and 193 broader source inputs plus physical identities
before capture/build/after to the new freeze; root inputs stayed unchanged.
All 14 axe checks had zero violations and all 14 screenshots passed, retaining
the keyboard/mobile/light-dark/source/clipboard/security checks described above.
Actual Hugo emitted oversized.bin at 67,108,865 bytes. A request through its
rendered /sub/oversized.bin link returned 413. Ordinary actual HTML
returned 200. Required partial preview coverage stayed visible. The CLI/API/UI matched
228 typed native diagnostics and native coverage/outcome 1.
Studio and the subsequent refresh returned 2. Source preservation still
excludes only the declared task-fixture external edit.
Another prepared corpus driver had assumed that an available normal
preview always appends a studio.preview coverage row. Actual normal
Starter/docs/PIG Overviews do not emit that row, so the driver assumption
was corrected without changing native coverage. The repaired fresh
oink-r7-corpus-partial-pZLwY0 driver, SHA-256
47778df62505beeb7432985be927f1b001e03824e9dee3a6dbed9d9b2dbe049c,
was reviewed against those three retained actual Overviews and the current
partial browser capture. Normal availability still requires its actual preview
URL and independent HTML 200. A partial capture retains its actual required
row, omitted count/identities and 413. The preparation audit is
oink-r7-partial-driver-correction-audit-sa98cm6k/receipt.json, SHA-256
a519a5bc6ae83438146ff4710d53f5edb0e656a05d0532c02123e5771416f07e.
The fresh four-consumer qualification completed with driver outcome 0 in
234.6425 seconds. Its current summary is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r7-corpus-partial-pZLwY0/summary.json,
SHA-256 d7b5a4f1607b6f75ae6a596c19cbab28685fb67dac750096173060ed097c8bf5;
log /tmp/oink-r7-partial-corpus-gate.log binds SHA-256
a7b724500569bd594d8e01502ec1956eb089cc9153b04b693992a9322013c811.
The durable current corpus qualification.receipt.json binds SHA-256
4e5df7c3fda9f0b763091af3e6cb85c68c736c319a1de68030b81d5cd5b384bc;
primary source inventories contain 97/421/858/2,294 files respectively.
The private captured-source rebuild is byte-identical to the new browser binary
f39d6754f7ad13599e4e849394e0f470b2c6f26edf96ce40f199d27b65a8030e.
Runtime 113/broader 193 inputs and root physical identities stayed frozen.
Every operation and the overall boundary preserve all four consumer bytes,
full modes/types, logical/mutable Git, ignored copied inputs and directories.
Consumer
Native outcome
Typed diagnostics
Studio outcome
Actual captured pages
Starter
0
28 review-info records
0
66
docs
0
144 review-info records
0
343
PIG
0
120 review-info records
0
248
repo
1
10,462 existing duplicate-ID findings plus 788 review-info records
2
1,576
Nested native headers, typed diagnostics, coverage and exit match direct CLI
checks exactly for all four sites. All issues were paginated. Other views
used bounded samples. Captured physical source and translation diff were
available on all four. The first three actual production previews returned
HTML 200 and emit no studio.preview omission row. The repository normal HTML returned 200 with 60,100 bytes. Its current
capture exposes four oversized print paths, where each actual HEAD returned
413 with zero response-body bytes:
Captured omitted relative path
Captured byte size
_print/pkg/index.html
73,976,221
_print/pkg/pgsql/index.html
69,903,999
zh/_print/pkg/index.html
73,086,240
zh/_print/pkg/pgsql/index.html
69,052,754
Required studio.preview remains
incomplete, so repository Studio 2 retains native 1. Actual analysis-only
draft routes returned production 404 in docs and repo (Starter/PIG had no unique captured draft route). Workspace
subset/full/healthy-subset sessions selected only registered sites and closed
listeners without captures. Unknown or selected missing sites returned 2
before startup. Independent final corpus audit
oink-r7-final-corpus-audit-xr3_u5dt/receipt.json, SHA-256
b8a8eedf5c899fe5830bdde959783c46b3f191ab144c0d3798077555d55238fc,
verifies raw typed native/API/shutdown parity, all 132 operation preservation
comparisons and four overall guards.
For temporary disk capacity, the parent retired three private Go build caches totaling 366,184,826 bytes, as recorded in
/tmp/oink-r7-private-cache-retirement.json.
Remaining stage gates and promotion boundary
Required gate
Current status
Frozen runtime input/binary identity
New partial-preview freeze binds 113 runtime inputs 4900ae05abbdf4409b0be54f276fb4135269cf0a49e9071013ccf42544d35c84 and 193 broader inputs 8b172cef2b228e2642f0139d6cc569136e86843f818e52e412fa4a2d56add25d; all UI bytes/modes unchanged. Source-bound browser binary f39d6754f7ad13599e4e849394e0f470b2c6f26edf96ce40f199d27b65a8030e passed; fresh private consumer rebuild is byte-identical
Full Go/vet and actual Hugo
New whole serial Go/vet and browser passed. New actual-Hugo/pinned-tool whole invocation remains exit 1 for a preparation path; sole corrected owning case passed 0, yielding independently verified cumulative executed actual-case coverage 0; two optional cases explicitly skipped
First guarded TEN promotion and scoped actual render passed
Stage decision
R7/A16 supported local scope accepted
The documentation installer retains the actual captured old inode
outside canonical source storage on both success and recovery, without
unlinking its last name after an earlier target identity check.
The completed first-promotion rendered gate is
/private/var/folders/df/bfm8q07d7bv3kpjf1fjchq4m0000gn/T/oink-r7-docs-render-n8tw2tbw/summary.json.
Its SHA-256 is 35e79f51d39803b3e4cdf134ed277957dd627acba42e0e0dc785e4745ec3c481.
The log SHA-256 is de3a07eac661c15805070e0ed2e364a71ebbd38e15d8907aab3bdf716e95131d.
The run took 63.33 seconds. Exact qualified binary f39d6754f7ad13599e4e849394e0f470b2c6f26edf96ce40f199d27b65a8030e passed production CLI links with one strict Hugo build. Ordinary production Hugo without a probe passed rendered Markdown (214 pages/44,075 text nodes) and links (345 pages/48,482 internal links/4,303 fragments). Its translation owner retained exit 1 only for the existing nonpublished release 1.2.0 draft. Independent draft/future/expired analysis passed Markdown (216 pages/44,381 nodes), links (347 pages/48,858 internal links/4,331 fragments) and translations (137 pairs/1,129 headings).
Source translation/style/whitespace checks passed and CLI/docs schema 7468c2d04cde8a368ce0ba44a1f27125b5fca364b6d4672353519b9545b3bdda remained identical. All twelve operations, schema and overall guards preserved 421 primary files, 427 copied inputs, 109 directories, 36 mutable Git files and 113 runtime inputs.
The first guarded promotion receipt is oink-r7-root-promotion-p9g1u7pz/summary.json,
SHA-256 323a5ce267e39aaf8f97dc4a12cccbdde83730155a199efb5f3815e29b334e4a,
verifying that actual original inodes are retained outside canonical source.
R8 accepted reviewed editing evidence
R8/A17 supported editing scope is accepted locally after the corrected frozen
owning/browser/corpus and guarded canonical rendered gates recorded below. CLI edit text, field, snippet and attachment preview the same
bound oink.edit/v1 intent. Explicit studio --edit uses this intent. Saved-plan apply or
explicit acknowledged Editor Apply owns selected source writes. The default
Studio session remains read-only.
Candidate scope and preservation
Known site-owned UTF-8 Markdown is bounded to 1 MiB. Full text and supported
ordinary top-level YAML scalar forms retain the declared BOM/line-ending and
source-span preservation boundaries. Unsupported form shapes remain text.
Exact value_json numeric tokens avoid browser Number rounding. Scalar forms
limit numeric literals to 4,096 bytes and absolute decimal exponent 10,000.
Larger/nonfinite constructs remain manual text. Field JSON is at most 1 MiB.
Escaped lone surrogates are refused. Valid Unicode pairs are supported. Catalog
components use original UTF-8 body byte offsets. Attachments require actual
leaf-bundle identity, at most 4 MiB and an exclusive new clean basename.
Source hashes, full modes, all site/external inputs, regenerated intent and
fresh actual Hugo validation bind the same shared guarded application path.
The Editor displays the complete UTF-8 review, selected-file base/after
identity and native candidate result. The review is capped at 2 MiB. Its
literal bytes are hash-checked before acknowledgement. The actual selected
candidate HTML is draft/future/expired analysis, visibly nonpublishable and
separate from the original production preview. Required candidate-view
incompletion may raise the proposal/session to 2 without changing native
findings. For page-file edits, the selected candidate source hash/full mode
matches its reviewed After state. Attachment/no-op proposals retain the
selected page’s reviewed Base state.
Stale/replayed plans, attachment collisions and untrusted preview requests are
refused. Applied-with-refresh-error remains explicitly applied.
Focused preparation receipts
Candidate evidence
Current observation and boundary
Pure editing core
Owner’s focused exact-numeric tests passed for 18446744073709551615 and 7.12345678901234567890123456789, exact no-op raw bytes and changed final decimal digit; broader frozen receipt pending
Actual DFE output ownership
Live ordinary output is copied through a confined os.Root, exclusive target files and guarded streaming reads; files over 64 MiB can be captured while serving limits remain unchanged
Copy cancellation/race
Context-aware helper focused 0 in 0.703 s, race 0 in 1.856 s, vet/whitespace 0; actual first-chunk cancellation retains partial output, source bytes/modes/identity unchanged; source FIFO replacement cannot block before descriptor proof
Helper log identities
Focused c227a88210ab0dc46b24eaff50a347d5c494e9ce23f5bdef5d5b822efab4976f; race 13f0616d55fd4df791ecded0712a18096392c88cb9b849383414c305e50b6779; vet is empty SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Read-only candidate integration review
Selected actual HTML URI/base prefix and inventory, retained private DFE lifetime, source SHA/full-mode equality, native versus view coverage and cancellation reviewed; no new material defect found within this code review scope
First Editor browser trial
Harness stopped on ambiguous global Open editor selector; retained as failed trial
Corrected-selector Editor trial
Desktop field/component/binary apply checks and axe checks passed before 320 px draft-review horizontal overflow failed; retained original trial
Narrow layout correction
Editor review hashes/receipt text wrap and intrinsic widths are bounded; prior CSS and failure evidence retained separately. Development rerun passed 12 axe checks/screenshots, including real 320 px dark review and light receipts/refusals; final frozen-source/binary rerun pending
The preceding preparation rows were captured before the first complete R8
freeze. The first whole frozen gates later
passed for binary 84b804d3246a5be581e44884ed910fa3f45d8be29734b8babdeeb763a11fa882
(0.5.0-r8-local), runtime 123/58517b8e98b80df6642be4ee6275a0074ec187768b20e009f41da2607b635d46
and broader 212/d81335c78413acc60e27adee0ac794862285e41cb2a3a7687ec820c1065ba003.
The whole-gate summary is b49f4a3272af3e3dcc92e7e9b38d4289bb49cb19aa3e9354ea148d2d8cb2cea8:
Go tests 0/56.523 s, vet 0/0.904 s, whole actual Hugo plus all three pinned
tools 0/320.044 s, core race 0/16.610 s and public R8/helper race 0/48.319 s.
Its source guards passed.
The first frozen browser receipt
eb6977235ef9ae6cec28651b5654eb101685af67abe0cbed0acb0f8375458d9c
binds that same binary and source freeze. Editor had 12 axe runs with zero
violations and 12 screenshots. Retained read-only Studio had 14/zero/14.
The actual form preserved the literal 1e400, its planned after hash and diff.
It then discarded the proposal. Exponent ±10,001 and a 4,097-byte numeric literal
were refused locally without an API request. Four acknowledged field/component/binary/draft
applications occurred only in disposable fixtures. Default read-only refusal,
stale preservation, no-op source bytes, preview isolation and native-result
independence passed.
The first exact-binary consumer trial then stopped at Starter after 37.533 s.
Its immutable failed-trial receipt is
853a8397ba4c527c03aa3cc9ac7cacc41c0ab0379549d145b874f1d1ecc3901c.
Two failures are recorded separately. A driver event hash depended on JSON
object-key order. Recursive comparison nevertheless proved API/CLI arrays equal:
28 diagnostics, 29 coverage rows and native exits 0/0. Separately, repeated
resolved cache capture produced a genuine duplicate module input,
.gitattributes. Required candidate graph capture became incomplete. Mutation
outcome was 2, and native check remained 0. There was no actual selected
DFE HTML or applicable lease. The public published-cache fixture reproduced that defect;
its retained failing log is
50ab704e715665096e0f36391bb1364841c3a2b2ac88dd262915ce53fb66afa6.
All 48 recorded per-operation source proofs and four overall consumer guards
preserved bytes, full modes, types, Git, ignored copied inputs and directories;
root inputs stayed exact. No Apply or saved plan was performed.
The narrow runtime correction gathers complete resolved-module rows before
committing additions. Identical repeated or reordered captures retain the
original inventory. Changed hashes/full modes and added or removed paths within
an existing scope are refused. Missing scopes, conflicting identities and capture
errors are also refused. Refusal does not refresh prior evidence or append partial
additions. Non-module rows remain exact. Site owning receipt
e7b284b9dece1c5f2b696cd76166d2286fcbec69e6c48912ab9a78204bdb980b
records focused 0/0.746 s, site 0/2.123 s, focused race 0/1.958 s and vet
0/0.167 s.
The corrected published-cache receipt
6358dc81f06e34b789cb47a0f4442d6d036d2e33423a06f5dbe85b3064766da6
records actual github.com/pgsty/oink@v1.1.0 from a task-local copied checksummed
archive, with no downloads or replacement. Original and candidate graphs each
have 1,256 unique inputs, including 1,198 module inputs. Full API/CLI typed
diagnostics, coverage, exits and plan identity match. Actual selected DFE HTML
returns 200. Source bytes/full modes/Git are unchanged. No Apply or saved
plan occurred. Owning race passed in 30.255 s; vet passed. Its corrected race log is
c7d21a30b8af141d9d9604a80ddf9cf3f608320b97a441a06a742376e2119551.
The current complete corrected freeze is
fb276500a3d2643bd0aa220f8bebb380fce2c98493d62b0502b6497b2f02949f,
runtime 123/cdf629eeb4bbef6d4d88ee27fe3fb0a73b07b6bf6438336e033a18fb7feb1c17
and broader 212/f6e305e792733a550814eb841615d12fa14a9a6bb2a97c4ada85f7275183e579.
Only source_inputs.go, its owning test and the public published-cache test
differ from the first freeze. Held UI/helper bytes and all full modes remain
unchanged. The rebuilt candidate is
bd25f9e0b35ec10e227aabf9582ae40b0b367390f64b93668de6ae85222c3d71
(0.5.0-r8-local). Its observed corrected source-bound browser receipt
33a698985a55c14c3e64e981da1f8e74c686497083dc0edb241406f185e3eeb8
again reports Editor 12/zero/12 and read-only 14/zero/14 with complete 123/212
pre/post source preservation.
At the next evidence observation, the corrected whole gates completed for
that held bd25f9e0…22c3d71 binary and fb276500…02949f freeze. Summary
208f156c0954e803eccbada678a4689683dc1576c543c379e5cc04b3497ef772
records Go tests 0/57.826 s, vet 0/0.521 s, whole actual Hugo plus all three
pinned tools 0/378.847 s, core/site/Studio race 0/17.937 s and public
R8/attachment/output-helper race 0/85.159 s. Every gate’s source pre/post guard
passed. The actual-Hugo log has 434 top-level passes and zero failures. The two
optional external fixtures TestArtifactCorpus and
TestPublishedRuleSourceProvenance remained explicitly skipped.
The corrected whole actual-Hugo log is
4eb1a2afdce2adbe570b10922fd53b6d8954f7c95747370c3c661e94d2f71a05;
Go log ea59463e9649ffe2f8aff9da66c91cf6895c86fde96a524db23c89cd4eb35925,
core race cdd3d761b5ca7b5e986b25aee3129d65663e3e5ebb83eecb6fbb080387298a58
and public race bb610bdcd7a299cb9b66f4c69e30e246c20546efae47653c01d350b1026ea2de.
The 434 passes and two optional skips above are top-level counts. The same
whole invocation also skipped the nested Unix-socket refusal fixture because
the Darwin temporary pathname exceeded the socket limit. A first shorter
private-path trial still skipped. Receipt
93106854ca890b497d3c74522b895f597ac60cec55ced42cad7b187d334da200
retains process exit 0 and records no actual socket execution.
A subsequent nonresolved short private TMPDIR executed the same frozen
socket fixture under race detection without a skip: 0/2.954 s. Receipt
531a503b3b91e1b423c2be61b92ed806d3a813738c38d57e5ec122577b4337f9
and log 236c84f1842ffce76174c834f3888718a109cec6377ada6f3242b02f551f00b3
bind fb276500…02949f and all 123/212 logical/physical/Git inputs unchanged
before/after.
The corrected four-consumer trial subsequently completed in 845.705 s. Summary
af4fc53326163c4a03aa2982c1f01363fbbdd5a447c9baed3639bd8599d46370
and qualification receipt
4d6fd02543c1920497e1a1bb0a68fcf89b0546130fd9cc12c1df391b7e673e75
bind a byte-identical private rebuild of bd25f9e0…22c3d71, the complete held
123/cdf629ee…feb1c17 runtime and 212/f6e305e7…5183e579 inputs. All 2,383 entries of the first failed
trial retained their exact bytes/full modes/types.
Corrected consumer
Native/current and native candidate exit
API candidate outcome
Full diagnostics/coverage
Actual selected analysis HTML
Starter
0 / 0
0
28 / 29
200, 48,149 bytes, /blog/design/content-model/
Documentation
0 / 0
0
144 / 34
200, 61,738 bytes, /blog/oink/immersive-reading/
PIG
0 / 0
0
120 / 41
200, 55,641 bytes, /404/
Repository
1 / 1
2
11,250 / 29
200, 92,352 bytes, /blog/infra/2020-12/
These are actual selected Hugo HTML routes in the separate, visibly
nonpublishable draft/future/expired candidate view. Each expected candidate
marker was present. API and CLI matched full typed diagnostics/coverage, native exits, and plan ID.
They also matched Base/After hashes and full modes, unified diff, and the
selected page’s proposed source. The complete literal API review and its hash were independently
validated. No consumer Apply or
saved plan occurred, and no listeners remained. The repository retained
10,462 existing duplicate-ID findings and 788 information records. Its four
actual PRINT outputs remained required partial-preview incompletion:
_print/pkg/index.html 73,976,221 bytes,
_print/pkg/pgsql/index.html 69,903,999 bytes,
zh/_print/pkg/index.html 73,086,240 bytes and
zh/_print/pkg/pgsql/index.html 69,052,754 bytes. Each bounded HEAD request
returned 413 with zero body. Selected in-limit HTML remained 200. Native
1 remained unchanged. Proposal/session 2 and Apply refusal stayed visible.
The other three complete previews had no invented explicit complete-coverage
row. Actual guarded HTML 200 supplied the evidence.
Exactly 53 protected operations each checked all four sources: 212
per-operation source proofs plus four overall proofs, with source bytes/full
modes/types, copied ignored inputs, directories and logical/mutable Git
unchanged. Each source proof compared four inventory categories, yielding 864
raw inventory pairs including the overall comparisons. All 53 root guards and
the final complete 123/212 logical/physical inputs also matched. All issues and
pages were paginated. The other five view endpoints were sampled to their
first 50 records. Each site included one known source and one bounded diff. Full
native/CLI record parity used the declared bounded complete-record codec.
Object order was canonicalized. Array order, types, null and field
presence remained significant.
Independent audit receipt
6b72ca06d8392a5271fc40757f176f26e1144c21eec93dbd035e0a1bd645657b
verified 69 artifact hashes, complete bounded API/spool/shutdown typed records
and the large native/CLI raw-file digest bindings. Its additive receipt
335f137663d4ec0b2a0d3e49c8d70b9918f86078ab6264855171a2644d8aa6c6
also verified the fresh current root’s complete logical Git inventory against
the freeze. The original audit stayed immutable.
The reviewed first TEN promotion subsequently passed through the guarded
retained-inode installer, root receipt
7cd9b4604d2340b9e46965a26281c921b967060909d518b8b4b31e5f42d0120c.
Its actual original source inodes were retained outside the documentation
site. Unselected source/copied inputs, directories and Git, and complete CLI
123/212 logical/physical inputs stayed unchanged.
The canonical render then completed in
67.21 s, summary
bb0d0710294f810fb14284f7b5b0329befbd290b66c21397b9a45e8382287fb6,
qualification receipt
32d3ffeca43bc9ad4615edcca0d3cc47cc932bbc93c6576724c800e0a62405b1.
It used the exact qualified bd25f9e0…22c3d71 binary and corrected 123/212
freeze. Actual CLI production links passed 0 with one strict Hugo build.
Independent ordinary probe-free production Hugo/Markdown/links passed: 214
Markdown pages/44,691 nodes and 345 link pages/48,532 internal references/4,351
fragments. Its translation owner retained 1 solely for the existing
release/1.2.0 draft absent from production. Separate explicitly nonpublishable
draft/future/expired Hugo analysis passed Markdown (216 pages/44,997 nodes),
links (347 pages/48,908 references/4,379 fragments) and all translations 0.
Source translations passed 137/137 pairs and 1,143 headings. Chinese style
passed 137 files/181 strong spans/zero emphasis. Whitespace passed. Schema
SHA-256 7468c2d04cde8a368ce0ba44a1f27125b5fca364b6d4672353519b9545b3bdda
matched exactly. All 12 commands, schema and overall guards preserved 421
primary source files, 427 copied inputs, 109 directories and 36 mutable Git
files, plus all 123 runtime/212 broader CLI logical/physical inputs. The
qualification receipt binds 60 canonical inventory pairs, 15 CLI guard pairs
and six private-copy source pairs.
R8/A17 supported local editing scope is accepted after corrected owning,
socket, source-bound browser, exact-binary four-consumer preservation and
these guarded canonical gates. R1–R8 are accepted locally. Native repository
findings and required partial-preview 2/Apply refusal remain visible. The separate
platform-authority audit
762571dab9a07651ac8e4c71764bfef292f8d5eba729a089e72d9d755b7e2d7c
confirms that the initial contract qualifies actually exercised architectures:
macOS arm64, native Linux arm64 and emulated Linux amd64. Darwin amd64 remains
an experimental archive with failed actual execution/unverified runtime.
Required gate matrix
Required gate
Current status
Final immutable runtime/source freeze and exact CLI binary
Corrected complete 123/212 freeze and bd25f9e0…22c3d71 bind completed owning/browser/corpus/canonical scope; first-freeze trials separate
Public CLI/JSON/exit, stale source/config/external-input and guarded writer tests
Corrected public R8/attachment/output-helper race, whole Go/vet/actual Hugo and canonical stage gates passed
Frozen whole Go/race/vet and actual Hugo/ordinary Hugo after selected application
Corrected whole Go/vet/actual Hugo and core/public race passed; 434 top-level passes, zero failures, two optional external fixture skips explicit; first trials remain separate
Editor browser five-view parity, text/forms/components/binary attachments, exact numeric/no-op, stale rejection and preview isolation
Corrected source-bound Editor 12 zero-violation axe runs/12 screenshots and read-only 14/zero/14 passed; bound completed corpus and canonical acceptance
Corrected all-four completed in 845.705 s; full typed native/API/CLI candidate parity, 212 per-operation source proofs plus four overall, no Apply/save/source writes; first failed trial preserved
Protected canonical TEN promotion, EN/ZH source/schema/style/whitespace and actual production/analysis render
Guarded first promotion and independent exact-binary 67.21 s render passed; only known draft translation omission in production; rendered and status bytes separately bound
R8/A17 stage decision
Supported local scope accepted after corrected whole owning/browser/corpus/canonical gates; R1–R8 accepted locally
Final A18/platform/archive delivery
Completed in the 2026-10-04 supplement below
Prior R1–R7
sections, whole-invocation failures and scoped acceptance receipts remain
unchanged. Temporary qualification files stay outside canonical content and
Git.
Current runtime completion supplement on 2026-10-04
This supplement records the current candidate on 2026-10-04 (Asia/Shanghai).
The dated page URL and all initial 2026-10-03/R1–R7 records remain unchanged.
The three UI
files retain the browser-qualified bytes and full modes. Current Go,
Hugo, platform, archive and four-consumer checks refresh the changed backend.
The first current ARM offline unit run exposed an output-copy integrity gap.
On ext4, adding a directory entry could preserve the parent’s allocation size
and observed timestamp. That failed run stopped before later qualification steps. The
correction captures and rechecks actual sorted directory membership and entry
identity. It also checks regular-file bytes and full modes. Only
internal/app/studio_output.go and its owning test changed. The failed receipt
and independent audit are retained.
The preceding integrity-correction qualification freeze is 683daca0e522193c7ff1b0de6ac2fee5d2fca080811bf184a8dfd5b90a33f224:
123 runtime inputs hash to d346ad15cd4239004e32e1b9f30d727eaf156be0187dc165ca874032a7cf962a,
and 212 complete CLI inputs hash to 2abd1a044d8192b07f9bbc06b55dc8b4544d66ca17b8867971cec702ba3af088.
The 0.5.0-r8-local Darwin arm64 candidate is
74ad94e73557f6538cd64edd1766d6df92c596d98411031159d94af072c186ec.
The integrity-correction receipts below bind that source scope. The later one-test
fixture amendment has a separate complete source identity and completed formal
qualification boundary. Both are recorded below.
The current complete source freeze is now
196245a3ba09305e34b86539c8eb79f1473e4373ee47aa1f56f8933b04a42d43.
The 123 runtime inputs remain
d346ad15cd4239004e32e1b9f30d727eaf156be0187dc165ca874032a7cf962a. The 212 complete CLI inputs are
2c487bfb4c65ed40ff78356b2860de627e6ac1afa0da2df433b09345dab7f5b0.
Only the owning published-cache test changed, to source
54c10ef89310256b5f4c165c7de5de9668e1d4d2991b71751076680141dbe779.
The fixture amendment is separately guarded. Production bytes and all semantic
assertions remain unchanged. Formal qualification of this complete source
passed. It includes the current eight owning gates, reproduced archives, and
full plain-Go AMD/ARM runs. Root A18
proof 2c018cb2afa3f26699a9e6b5a0971096246b12405fde5a27e43a9e213e46da60 binds all three declared supported targets and five reproduced
archives.
Current proof and preserved earlier input boundary
Observed result and bound receipt
New complete-source formal qualification
Freeze 196245a3ba09305e34b86539c8eb79f1473e4373ee47aa1f56f8933b04a42d43, owning test 54c10ef89310256b5f4c165c7de5de9668e1d4d2991b71751076680141dbe779, unchanged runtime123. Current eight gates, host/archive and both full plain-Go Linux flows passed, bound by root A18 proof 2c018cb2afa3f26699a9e6b5a0971096246b12405fde5a27e43a9e213e46da60
Build, full offline Go unit/vet, whole actual Hugo/pinned tools, core race and public R8/output-helper race all 0. Elapsed 3.501/68.257/3.909/333.801/37.070/79.670 seconds. Summary b40b7787b3da8dc1e0763812b6dde529b4b5b69fe479d79940f1161223124e1d. Independent audit 20780662b7ff35019b2c8c84e6dc763f9351ae0816f6ef7a7789f7a15be99167
Eight current frozen owning gates
Selected published-cache actual Hugo and race, build, full offline unit/vet, whole actual Hugo/pinned tools, core race and public R8/output-helper race all 0. Current summary d6272fcc4dfab114aecfcdf19a7e2b78f1e931817331b460f43ff2056bf754a4. Raw whole Hugo has 435 top-level passes, no failures, two optional top-level skips and the explicit long-path socket child skip. Runtime/binary bytes remain identical
Prior-source Darwin arm64 and archives
Current extracted candidate runs outside the checkout with no consumer Node requirement. Seventeen commands and eight actual process tests, including child signals, passed without process-test skips. Two fresh release directories contain byte-identical five archives and checksums. Source/license/provenance/canonical tar checks pass. Summary bcb4d7599e965c1b3cfe7fe698ca14061ad53d45e7a194337aeebb8d37aa77c1. Independent audit 60a04771365d8be15ac91fbbd8d485b019aae081598e468018861ca5734e387c
Current Darwin arm64 and deterministic archives
Seventeen extracted-archive/ordinary-Hugo/process commands passed expected exits, with missing Hugo explicitly 2. Eight actual signal/process cases ran without skips. Two independent fresh builds reproduced five byte-identical archives from current complete source. Summary 3890fd8468b6bce5271bb32ffa1a18bd5daf99c19c43becac0be8e3b908a5d57. Source, tools, module-cache and smoke-source guards remained equal
Prior-source Linux arm64
Actual nonroot Linux arm64 on ext4 with Go 1.27.1, Hugo Extended 0.166.0 and Git 2.47.3: full offline Go unit/vet, all 13 required pure top-level pass records and the membership case plus its four children without skips, 10 selected actual-Hugo cases without skips, native rebuilt archive identity, installed bilingual/offline/ordinary-Hugo/missing-Hugo 2 JSON and signal/source-mode checks passed. Guest summary 409990bc1425f4bf219f8911a71581af6e68729865580121dbeb6d85a06d2ea7. Outer receipt a022e40f068703cd59ce6d6a7fb6530cce6907681baa26eb1dfc77c09f0c8898. Exported-record audit 24afc50f6f860394d1ebfa7a8b754ddd9cb97f9e88a0dcfcbcb659193ecbfe5f
Current Linux arm64
Current nonroot Linux arm64 ran on ext4, with native ARM through QEMU HVF and Go1.27.1/HugoExtended0.166.0/Git2.47.3. Full offline unit/vet passed with 370 top-level passes. The following cases passed without skips: all13 decisive pure cases and4 membership children, and 10 selected actual-Hugo cases. Exact native/installed current archive identity and bilingual/offline/ordinary-Hugo/signal flows passed. 24 commands reached expected exits, including missingHugo2. Guest 268102f69c0950f9d2994d22cd2fd290fc11e24bd6d6f916fd70a93ca4946c74. Outer f3c066fdc9b97feff92160346185a1af978a5172eed5c81904ac7c0e5fc6c982. Source/SDK/borrowed/old-task guards were equal. The owned VM was reaped. Default optional unit skips retain their named gating reasons
Prior-source Linux amd64 failed trial
Preserved current TCG trial failed. Outer receipt 3543664ba5590f2ba5a8f676b196bb636b72bc819913289f415d0a8a841c1bdb, guest summary 16075204d287713c7f7650c0a65dd289dd4bd83db07c9ba4b85b3f21244d5240. Full offline units (370 top-level passes), vet and the first three selected Hugo cases passed. The published-cache candidate request reached the test HTTP client’s 90-second deadline. Candidate parity, the remaining six selected Hugo cases, native rebuilt archive and installed archive smokes were not reached. Deadline review 12917b9eb89e3abc5893e08da3b6b6e20743dcb4c14e6f7ba8561628e3566934
Current Linux amd64
Current nonroot Linux amd64 ran on ext4 under QEMU TCG emulation, with Go1.27.1/HugoExtended0.166.0/Git2.47.3. Full offline unit/vet passed with 370 top-level passes. The following cases passed without skips: all13 decisive pure cases and4 membership children, and 10 selected actual-Hugo cases. Exact native/installed current archive identity and bilingual/offline/ordinary-Hugo/signal flows passed. 49 commands reached expected exits, including missingHugo2. Guest 3a1a32979efc843de8b95b7c13824026e17f71c06d4c458b738c0b9583fb4723. Outer 30cf4950cc83fa0732047d9a0f89bb59e68779ee2e8f5c755724c9679be265e3. Source/SDK/borrowed/old-task guards equal and owned VM reaped. Default optional unit skips retain their named gating reasons
Runtime-equivalent preceding four-consumer candidate corpus
Source epoch 683daca0…33f224. Runtime123/binary74ad is byte-identical to current 196245a3…42d43. The corpus was not rerun after the test-only amendment. 853.249 seconds. Native/candidate-native 0/0/0/1, API/view 0/0/0/2. Diagnostics 28/144/120/11250, coverage 29/34/41/29. Summary a1e98ca3e10095a1134381666bacf256f8e8827cd3900c9e811b7120de4c2974, receipt 05c4562a50d9f83ba2c99879ec841870c5e753199e41792bd5bc718cf8046e7b, independent audit 3a1b0b6e3a8c6b1a0d82c5f82b46c84b1e44d6c30bab655610cb9e86e6a30b47
Final canonical lifecycle and rendered checks
The promoted TEN bytes use independent canonical rendering and navigation/URL receipts
The preceding six-gate b40b7787b3da8dc1e0763812b6dde529b4b5b69fe479d79940f1161223124e1d, host/archive bcb4d7599e965c1b3cfe7fe698ca14061ad53d45e7a194337aeebb8d37aa77c1, and ARM outer a022e40f068703cd59ce6d6a7fb6530cce6907681baa26eb1dfc77c09f0c8898 / guest 409990bc1425f4bf219f8911a71581af6e68729865580121dbeb6d85a06d2ea7 / audit 24afc50f6f860394d1ebfa7a8b754ddd9cb97f9e88a0dcfcbcb659193ecbfe5f remain retained alongside the new exact-source proof. Historical 26 axe checks/screenshots and 22 codec cases are carried with unchanged UI/codec/runtime inputs.
The initial max-CPU AMD trial remains failed: receipt 3543664ba5590f2ba5a8f676b196bb636b72bc819913289f415d0a8a841c1bdb, guest summary 16075204d287713c7f7650c0a65dd289dd4bd83db07c9ba4b85b3f21244d5240. The test client timed out after 90 seconds while awaiting candidate headers. Candidate parity and the remaining six selected Hugo cases/native rebuild/installed smokes were not reached. Guest inputs stayed exact. The host guard recorded only a .git directory timestamp change. The separate qemu64 one-test preflight also failed at the unchanged 90-second HTTP client deadline: outer receipt fc68173ccdfd8ce263ecdf082a533d9da666a4cc2e1e5e29880ee827286132ac, guest summary e350ff65feeee166ffac1d337db9bbd70d3895b1fb6d93df0a30ca4de09019fc. The named case took 177.71 seconds. The first trial took 176.64 seconds. Its inputs remained exact and its VM was reaped.
A later Go-overlay diagnostic preserved the same
production source and every original semantic assertion. Outer receipt
0bc6d563b7cd9ca862717c2123ee0836d83b6b927d00204a0b031049c38e93f0
and raw-bound classification
66a1422cdb79ab9f1cf683f441ade0ce4adb4a7a666d524c4b9ed98ebee28708
record a passed named case in 352.40 seconds. Original capture took 26.254 seconds,
Studio capture 26.211, candidate HTTP 94.312, direct preview 94.318 and CLI
preview 81.962. Both graphs retained 1,256 unique inputs, including 1,198 module
inputs. The original-capture context had expired when the HTTP result arrived. Fresh
independent direct/CLI contexts completed normally. All 20,564 host guards and
five guest command guard pairs stayed exact. The owned VM was cleanly reaped.
The scoped owning-fixture amendment now uses a 300-second budget
for that candidate request and fresh direct/CLI operations, about 3.18 times the
slowest observed operation. General/original-capture 90-second limits, restoration
of the shared client, shutdown 15 seconds and Go’s default ten-minute cap remain
unchanged.
The consumer driver compared complete typed diagnostics, coverage, native exit,
PlanID, selected Base/After/full modes, unified diff and selected source between
API and CLI. It separately verified the complete literal API review and its
hash. For attachments and no-ops, the selected page retains reviewed Base.
Page-file edits match reviewed After. Nonissue views are bounded samples. All
issues and pages are paginated. The 53 protected operations have 212 all-four
per-operation source proofs plus four overall proofs (864 raw inventory pairs
across four categories) and 53 root pairs. Seventy-one retained artifacts are
bound. No Apply, saved plan or consumer write occurred. The completed corpus’s
file-only collector needed two preserved metadata corrections for absent
historical trial/self-test files. No CLI/Hugo operation was rerun.
The repository retains its 10,462 pre-existing duplicate-ID findings and 788
review-info records. Its selected actual DFE HTML is available. Four oversized
actual PRINT files remain unserved (413, zero response body):
_print/pkg/index.html 73,976,221 bytes, _print/pkg/pgsql/index.html 69,903,999,
zh/_print/pkg/index.html 73,086,240 and zh/_print/pkg/pgsql/index.html 69,052,754.
The 64 MiB per-file preview bound is unchanged. Required partial-preview
incompletion remains 2. Native findings remain 1. Apply is refused.
Linux prerequisites were prepared in exclusively owned guests from signed
Debian metadata. Exactly ten new packages and three approved existing-package
updates were verified before and after installation. SDK/Hugo/module caches were
provisioned separately and reused offline. Qualification runs as an ordinary
user on ext4. Cached inputs and all 212 source files’ bytes/full modes stay guarded.
Default unit skips retain their actual gating/not-applicable reasons. All
required pure top-level cases, no-skip membership children, selected Hugo cases,
and signal cases must execute.
Linux amd64 uses QEMU TCG on the ARM host and is explicitly emulated. Darwin
amd64 remains an experimental archive. Actual execution returned Bad CPU type
(errno 86). Windows
is outside the declared scope.
The current Linux archive digests are ac883e54a1df0b820696279c63881ba75a00d279f507330128fe8d5aff59c52e
(arm64, 4,552,687 bytes) and 2dde43bf94ef35aac2111b07dcb9b2766fbf9f883fe39ccd646d14a98b94d734
(amd64, 5,034,668 bytes). The preceding 683daca0…33f224
archive digests c191383af21913be6940ec41be11755b3d985344bbc0f65cc3f5de16424a96a4
and 6531b27d889260afe804c1f49f37541fbae46e57b5d17a20178c28cb51968794
remain historical. SDK/guest preparation failures, the first ext4 membership failure,
and earlier private host metadata/resources trials remain immutable evidence.
Uninvoked E1–E4
extensions are separate inactive scope.
7.8.13 - Document comparison research, 2026-10-29
Dated evidence for a generic OINK side-by-side reading mode across languages and revisions.
Historical research; see the 1.5.0 decision
Research date: 2026-10-29. This bounded source review of OINK v1.4.0 informed
the translation reader in OINK 1.5.0. The accepted decision
and the shell contract describe
the released behavior and supersede the recommendations below.
Scope and evidence
The question was how OINK could support a generic comparison reading mode for
roughly 30–40 local sites: translated documents, eight-language sets,
proofreading books, arbitrary languages, and old/new revisions in one language.
The review covered Docusaurus, VitePress, Material for MkDocs with mike, Read
the Docs, Hugo, Sefaria, MediaWiki ContentTranslation, OmegaT, Weblate, Joplin,
VS Code, and CodeMirror. Evidence came from official documentation and pinned
source revisions; no upstream application was started and no browser behavior
was claimed from source inspection alone. Unpinned official documentation records
what was read on 2026-10-29; it is not an immutable source snapshot. OmegaT
evidence is limited to the 6.1.0 manual, not an inspected implementation.
Four Hugo members with repeated Chinese locales and distinct editions.
Identity and relationship lessons
For the original general-purpose scope, comparison would need to keep candidate-set identity, member identity, Hugo site key,
actual locale and direction, edition/version, canonical URL, and anchor
correspondence separate. A language code is not a document identity. The pinned DDIA configuration
provides a concrete case: zh, tw, v1, and v1_tw are four configured members
that include repeated Chinese locales and different editions. Deduplicating by
locale would remove valid choices and mislabel editions as translations.
Hugo 0.168.0 provides a sound starting point. .AllTranslations
includes the current page and .Translations
excludes it; an explicit translationKey can relate pages whose paths differ.
.Rotate "version" can adapt native version
dimensions while holding other dimensions, including language and role, fixed.
That adapter is optional for comparison and does not require a consumer to
reorganize content. It must not be confused with an OINK params.versions
menu, which is a navigation configuration rather than a semantic partner
resolver. Custom version or role dimensions still need an explicit adapter so
ambiguous native matches are not silently accepted.
Automatic translation candidates should therefore begin with the actual Hugo
page relationship, then pass an eligibility filter: published, built,
renderable HTML siblings; the selected page is excluded; home pages used as
language-navigation fallbacks are excluded; foreign role or version members
are excluded when the set requires that boundary. A navigation link proves
that a destination exists, not that it is a translation or a comparable
document. Missing translations remain missing; OINK must not copy source text
behind the reader’s back.
The original generic design used two selectors for an eight-language set. It
does not require 28 prebuilt pair pages or eight simultaneously loaded
documents. Same-language v1/v2 comparison uses two member IDs and explicit
labels. The same identity model also supports a proofreading book whose
chapter structures differ, without pretending that equal filenames or title
text establish correspondence.
What existing tools actually compare
Docusaurus document identity,
localization, and
versioning separate ID, slug, locale, and
version tree; its heading guidance
advises stable IDs for localized pages. VitePress constructs locale links from
the current relative path in the inspected
language helper
and supports custom anchors,
but that helper does not establish a semantic partner registry. Material uses
mike version metadata
and target sitemaps
to find a corresponding URL;
that confirms addressability, not semantic equivalence. These are useful
identity and validation patterns, not evidence of native two-pane scrolling.
Read the Docs supplies direct fixed comparison evidence: its visual-diff
documentation and
Addons docdiff.js
compare a rendered HTML body, mark changed DOM regions, and preserve a URL mode
flag. This is a single-page rendered diff for review workflows. VS Code’s
Markdown diff documentation
and diffScrollSync.ts
show two rendered previews with logical mappings and feedback suppression. They
demonstrate that rendered comparison and mapped scrolling are feasible, while
leaving OINK’s content identity and static-host constraints unresolved.
Sefaria explicitly distinguishes an independent Compare Text view from a
shared-segment bilingual view: TextRange.jsx
renders both texts inside a shared segment, while TextColumn.jsx
keeps comparison columns independently scrollable. MediaWiki
ContentTranslation’s alignSectionPair
uses stable section IDs and height/margin compensation for paired translation
regions in a single editing flow. OmegaT’s Align Files manual
combines automatic matching with manual split, merge, move, and acceptance
operations. Weblate’s Unit model
keeps message IDs and context separate from text hashes. CodeMirror’s
updateSpacers
shows the geometry cost of aligned rows. Together they show why automatic
similarity can suggest a relationship but cannot silently publish a paragraph
map for arbitrary multilingual HTML.
Three reading semantics
The design must name three different behaviors. Independent scrolling gives
each pane its own position and is the fallback for every valid pair.
Anchor-linked scrolling keeps two independent panes and uses shared semantic
anchors to estimate corresponding progress between anchors. It is a nearby
section reference, not permanent paragraph or line alignment. Strict row alignment puts actual blocks into paired rows, uses
the maximum row height and spacers for the shorter side, and needs one-to-many
mapping, missing-block placeholders, and an explicit order policy. It is a
separate later feature.
For OINK, the proposed default depends on mapping quality: enable anchor-linked
scrolling only when the conservative conditions below pass, otherwise use
independent scrolling. The reader can always turn synchronization off.
A pair with zero or one valid internal anchor, duplicate explicit targets,
missing explicit targets, or non-monotonic moved anchors stays independently
readable. Ordinary unmatched sections are content gaps, not invalid targets. A direct “jump to counterpart” action
can still work where continuous synchronization cannot.
Rendering and isolation finding
OINK’s v1.4.0 Docs shell,
content rendering,
Book ID handling, tabs,
table reader, diagrams, and capability-selected scripts make arbitrary
single-DOM body concatenation a large refactor. Two same-origin document frames
preserve each page’s lang, dir, resource base, renderer context, IDs, and
reader ownership. A frame is a document boundary, not an independent process
or a security sandbox; same-origin content remains trusted content. See the
iframe reference
and same-origin policy.
The initially considered path used a prototype with ordinary eligible HTML
pages in two same-origin frames and guards for navigation, keyboard shortcuts,
analytics, comments, and recursive compare entry, then considered an optional
content-only HTML view. The revised first phase keeps ordinary pages for the
implementation too; a dedicated output is only a future optimization if
measurements justify it. Hugo parameters alone cannot
create an output format; any auxiliary output needs explicit output plumbing,
Page Store/capability handling, relative-resource rules, and SEO policy.
Scroll model and bounded conclusions
The useful engine pattern is Joplin’s logical map and VS Code’s mapped rendered
previews. Joplin’s scrollmap.js
and VS Code’s diffScrollSync.ts
support collecting layout-valid anchors, interpolating within intervals, and
clamping positions. The revised translation MVP derives a strictly monotonic
mapping from shared stable heading IDs; it needs no separately authored or
reviewed pair map. Crossing or reordered anchors reject that map;
the engine must not silently choose an LIS, drop moved anchors, or reorder the
document. Geometry is invalidated when fonts, images, diagrams, tabs, details,
or width changes alter layout. A state owner and sequence token prevent
programmatic scroll events from echoing back. The user should keep focus and
pane ownership; ordinary scrolling must not open hidden content or move focus.
An unmatched section is an ordinary content gap when the page and its surrounding
anchors are valid. If valid anchors bracket it, the reader may label the interval
approximate and interpolate through it. In a future manual-mapping feature, an explicit target that does not exist,
is duplicated, or crosses another explicit target is an invalid mapping; it
disables continuous synchronization for the pair rather than becoming an
ordinal fallback. A direct explicit jump can report the invalid target.
The evidence supports a focused proposal, not an implementation claim. The
upstream source investigation did not run the candidate comparison feature,
a server, a browser, accessibility checks, or an eight-language consumer. It also did not prove that every framework lacks
plugins or experimental comparison modes. Those limits are carried into the
proposal’s acceptance matrix and keep the recommendation honest: first prove
normal Docs/Book reading with two panes, then decide whether richer output or
strict row comparison earns its maintenance cost.
Phase-one scope revision
Following the request to simplify on 2026-10-29, the companion proposal now
assumes existing translation siblings with matching heading IDs. Its only site
setting is params.ui.compare: true. Hugo supplies the existing translation
links; the browser chooses one target and displays two ordinary pages in
same-origin frames, with an on/off synchronization switch. The current language
is fixed and only the target needs a selector.
The broader identity discussion above remains research for possible version
comparison. It does not require phase-one compare sets, member IDs, manual
anchor maps, a CLI, new layouts, new outputs, or prebuilt language pairs.
Ordinary pages in frames are the recommended first implementation, not a
necessary step towards a content-only output. The existing host remains behind
the reader: two child documents plus that host means three documents, a cost
to measure before adding another rendering path.
Executed Starter, real-site, offline, upgrade, and reproducible-archive checks for the local CLI candidate.
Historical CLI acceptance snapshot (2026-09-29)
This page records the 2026-09-29 validation of the local 0.1.0-dev CLI candidate at commit e623d93. Current CLI behavior is defined in the CLI and result contract.
Inputs and method
The CLI belongs to the independent oink-cli Go repository. The
CLI and result contract defines its accepted boundary. The
CLI introduction gives reproducible user steps. Hugo remains an
external renderer. Generated sites contain normal Hugo inputs.
Input
Observed baseline
Host
macOS, darwin/arm64
Go
go1.27.1
Hugo
0.166.0+extended+withdeploy
CLI
0.1.0-dev, local commit e623d93d589c49e5c58b8fae1bd5db720fc904cb
Public github.com/pgsty/oink v1.1.0, with recorded Go checksums
Documentation-site theme
Local theme HEAD b0af631 plus uncommitted changes
The Starter archive hash is
e55bde279715f6d8d19d3d88671a2cf7561b515be46915b0f12c640d0ce1d958.
Its recorded projections select an existing language profile, pin OINK v1.1.0,
and set enableGitInfo: false for a new directory. An observed failure required
the last projection. The original enableGitInfo: true caused a
warning-strict build to fail before the site’s first Git commit. No Git
repository or commit was created to hide that failure.
Checks used disposable source copies, module/render caches, and output
directories. Original Starter and consumer source trees were not written by
the CLI checks. Existing unrelated theme and documentation edits were retained.
The counts below describe those inputs and CLI revisions on 2026-09-29.
Starter and ordinary Hugo
All six ordinary-Hugo cases passed --environment production --panicOnWarning, with provisioned modules and isolated caches:
Language profile
Root URL
/manual/ subpath
Reported Hugo pages
en
Passed
Passed
EN 90
en,zh
Passed
Passed
EN 91, ZH 89
all
Passed
Passed
EN 91, ZH 89, FR 89
The tests checked the expected language roots and representative Docs, Blog,
and Book outputs. They compared generated source bytes before and after Hugo.
The public CLI’s init command also passed separately for all three profiles,
returning zero diagnostics and 94 generated source files per profile. The
profiles select different root configurations and disable untranslated sample
files while retaining them in the snapshot.
Starter package unit, race, and vet checks passed. Failure cases cover
nonempty and symlink targets, validation failure, and target replacement after
planning. They also cover cancellation rollback, concurrent modification/deletion,
and archive path rejection. The regeneration script reproduced the fixed archive,
provenance, and license exactly.
Real-site inspection snapshot
Each run below returned CLI exit 0 with zero recorded diagnostics.
Site shape and theme source
Files
HTML files
References
Machine artifacts
Three-language Starter, public v1.1.0, release check at /manual/
316
142
7,042
6
OINK documentation/regression site, local theme HEAD b0af631 plus dirty changes
1,127
506
72,562
8
PIG project site, root Docs/Blog route rewrites, public v1.1.0
1,392
424
64,440
4
Repository documentation with generated catalog, public v1.1.0
3,287
1,635
851,535
12
The last three are local consumer repositories: PIG and the catalog
site validate published-pin resolution, while the OINK documentation run validates
the local theme checkout.
The inspection covered HTML links, anchors, resources, and emitted
machine artifacts. The completed Hugo manifest enumerated 261, 766, 662, and 3,192
output declarations respectively. Every supported enabled machine output was
required by its actual language and URL. Before/after manifests compared all
tracked and non-ignored untracked source bytes, modes, and Git status.
All four sites were unchanged (94, 415, 858, and 2,294 source files respectively).
Two real regressions were fixed during this work. A NAVJSON template
rendered only English. This previously hid the missing Chinese output. The check
now returns policy exit 1 with the missing output location. The check initially treated PIG’s intentional
build.render: link sidebar entries as missing pages. Hugo’s effective build
parameters now exclude them. Direct and cascaded regression cases verify this behavior. A paired build of the bilingual Starter also proved all 223
ordinary artifacts byte-identical before and after adding the isolated probe.
Offline execution and upgrade
On macOS, a full check of an initialized bilingual Starter passed under
sandbox-exec with (deny network*), after dependency provisioning. The
result was exit 0, zero diagnostics, 223 files, 95 HTML files, 4,461
references, and four machine artifacts. A separate English init also passed
under the same OS-level network denial, returning exit 0, zero diagnostics,
and the expected 94 generated files.
A cold-cache fixture requiring example.invalid/oink-cache-miss@v0.0.1
returned CLI exit 2 and retained Hugo’s original
module lookup disabled by GOPROXY=off evidence. A missing dependency was
therefore reported as incomplete work, without silently enabling resolution.
A separate temporary site exercised a real public-module upgrade from v1.0.0
to v1.1.0. The original consumer was not used as a write target:
Operation
Observed result
Preview
Exit 0; candidate validated; applied: false; plan named only go.mod and go.sum
--write --expect-plan
Exit 0; the matching plan was validated and applied
Repeat the same target version
Exit 0; candidate validated; no proposed changes and applied: false
All three operations preserved unrelated dirty README.md content and untracked
user-note.txt. The preview and write used the same plan ID and before/after module-file hashes. Replacement, workspace, dirty-file,
rollback, and failure-protection cases passed the final focused Go tests and
race run. Only go.mod and go.sum changed on write; backup manifests retained
original bytes. Preview and repeat executions preserved all source bytes.
Real thin-wrapper smoke tests also passed in a disposable initialized site.
build --json returned 0 and produced index.html. dev --json served HTTP
200, forwarded SIGINT to Hugo, and closed the listener. Hugo exited 0. The
canceled wrapper reported 2, as specified by the cancellation contract.
These runs used provisioned local caches without --network.
Final make test (all packages plus vet), make test-hugo (ordinary Hugo,
workspace/config precedence, output manifest, missing-language regressions),
and go test -race ./... passed. All three public init profiles were rerun
under OS-denied networking; the cold dependency fixture again returned 2.
Archive and installation preparation
One frozen CLI source snapshot produced four binary archives and one source
archive, plus SHA256SUMS. Rebuilding independently from the source archive
produced the same SHA-256 values for all five archives. The tested packaging
input hash was:
This final snapshot supersedes the intermediate archive experiments. All five
archive checksums were verified and reproduced from the extracted source
archive. Both source and binary archives include the versioned JSON schema,
licenses, dependency pins, and Starter provenance. Local make install into
a temporary prefix and the installed binary’s --version succeeded.
Target
Evidence
darwin/arm64
Compiled; host binary executed; local installation path exercised
darwin/amd64
Cross compiled only; not executed on that architecture
linux/amd64
Cross compiled only; not executed on Linux
linux/arm64
Cross compiled only; not executed on Linux
The archive builder records the toolchain, flags, source-input hash, and
platform targets.
Reproduce the relevant checks
From a CLI checkout with dependencies already provisioned:
make build
make testmake test-hugo
go run scripts/snapshot-starter.go --source ../oink-starter
To repeat rendered-site checks in the sibling layout, keep JSON and logs
outside each consumer’s source tree:
The command reference describes preview, plan review,
and explicit application. Use a separate review copy for write-path testing.
For the archive experiment, keep the same Go toolchain and release version:
make release VERSION=0.1.0-dev DIST=dist/first
mkdir -p dist/rebuild
tar -xzf dist/first/oink_0.1.0-dev_source.tar.gz -C dist/rebuild
make -C dist/rebuild/oink_0.1.0-dev_source release \
VERSION=0.1.0-dev DIST=dist
cmp dist/first/SHA256SUMS \
dist/rebuild/oink_0.1.0-dev_source/dist/SHA256SUMS
Limits and delivery state
State
At this snapshot
Local implementation
Six first-stage commands and versioned result format exist
Executed validation
The runs described above passed for their recorded inputs
Owning checks and documentation-site make check
Passed after implementation and bilingual-document updates
Commit, tag, push
CLI committed locally as e623d93; no tag, remote, or push. Documentation changes remain local alongside existing work
Public CLI release or distribution
Not performed
Consumer source adoption or production deployment
Not performed by these checks
Independent-user study or adoption
No measured 4-of-5 / 15-minute study, retention, or independent-team adoption data
Raw JSON, logs, source-preservation manifests, upgrade recovery evidence, and
archive-verification results are stored in the CLI checkout’s ignored
tmp/acceptance/ directory, with release archives in dist/first/.
This first-stage candidate focuses on existing OINK sites; Docsy assessment and
later migration, theme descriptor, version lifecycle, OpenAPI, MCP, and Studio
remain tracked in the CLI roadmap.
7.8.15 - Component refinement, 2026-10-25
Local four-preset component validation, asset measurements, and separately reproduced gallery baseline failures.
The final review used isolated sibling checkouts based on theme 7f9589f and documentation 855d890, with only this task’s source changes applied. Concurrent PlantUML, toolchain, and workflow work was excluded from the candidate and preserved in the shared worktrees. The accepted implementation is theme commit 15c39ef; guides, contracts, examples, and browser coverage are in documentation commit 81e2be9.
Validation used macOS ARM64, Hugo Extended 0.168.0 with built-in LibSass, Go 1.27.3, Node 26.12.0, and npm 11.20.0. Browser previews used the isolated sibling theme and hugo.yml,tests/fixtures/browser.yml, with both workspace mechanisms, watching, and live reload disabled. Screenshots came from actual documentation output. The bilingual comparison guide owns the reusable examples.
Executed validation
Check
Result and scope
Theme component owners
SCSS/compiler hooks, fonts, presets, content primitives, components, code blocks, and Landing passed. Invalid variants and inapplicable command strips warn and preserve content.
Theme shell/output owners
Shell, actions, palette, keyboard, runtime isolation, and output checks passed. Output security passed on 501 fixture files with the fixture’s intentional third-party embeds enabled.
Real site
make check passed all 64 non-browser tests, including bilingual headings, rendered Markdown, and internal links. Reviewed navigation/backlink additions account for the site’s Markdown golden changes.
Full browser suite
make browser passed 409 Chromium tests. After the last correction to hide an empty command action column without JavaScript, all 20 presentation tests and the SCSS checker passed again against a fresh build.
Presentation coverage
Four presets × light/dark × EN/ZH; 1440/768/390/320px layouts; literal clipboard text; independently operable native and full card links; native disclosures; no JavaScript; print; coarse pointers; reduced motion; forced colors; and Landing feedback width/contrast.
Additional engine review
Chromium 151.0.7922.34, Firefox 153.0, and WebKit 26.5 passed 48 preset/mode/locale combinations covering Tabs, Fields, card links, and 1440/390/320px layouts. The final no-JavaScript command presentation also passed in all three engines.
Visual review
Reviewed actual Paper, Slate, Ink, and Terminal cards, disclosures, Tabs, command strips, and field labels in light/dark and desktop/mobile output. Stable viewport captures preserve each preset’s geometry and reading hierarchy.
Production
The final candidate passed a minified production build. Resource measurements below use the CSS linked by the generated page and the same documentation source for both builds.
The full suite’s A11Y_PATHS covered EN/ZH Presentation, Cards, Callouts, Tabs, Code, and Fields, plus English Badge and Kbd: 14 routes. The existing responsive accessibility matrix ran as well. Presentation axe scans included the article at 390px; the Landing check included its command box in all eight preset/mode combinations. Giscus requests were blocked as in the existing suites.
Asset cost
The exported theme base and the final candidate used the same documentation source and production build mode:
Asset
Before
After
Change
Minified main CSS
528,665 bytes
539,450 bytes
+10,785 bytes
Main CSS, gzip
79,541 bytes
80,887 bytes
+1,346 bytes
Built JavaScript
39 files
Identical hashes
0 bytes
These final measurements supersede the earlier 539,437-byte / 80,856-byte initial refinement measurement. No framework, font, remote asset, or JavaScript dependency was added.
Tab review follow-up
Maintainer review rejected the raised selected Tab. The accepted treatment keeps individual labels transparent at rest, supplies a subtle fill only on hover-capable devices, and uses link color plus a 2px bottom rule for selection. Labels retain the same medium weight and position. Keyboard focus has its own outline; coarse-pointer targets remain at least 44px high. Final engine review verified these states, arrow-key selection, and narrow layouts.
Field names and final corrections
Terminal field names now use the same unboxed, emphasized monospace treatment as the other presets. Both native Markdown tables and full Fields shortcodes were checked in EN/ZH and light/dark output. Ordinary prose code and keycap borders retain their separate role.
Final review reproduced and fixed two further edge cases:
A native card’s stretched title link intercepted a secondary link nested inside emphasis. Secondary controls now remain above that target; pointer checks verify both the nested link and the rest of the card navigate correctly. The title’s keyboard focus outline follows the card’s own shape.
A command strip retained a small empty action column when JavaScript was disabled. The wrapper now disappears until its copy control is available. In all three engines, the source column occupies the full 356px inner width of the 390px sample, while the normal enhanced copy control remains usable.
Baseline failures and limits
Two theme checks fail identically in the exported base and the component candidate:
check-namespace.py: committed blog gallery output uses unprefixed data-height, data-width, data-mode, and data-size, with corresponding unprefixed dataset reads.
check-goldens.py: the committed gallery’s prepaint condition, toolbar icon, and gallery markup are absent from the existing theme goldens. Comparing base and candidate with the checker’s normalizer found no additional difference across all 52 golden surfaces.
The component checker also includes a targeted correction: reject obsolete configuration keys rather than any occurrence of gallery, allowing the valid blog_gallery key.
Local acceptance covers this component change and its two final repairs. Ink and Terminal retain their experimental status. Runtime JavaScript is unchanged.
7.8.16 - Review repairs, 2026-11-06
Reproduced build, feed, navigation and interaction defects, bounded repairs, and remaining review work.
Development evidence
This record describes local changes after v1.5.0. It does not establish a new release, consumer upgrade, or deployment. The original review’s roughly 170 entries have not all been accepted or fixed.
Inputs and method
The review started from theme 84b93e4 and documentation a8eeb92.
The candidate keeps Hugo Extended 0.168.0 and its built-in LibSass, with Go
1.27.3, Node 26.12.0, npm 11.20.0, and Python 3.14.8 on macOS ARM64.
The Hugo 0.169.0 executable on the normal system path is outside this validation
baseline. Its golden differences are not evidence of a defect on 0.168.0.
Build and output claims were checked with synthetic inputs in the owning theme
checkers. Interaction claims were checked against the sibling documentation
site through Playwright. Browser previews used the local theme replacement and
hugo.yml,tests/fixtures/browser.yml, with both workspace mechanisms, watching,
and live reload disabled. Existing passing snapshots were reviewed before
recording intentional changes.
Confirmed defects and repairs
Area
Confirmed behavior and repair
Repeatable evidence
Invalid input
Positional arguments reached map-only shortcode operations and failed the build. Named-parameter guards now warn and safely omit or fall back. Negative checks require exit status zero.
check-content-primitives.py, check-book.py
Book numbering
Invalid numbers produced empty targets such as fig-. Unnumbered content now retains readable output without target registration.
check-book.py: HTML, print, Markdown, BookManifest and index rows, with valid-number controls
Nested components
Independent Markdown documents and sibling shortcode containers reused local ordinals. Generated IDs and their references now include the containing scope. Authored code IDs are preserved.
check-code-blocks.py: repeated nested code, fields, charts and FileTree in HTML and print
Feeds
Weight-based order was limited before date sorting, undated items emitted year-one dates, and several components emitted raw Markdown. Both feeds now sort before limiting and omit unavailable dates; components use static HTML or their documented omission.
Missing manual references could fail Hugo; version links could repeat the deployment prefix. Shared resolvers now provide warning fallbacks and join version paths once.
check-agent-indexes.py, check-actions.py
Navigation under subpaths
Language-neutral navigation IDs and section-index keys retained the deployment prefix. A shared key resolver now removes deployment and language prefixes while published links keep both.
check-agent-indexes.py: EN/ZH under root and subpath deployments, with and without a default-language directory
Landing
Invalid record shapes and optional fields could break Markdown output. HTML and Markdown now share record and URL validation, preserve fragments and queries, and include standalone CTA links. Unsafe targets do not become empty links.
check-landing.py
Blog navigation
List pages inherited article-sequence navigation and English pagination. Localized semantic pagination now owns list navigation and head links.
Native disabling removed focused controls; hidden self-links were unreachable; focus-opened menus reopened after Escape. Guarded aria-disabled controls retain focus, self-links remain reachable, and Escape restores focus before closing.
JS units and browser code, shell, comparison and Expo suites
Mobile shell
Navbar-only articles lacked mobile utilities, and closed sidebar drawers leaked a shadow. Site drawers now expose language, version and repository links; shadows appear only when open.
check-shell.py, responsive browser regressions
Layout
Book TOCs displayed two counters, prose margins affected component lists, Landing padding was overridden, and global link rules suppressed print underlines. The owning rules are now scoped correctly.
Browser review regressions and SCSS checks
Locale and schema
Pagination and breadcrumb labels were untranslated; several locale strings and the appearance legend were incorrect; the schema rejected language-code translation notices. Labels now cover all 32 locales and generated schemas match the resolver.
check-i18n.py, generate-config-schema.py --check
Preset and alternate rendering
Terminal’s current-row chevron selector was wrong; focus rings were translucent or clipped; forced colors hid current-state cues; the RTL artifact overwrote font roles. Targeted rules now retain these states. Repeated marquee rows are hidden from assistive technology.
Preset/SCSS checks and browser accessibility coverage
Qualifications to the original review
The original report’s severity labels grouped build failures, accessibility
defects, wording, and design preferences together. They should not all be treated
as release-blocking failures. Reproducible build and output defects deserve the
first repair batch; cosmetic consistency needs its own acceptance criteria.
“No TOC” does not mean “empty right rail.” Blog indexes can still contain author,
category, series, and tag clouds. Removing the fallback control made that rail
impossible to collapse and failed the existing RSS/browser regression. The final
repair omits genuinely empty rails and labels populated non-TOC rail controls as
sidebar actions. It preserves collapsing, focus restoration, and RSS access.
RSS fixes do not require every component to appear in feeds. Release assets keep
their explicit omission. The Book checker now exercises the ordinary section
feed instead of treating raw RenderShortcodes output as the RSS contract.
Different corner radii, duplicated template shells, and native/shortcode layout
differences are maintenance or design concerns until a specific contract or user
failure is demonstrated. Merging base templates solely because their bytes are
equal can change Hugo lookup precedence. No such broad consolidation is included.
Validation
The theme’s focused checks, schema parity, 32-locale parity, 80 JavaScript tests,
and 90 migration tests were run on the fixed toolchain. Output changes cover 52
HTML, print, Markdown, RSS, and LLMS golden surfaces. These checks are local unit
and output evidence; the separate CI PDF/EPUB publication job is not claimed.
The documentation site’s final make check passed, including all 64 non-browser
tests, with a larger Node heap for its rendered-link scan. A local production
build also passed and generated 462 pages per language, with only the accepted
upstream LibSass deprecation warning. The first browser pass completed all 30 accessibility tests;
the responsive group passed 117 tests after retaining the taxonomy rail control.
The other canonical browser groups also passed in their respective runs: keyboard
16, content components 70, code blocks and Landing 37, PRD5 8, theme color 10,
community feedback 42, appearance 53, Expo 50, gallery 8, PlantUML 8, diagrams
19, table reader 15, standard comparison 19, and eight-language/RTL comparison 6.
The canonical browser set totals 508 passed tests across these runs. A later
focused accessibility run passed all 30 cases on the new research and blog pages.
After the Escape correction, a fresh shell, blog and menu regression run passed
56/56. The final Landing checker passed after its metrics links were routed
through the same URL policy.
The browser counts describe this repair candidate before separate comparison
interface work appeared in the shared checkout. That concurrent work is outside
this record’s browser acceptance. The completion audit additionally verified
navigation keys under language/deployment prefixes and invalid Book numbers in
HTML, print, Markdown, BookManifest, and the generated indexes.
Remaining work and order
This is a bounded repair batch. The following work remains outside its acceptance:
Reader control over single-character shortcuts, command-palette handoff and
localized error messages, and plural-aware contributor/search/code counts.
Non-default-language Google search destinations and the documented meaning of
relative content URLs.
Remaining contrast cases and the previously recorded narrow, large-text footer
overflow. These require their own rendered reproductions and browser checks.
Geometry, interaction-state and overlay tokens, remaining manual-link owners,
shared shell structure, and stylesheet size. These need bounded design decisions
and measurements rather than a blanket replacement of literals.
The component,
shell,
architecture, and
Landing contracts describe
this batch’s development behavior. Historical release claims remain unchanged.
7.8.17 - Ink and Terminal need reading acceptance
Source review, bounded visual evidence, current failures and promotion limits for Ink and Terminal on 2026-10-26.
Pre-release research snapshot (2026-10-26)
This record preserves inputs and measurements from before the OINK 1.4.0 release preparation. At 320px with a 32px root/default font, footer links cause document overflow across all four presets. Ink and Terminal remain experimental; the stabilization proposal defines desired behavior and promotion gates.
Keep Ink neutral sans editorial and Terminal a readable engineering handbook. Both can become coherent official styles through their existing role system and shared shell. A new serif identity would weaken Ink’s distinction from a future Folio; a simulated terminal would weaken long-form engineering reading. The immediate work is shared text resilience, quieter hierarchy, and component consistency.
The evidence identifies a local snapshot
This 2026-10-26 review combines primary-source text/HTML/CSS inspection, an exported source snapshot, real documentation rendering, and a bounded injected CSS comparison. Theme HEAD was 7bc8658bc1be13ef0ad3050b9d9f6862f8f1f65f; documentation HEAD was 99751179eefada3fa7a91318c792ddac46d7e6bf. The snapshot also included uncommitted changes, including concurrent table work; the retained source manifest records that full state. Public tag lookup observed v1.3.2, peeled to bd2e856e6e2f7027a9189af009701f5b8cf562cf; documentation pinned v1.3.2. See the earlier experiment and component review for prior context.
The documentation server used the sibling snapshot with hugo.yml,tests/fixtures/browser.yml, both workspace mechanisms off, memory rendering, no watching/live reload, and enableGitInfo=false because the export lacked Git metadata. Tools were macOS ARM64, Hugo Extended 0.168.0, Go 1.27.3, Node 26.12.0, npm 11.20.0, and Playwright 1.62.1; engines were Chromium 151.0.7922.34, Firefox 153.0, and WebKit 26.5 (Playwright WebKit scope).
The reproducible method loads the same real route, language, mode, and preset at each width, compares baseline with the listed overlay, records full-document dimensions and computed styles, then captures relevant components. Source manifests, review-metrics.json, api-supplement.json, text-resize-findings.json, stress-metrics.json, reference-rendering.json, and screenshots are stored outside Git.
Whole-document overflow outweighs targeted passes
At 320px/32px root font, English Ink had scrollWidth=424 (+104px), Terminal 408 (+88px). Chinese Chromium overflow was +12px/+21px respectively; English Terminal also exceeded 768px by 11px. The overlay produced the same failures. Firefox’s font.size.variable.x-western=32 preference reproduced English overflow across all four presets; Paper reached 413px and Slate approximately 400px. Footer links including “Customization”, “Components”, and “Docsy discussions” exceed two narrow columns. This is a shared baseline blocker across all presets.
These probes exercise CSS root enlargement and native default-font preferences. Combining 320px width with enlarged text is a stronger stress condition than standalone reflow. Full manual 200% text enlargement and 400% browser zoom remain pending (Resize text, reflow).
Owning checks: check-presets.py passed text/link/accent checks over three surfaces, mode parity, frozen Slate, and configuration output; check-font-tokens.py passed.
Existing suites: 28 appearance-engine, text-reflow, and component tests passed. Their page-context/topline assertions missed the footer. The source-snapshot make check passed 64 non-browser tests before these documents were added. With the new documents, the site built and passed Markdown, bilingual heading, and internal-link checks; 63 of the 64 non-browser tests passed, with llms.txt golden differing only by the two new English document entries.
Main measurement matrix: Chromium: 11 valid routes × two presets × two modes × EN/ZH × 320/390/768/1440px × baseline/overlay. Firefox/WebKit: presentation/configuration/Book only at 320/1440px. Normal-size pages showed no document overflow.
Counting correction: The initial ledger’s 960 entries were computed-state observations. A mistaken API route produced 32 harness 404s; the corrected /docs/write/openapi/ supplement contributed 64 valid observations with HTTP 200 and no document overflow.
Additional stress: 64 simultaneous spacing observations used line-height 1.5, paragraph margin 2em, letter spacing .12em, and word spacing .16em; no page/heading overflow was observed. Sixteen 320px long-unbroken heading/Field-label probes preserved text without page overflow.
axe: 32 article scans at 390px covered presentation/configuration, both languages/modes/presets, and baseline/overlay. No violations were reported; all scans retained contrast incompletes on aria-hidden=true pager-arrow spans with non-text characters, which require manual graphic-contrast inspection.
Visual material: The archive contains 352 comparison captures, including Blog/Expo/Mermaid/ECharts scenes, plus eight external references, from which representative desktop/mobile and light/dark pages and controls were reviewed.
Long reading: The real EN/ZH /blog/oink/oink-implementation-diary/ article was checked in four selected combinations: Ink EN/1440/light, Ink ZH/390/dark, Terminal EN/390/light, and Terminal ZH/1440/dark. Baseline/overlay captures at top/middle/footer produced 24 additional images; normal-size document overflow was zero throughout. Eight representative images were inspected, including English before/after prose, Chinese prose, Terminal’s English mobile footer, and Ink’s English desktop opening.
The Chromium routes were home, Presentation, Configuration, Fields, Code, Table, Book structure, immersive-reading Blog, Expo studies, Mermaid, and ECharts, plus the corrected OpenAPI guide, with Chinese peers included. The capture pass also verified the first rendered Mermaid diagram and an ECharts canvas. The comparison gallery spans 11 scenes; seven control scenes cover both presets, modes, languages, and two widths. Offsite requests, including Giscus, were blocked in the main matrix.
The overlay tests a limited editorial change
Ink kept its palette/fonts while changing article h1 from 800/-.035em to 750/-.025em, h2/h3 from 750/-.025em to 700/-.012em, and its 2px emphasis top rule to a 1px existing strong-line rule. It removed enforced uppercase/tracking on minor/table/callout headings, used zero Chinese heading tracking, and compared native underlines at max(1px,.06em)/.22em, with Chinese .25em and skip-ink: none.
Terminal kept teal/mint and amber, used heading weight 600/zero tracking, removed generated heading prefixes and callout brackets, changed descriptive table headers to body 0.875rem/600 and search titles/excerpts to body, and reduced decorative code/tab/table/callout frames to the existing border role. Technical paths/controls stayed mono and Field names stayed unboxed. FileTree’s omitted literal 0.6rem radius became 0px/2px for Ink/Terminal. Flat Tabs, mobile targets, and vendor boundaries remained intact. The overlay tested CSS adjustments only, without adding new theme templates, fonts, runtime, or configuration.
Authored accent colors on actual pages were documentation blue #245f94/#5da2dd, Book orange #9a3412/#fb923c, and Blog violet #6d28d9/#a78bfa. Separately labeled palette probes reset only that authored accent to the preset default on both variants for controlled comparison. The architecture contract preserves overrides and the shared shell.
Palette calculations expose state risks
Opaque sRGB calculations and alpha compositing used source tokens and the WCAG luminance formula; displayed ratios are rounded while pass decisions use unrounded values (Contrast method, palette source).
Pair, light / dark
Calculated contrast
Implication
Ink accent #c8102e on white / #ff5c4d on #0b0b0b
5.88 / 6.46
Retain mode-specific red; keep red accents focused rather than repeating decorative red rules.
Terminal body on canvas
14.88 / 13.64
Strong neutral reading pair.
Terminal link on canvas / secondary surface
6.31 / 9.54; 5.75 / 8.73
Existing teal/mint supports these exact surfaces.
Terminal tertiary text on secondary surface
4.63 / 5.93
Light muted text has little margin for further tint/opacity.
Terminal amber on canvas
5.47 / 9.44
Amber remains a separate emphasis role.
Terminal 32%-alpha border on canvas
1.97 / 2.36
Suitable for decorative rules; insufficient if it alone identifies a required control or state.
Terminal 55%-alpha strong line on canvas
3.63 / 4.73
Candidate functional boundary on these canvases.
White on dark mint #4cc9bd
2.02
Avoid white labels on light mint fills.
Cross-mode reuse fails ordinary text contrast: mint on the light canvas is 1.85, dark teal on the dark canvas 2.79. Semantic tones, author accents, syntax comments, selected search excerpts, focus, and text-selection composites still require state-specific review. Non-text contrast applies to necessary identifying boundaries (WCAG 1.4.11).
Mature precedents support roles, not transplantation
All external references were accessed 2026-10-26. External Chromium rendering at 1440/390px returned HTTP 200 for Tufte, GOV.UK Headings, Effective Go, and A List Apart. Eight captures were saved, with visual review focused on Tufte desktop, GOV.UK mobile, Go mobile, and A List Apart desktop; the remaining precedents received source review.
Review complete paragraphs before display titles, while keeping OINK’s bilingual rhythm and open-source font constraints.
Tufte CSS. Inspected desktop shows a narrow serif reading column and underlines. CSS declares ET Book, light #fffff8/#111, dark #151515/#ddd, and mobile note toggles.
Borrow proximity of explanation/figures and note hierarchy; leave serif/margin geometry to future Folio exploration.
GOV.UK Headings. Inspected mobile view has generous sans headings and underlined links; cookie banner was visible. Current type scale uses 19px/25px body sizing on small and large screens. Links distinguish prose from navigation; tables emphasize structure.
Strongest functional input for Ink’s sans hierarchy and persistent link cues, adapted to OINK’s bilingual scale and dark mode.
A List Apart: A Dao of Web Design. Inspected desktop distinguishes serif body from sans headings/controls. Current CSS uses Georgia 1.125rem/1.7, red #ba3925 h2, and blue links.
Separate reading/UI/code roles and keep adaptable content while keeping Ink’s sans-serif identity and restrained accent frequency.
Rust Book: Ownership. Source exposes numbered chapter structure, explanations, and code; CSS separates Open Sans prose and mono code.
Strong Terminal precedent for explanation/syntax separation and real chapter numbers, while keeping OINK’s mono headings and standard browser shortcuts.
Effective Go. Source/CSS separates platform sans and mono; inspected mobile TOC is dense and two-column.
Borrow straightforward technical hierarchy while keeping OINK’s responsive TOC.
man7 open(2). Stable reference sections, signatures, links, and preformatted text; (2) names a manual section.
Preserve predictable lookup and complete identifiers without forcing bilingual prose into fixed-width terminal cells.
CLI Guidelines. A navigable explanatory web guide recommends intentional, limited color.
Borrow restraint and clear labels while keeping standard web interaction semantics.
Paper’s warm general reading, Slate’s established technical presentation, Ink’s neutral editorial restraint, and Terminal’s technical role contrast remain distinct within the shared shell.
Language and accessibility need independent evidence
Actual Chromium per-glyph inspection on macOS found Inter for Ink Latin, IBM Plex Sans for Terminal prose, IBM Plex Mono for Terminal headings, and PingFang SC for Chinese in both. Windows and Android fallback rendering still require direct device verification (CSS font matching, Windows fonts, Android fallback).
Chinese underline clearance remains open. The CSS Text Decoration Working Draft explains Han collisions and fragmented ink skipping; CLReq’s Group Note Draft discusses interlinear marks without banning hyperlink underlines. Next steps should compare language-scoped text-underline-position: under with a small offset and initial skip-ink: auto, including Chinese inside English pages and mixed-script wrapped links (CSS draft, CLReq).
WCAG A/AA governs color-independent meaning, text/non-text contrast, keyboard operation, resize, reflow, spacing, language, and status announcements. OINK’s proposed 44px routine touch targets, 7:1 main text, and stronger 2px-area focus treatment are tracked as project targets above AA minima (WCAG 2.2, axe-core, focus appearance).
Still pending are actual Windows/Android loaded/blocked/system-font comparisons; branded Safari/iOS rendering; manual NVDA, VoiceOver, and TalkBack tasks; full manual 200%/400% zoom; and comprehensive keyboard, forced-colors, and state-contrast review covering navigation, Book numbers, table relationships, field errors, Chinese search input, status feedback, and dialog return focus.
Promotion should follow resilient reading
The footer overflow highlights the need for whole-document regression checks alongside article-top checks. Shared repair and whole-document regression should therefore precede preset promotion. FileTree’s radius leak and competing Terminal punctuation are bounded owner-level changes.
For 1.4, refine existing owners and promote Ink or Terminal independently once their acceptance gates close; otherwise retain experimental status. Folio (academic serif) and Canvas (creator geometry) remain deferred to avoid font/licensing and QA overhead in this cycle.
7.8.18 - OINK 1.5.1 readiness review, 2026-11-06
Three reproduced candidate regressions, complete browser acceptance, and remaining publication gates.
Local repair acceptance complete
The three reproduced regressions below have been repaired in the working trees and the targeted, theme, site, and browser checks pass. This dated review does not announce a release, consumer upgrade, or deployment.
Inputs and method
The review covered theme v1.5.0 (84b93e4) through c55849e: all six
post-tag commits and 186 changed files. The documentation site was 43990ac.
Theme main was three committed changes ahead of origin/main (d9ad654).
Both working trees were clean before the initial review. Its original evidence
is retained below; the later repair pass is recorded separately. No tag, push,
consumer update, or deployment was performed.
The formal local toolchain was Hugo Extended 0.168.0 with built-in LibSass,
Go 1.27.3, Node 26.12.0, npm 11.20.0, and Python 3.14.8 on macOS ARM64.
CI uses Node 24. Supplemental Hugo 0.169.0 checks do not replace the pinned
baseline. The accepted upstream LibSass deprecation remained visible.
Methods included implementation and contract inspection, the ordered theme CI
commands, sibling-site checks, production builds, Chromium tests, and controlled
minimal reproductions. Temporary fixtures and generated artifacts stayed outside
Git. Local-theme and published-module checks used separate commands with both
workspace mechanisms disabled.
Confirmed regressions
P2: RSS format restoration contaminates another render
The final assignment in layouts/_partials/content/rss-description.html
restores a captured tdOutputFormat into the page Store, which shortcodes also
read. In the reproduction, a summary render restores html while the page’s
RSS shortcode render still uses that Store, producing mixed static and
interactive output.
The formal bin/check-release-assets.py run failed because the RSS checksum
table header disappeared and data-td-asset and <button appeared. A standalone
rerun and eight single-page reproductions passed; rerunning until green does
not resolve the original failure.
For a more reliable reproduction, expand that checker’s RSS fixture to 24
RSS-only pages, each with release-card and 20 release-assets blocks. Keep
its custom layouts/docs/single.rss.xml, which sets tdOutputFormat to rss
before .RenderShortcodes, and keep the ordinary home feed enabled. Build
fresh output on Hugo 0.168.0 and inspect each page XML for interactive markers.
Three candidate builds all contaminated docs/rss-9/index.xml. One captured
output had six static tables, fourteen interactive tables, and 28 buttons.
The same fixture against published v1.5.0 passed three times. Overriding only
the candidate summary partial to omit the final Store restoration also passed
three times.
The confirmed scope is the custom RSS-page render exercised by the required
checker, not every ordinary feed. Keep format state stable within its rendering
context and add multi-page coverage while preserving HTML, Print, and normal
RSS summaries. The temporary removal was a causal probe, not an accepted fix.
P2: Blog pagination duplicates Print aggregates
layouts/_partials/head.html calls shell/blog-index-state.html for every blog
section, including Print. That partial calls .Paginate, so Hugo generates
Print archive pages that each contain the entire section.
Use three dated blog posts, outputs.section: [HTML, print], and
params.ui.blog_index_size: 1. The candidate generates
_print/blog/index.html, _print/blog/page/2/index.html, and
_print/blog/page/3/index.html; all three contain all three bodies. Overriding
only head.html with its v1.5.0 version generates one aggregate. Both builds
succeed on Hugo 0.168.0.
The documentation site’s production build also adds four duplicate aggregates
across its English and Chinese blog roots and release indexes, totalling
1,120,141 bytes. Large archives amplify this waste. Limit blog-index pagination
and its head links to HTML, then verify one Print aggregate and correct HTML
pagination links.
P2: A stalled Duo View document never reaches Retry
assets/js/document-compare.js returns immediately for about:blank, including
when its 15-second timeout calls ready(true). A pending main-document request
therefore consumes the timeout without invoking failure handling. Loading and
busy states remain without Retry or a direct-link fallback.
In the sibling site’s browser fixture, open /tests/compare-reader/ and hold
/zh/tests/compare-reader/?oink_compare_pane=1 pending with a Playwright route.
Open Duo View and wait 17 seconds. The source pane is ready, the target remains
about:blank, and there is one loading note, zero failure panels, and zero Retry
buttons.
This is not covered by the existing 404 and slow-image tests. Timeout expiry
must fail a still-blank document while ignoring its initial blank load event
and preserving parsed articles with slow images. Add the stalled-document case
to the site’s comparison suite and retain the localized fallback promised by
the shell contract.
Initial validation
Check
Result and scope
Theme CI commands
48 of 49 runnable steps passed on Hugo 0.168.0. The release-assets RSS step failed; theme acceptance is not all green.
Passed, including 67 Node tests and source, translation, rendered-Markdown, and rendered-link checks.
Site make browser
A single complete invocation passed 518 Chromium tests in approximately 23 minutes. A11Y_PATHS was unset: the sitemap scan was unrestricted.
Candidate production build
Passed with the local theme and ordinary production configuration. Only the accepted LibSass warning appeared. Print duplication was inspected separately.
Publication isolation
All three PDF safety tests passed with real Chromium, including remote CSS blocking and disabled scripts.
Publication smoke test
Current-candidate EPUB/PDF generation and owning artifact checks passed: five chapters, 31 EPUB targets, and a 23-page PDF. Local Pandoc was 3.12.1. The CI-pinned Pandoc 3.10, Java 21, EPUBCheck, and subpath matrix were not rerun locally.
Published baseline
Go proxy v1.5.0 resolved to 84b93e4 with the site’s recorded checksums. The release-pin check and production build passed with replacements and both workspaces disabled.
Browser groups passed 30 accessibility, 117 responsive-shell, 16 keyboard,
70 content-component, 37 code/Landing, 8 PRD5, 10 theme-color, 42
community-feedback, 53 appearance, 50 Expo, 8 blog-gallery, 8 PlantUML,
19 diagram, 15 table-reader, 26 standard comparison, and 9 multilingual
comparison tests. The local sibling theme used
hugo.yml,tests/fixtures/browser.yml and the separate eight-language comparison
fixture. Firefox and WebKit were not rerun.
The suite at the initial review did not cover the additional stalled-request and Print
cardinality cases above. The earlier
review-repair record
explicitly excludes later Duo View work from its 508-test result; this review
supplies fresh evidence for the current candidate.
Repair verification
The repair pass changes the working trees based on theme c55849e and site
43990ac. The changes remain uncommitted and are not included in the remote CI
runs linked below.
RSS summary rendering no longer restores the stale format value. The owning
release-assets checker now renders 24 RSS pages with 20 asset tables each
alongside the home feed, asserting every static table and checksum and the
absence of interactive controls. A temporary override with the pre-fix
partial fails this check; the repaired partial passes.
Blog pagination in the shared head is limited to HTML. The reading checker
verifies one complete Print aggregate, three distinct HTML archive pages,
correct HTML prev/next links, and no Print pagination links. A temporary
override with the pre-fix head generates three Print aggregates and fails;
the repaired head passes.
Duo View distinguishes document timeout from the initial blank load event.
The new browser case holds the target document pending, checks the Retry
label and direct link, and verifies that Retry restores the pane when the
request can proceed. It passes with the repair. The earlier slow-image case
continues to cover readiness without waiting for all resources.
The bilingual architecture and shell contracts and the theme’s Unreleased
changelog accompany these fixes. The site’s LLMS golden gains only the new
research-page entry; the output diff was reviewed before updating it.
Repair acceptance
Result
Theme CI commands
All 49 locally runnable steps pass on Hugo Extended 0.168.0, including 81 JavaScript, 90 migration, and 22 snapshot/consumer-tool tests.
Site make check
Passes all source/rendered checks and 67 Node tests.
Site make browser
Final complete invocation passes 519 Chromium tests: 510 in the main suite and 9 in the eight-language comparison suite. A11Y_PATHS was unset, so sitemap accessibility coverage was unrestricted.
Production build
Passes with the local theme. Each EN/ZH blog and release index has one Print aggregate and no Print pagination links; all four duplicate aggregates are gone.
Browser acceptance uses the installed Playwright browsers without an executable
path override, allowing the bfcache case to select full Chromium. That case and
the new stalled-document Retry test also pass individually. These results use
the same local tool versions recorded above; the publication-toolchain limits in
the initial validation still apply.
All three reproduced regressions are locally resolved. The next release gates
remain commit and push of the reviewed changes, green remote CI for that exact
revision, then the separate tag, Go-proxy, consumer-pin, deployment, and
production-identity states.
Publication and adoption
The latest observed public tag remains v1.5.0. The green
theme CI run, including
Book publication, belongs to d9ad654, not local c55849e. The green
site checks
and browser workflow
also tested the remote theme available then. They do not certify the three
later local commits.
A read-only bin/update-consumers.py v1.5.0 inventory found 50 primary
checkouts: 42 current, three module consumers skipped for non-default branches,
and five classic themes/oink consumers. All 45 module pins were v1.5.0.
Four classic theme repositories were clean at the exact v1.5.0 tag. The remaining
source copy matched sampled implementation files; that is not a full identity
audit. No consumer was upgraded or deployed. The skipped branches and classic
copies need individual handling during eventual adoption.
Release exit criteria
The three repairs, their owning checks, browser coverage, and bilingual
contracts are present locally, and the working-tree acceptance recorded above
is green. The next gate is green remote CI on the final release commit.
Deferred design and accessibility work from the earlier review remains
a separate backlog; this record does not claim every historical finding is fixed.
After code acceptance, prepare the 1.5.1 changelog and current version references,
push reviewed commits, and verify CI for that revision. Tagging, push and Go-proxy
verification, consumer pinning and appearance checks, deployment, and production
identity are separate subsequent states. Those future steps are normal release
preparation and remain distinct from local repair acceptance.
7.8.19 - Dependency acceptance, 2026-11-11
Functional, failure-path and browser acceptance of the local dependency migration after OINK 1.5.1.
Local candidate
This record covers the dependency migration after theme ef3f119
and documentation 18cca3d. It does not establish a release, consumer upgrade
or deployment. The published baseline remains OINK v1.5.1.
Inputs and method
The dependency contract
owns the versions and migration boundaries. Initial runtime acceptance used macOS ARM64,
Hugo Extended 0.168.0 with built-in LibSass, Go 1.27.3, Node 26.12.0,
npm 11.20.0 and Python 3.14.8. Both workspaces are disabled; the documentation
site selects the sibling theme with a command-local module replacement.
Theme checks build fresh fixtures. Final browser previews disable watching and
live reload. Production checks use a fresh minified build under /preview/.
Algolia, the demo API and server-mode PlantUML receive controlled responses;
these tests check browser clients, not remote service availability.
Repairs found during acceptance
Area
Reproduced issue and repair
Markmap appearance
Open notes retained their old palette. They now follow color-mode and preset changes without triggering animated SVG transitions.
Markmap animated unfold
Animated stateTween unfolding inserted child SVG nodes after the initial render event, leaving links nameless and note markers unlabeled. A scoped MutationObserver and explicit SVG link :focus-visible style now keep ARIA attributes and focus rings live across transitions.
Markmap keyboard and Duo View
Focus-induced smooth scrolling could dismiss a newly opened note, SVG <a> links (SVGAElement) broke Duo View click routing, and open ARIA note dialogs or redrawn markers conflicted with Duo View shortcuts. Opening finishes smooth scrolling first, Duo View resolves SVGAElement URLs and yields shortcuts to open ARIA dialogs, and note focus resolves live SVG markers.
Markmap authoring
Included Markmap fences wrote capability flags to the snippet page instead of the host page, missed CRLF front matter, and repeated legacy-option warnings across non-HTML outputs. The render hook now targets the host page, accepts CRLF headers and warns once in HTML.
Markmap failures
A missing note chunk left its content inaccessible. The affected map now restores complete Markdown and focus, disconnects its listeners and leaves other maps usable.
Markmap print and links
Floating notes appeared in print, and vendor links lacked adequate light-mode contrast and underlines. Print hides the panels; note links now use the article’s link color and an underline.
ReDoc frame origin guard
Navigating directly to redoc-frame.<hash>.html?spec=https://... previously loaded arbitrary remote specs. Cross-origin specs now require embedding inside a same-origin .td-redoc__frame with the matching authored URL.
Asciinema
No JavaScript or a missing bundle left an empty player. Fetch/parse errors also lost the recording link. HTML now starts with a link, and synchronous or asynchronous errors restore it together with any player focus.
Validation evidence
Before the toolchain refresh below, the theme’s owning checks passed: vendored inventory/checksums, built-in Sass,
output structure, namespace, configuration and locale parity, 52 output goldens,
82 JavaScript tests and 90 migration tests. The media golden intentionally
records the recording link and its word-count effect. The documentation site’s
make check and canonical browser groups cover accessibility, responsive shells,
keyboard navigation, components, code, appearance, Expo, galleries, diagrams,
tables and document comparison. Failed cases were repaired and their owning
suites repeated before acceptance: 544 canonical browser cases pass across
those runs, including the four new open-note accessibility cases.
The final dependency suite defines 23 cases per engine (verified across Chromium
and WebKit after the final review repairs, alongside the initial 63-case
three-engine pass), with another 4 explicit-service cases per engine. Diagram layout and math
compatibility pass across those engines. Coverage includes:
ReDoc independent routers, article anchors, copy, downloads, external links
and missing specs/modules; Swagger expands operations and sends a mock API request.
DocSearch configured indices, results, navigation, keyboard dismissal and
recovery after service errors; PlantUML UTF-8 encoding, SVG ID isolation,
persistent cache reuse and unavailable IndexedDB/local storage.
Real terminal playback/pause and theme changes; missing or invalid recordings;
rich Markmap notes, math, sanitization, focus, missing chunks, fit/pan and hidden
containers; Mermaid ELK and existing controls, KaTeX, Infographic and ECharts.
Visual review covers EN/ZH, 390/1440 px, light/dark, print and disabled JavaScript.
Open notes pass eight WCAG AA scans and forced-color visibility checks. The
production subpath build loads fingerprinted local assets without page overflow
or unexpected external dependency requests. Optional site analytics/comments
are blocked during deterministic review.
Toolchain refresh
The subsequent refresh uses Go 1.27.4, Hugo Extended 0.169.0, Node 26.13.0
and npm 12.2.2 on macOS ARM64. All 27 direct vendored dependencies match the
npm registry’s stable releases; the documentation site’s direct dependencies
have no available updates. Compatible transitive dependencies were refreshed,
including the Markmap build’s KaTeX and highlighting dependencies. Both npm
dependency sets report zero audit findings. CLI dependencies used by builds
and tests are current, including golang.org/x/mod 0.43.0; go mod verify
passes. Unused upstream module-graph entries retain their upstream constraints.
The 43 theme checks, 82 JavaScript tests, built-in Sass check and documentation
make check pass with the new toolchain. Hugo 0.169.0’s plain-text spacing,
the updated toolchain examples and the search close-button name account for
the reviewed golden changes. CLI offline tests, go vet, and actual Hugo
integration pass after repeating the application suite with its corrected deadline.
The release-pin regression now expects Hugo 0.169.0. Real CLI integration
commands receive a two-minute test deadline because one command can perform
several isolated Hugo renders; the integration target has a 30-minute ceiling.
Axe 4.14 caught a label/name mismatch in the search close button. Its localized
name now includes the visible Esc key; the owning output checker covers it.
The updated browser also exposed intermittent focus loss when Duo View’s
language menu moved across the narrow breakpoint. CSS could hide the old host
before the media-query callback captured focus. Host visibility now changes in
the same runtime update as the move, and the browser checks exercise both
899/900 px and 390/1200 px with the menu open and closed in LTR and RTL.
Publication checks use Pandoc 3.13, EPUBCheck 5.4.0, Temurin 27.0.1.0.2 and
Chrome headless shell 157.0.8103.50. Root and subpath EPUBs pass both structural
checks and EPUBCheck without warnings or errors. Both PDFs pass page, title and
content checks, and all three PDF isolation probes pass, including the real
browser case. Downloaded tools and publication artifacts remain outside Git.
With Playwright 1.65.0, the initial runs and focused repair reruns cover all
546 canonical Chromium cases. The final engines are Chromium 158.0.8127.18,
Firefox 159.0 and WebKit 27.2. Firefox and WebKit each pass 39 dependency,
diagram-layout and math cases plus four service cases. All nine multilingual
Duo View cases pass in each engine; the Escape test establishes its keyboard
origin explicitly because pointer activation does not focus buttons in every
engine. The 27 ordinary Duo View and history cases also pass after the fix.
A separate production build resolves the published OINK v1.5.1 pin with module
replacements removed and both workspaces disabled. The advertised version and
module pin match. This verifies compatibility of that published version with
the new toolchain; it does not publish the local theme changes.
Before committing, the theme’s vendor, comparison, Palette and 52 golden checks
and the documentation site’s make check pass again. The CLI toolchain changes
are also tested independently on its committed source: module verification,
offline tests, go vet and actual Hugo integration pass. The CLI’s separate
feature work remains in the working tree and is outside these commits.
Repetition and limits
Run the theme checks in AGENTS.md, then the site’s make check and make browser.
The service suite is included in test:content-components. From the documentation
checkout, with the pinned Hugo on PATH, repeat the engine gate with:
exportGOWORK=off HUGO_MODULE_WORKSPACE=off
exportHUGO_MODULE_REPLACEMENTS="github.com/pgsty/oink -> $PWD/../oink"npx playwright test tests/browser/dependencies.spec.mjs \
tests/browser/diagram-layout.spec.mjs tests/browser/math-compat.spec.mjs --browser all
npx playwright test --config playwright.dependencies.config.mjs --browser all
DocSearch 5.2 presents exhausted transport retries as an empty result set; it
does not reliably distinguish an outage from no matches. A later query can
recover. ReDoc retains its independent reader palette. Swagger and ReDoc retain
the documented upstream accessibility limits;
the whole-site WCAG gate excludes their generated interiors. The engines tested
are installed modern versions, not every historical version allowed by the
minimum browser requirement. Live Algolia credentials,
consumer adoption and deployment are outside this acceptance. Ordinary consumers
still need only Hugo; its accepted LibSass deprecation warning remains visible.
7.8.20 - Theme review, 2026-10-13
Reproduced image escaping and interaction defects, their repairs, and local theme and consumer validation.
Local review snapshot
This record describes local source and tests against the v1.2.0 consumer baseline.
Scope
The review began at theme commit f8f476e, with existing consumer-maintenance and compact-sidebar changes and an ongoing English documentation revision in the shared checkouts. Those edits were preserved. During the review, the existing sidebar repair was committed separately as 8f1f08d; its file contents remained unchanged.
Work covered the theme’s owning checkers, runtime unit tests, synthetic output fixtures, the real bilingual documentation site, and two different consumers: DDIA’s book and SILO’s large documentation tree. Source inspection focused on URL handling, image output, message boundaries, focus transitions, runtime isolation, and navigation. Visual review used real consumer pages and the documentation site.
Reproduced defects and repairs
Defect
Reproduction and observed result
Repair and regression
Image URL escapes its HTML attribute
An ordinary image or Gallery URL containing a quote followed by an attribute-shaped query value creates an extra HTML attribute. An ampersand can also change the browser’s decoded URL.
Escape URLs as HTML attributes after validation. check-media-primitives.py parses block and inline image attributes in HTML, Print, and RSS; check-gallery.py checks the quoted Gallery URL. The harmless extra-attribute probe failed before the repair.
Draw.io loses endpoint parameters and mishandles messages
An endpoint with an existing query or fragment receives malformed embedding parameters. Null or malformed messages can throw; message handling does not require the configured origin.
Build the URL with URL and searchParams; require the active iframe and configured origin; ignore malformed data; send to the exact origin and accept only PNG/SVG image export URLs. New Draw.io unit tests and the site’s editor integration tests exercise these paths.
Page Actions loses the keyboard interaction contract
ArrowDown opens the menu before its CSS visibility transition permits focus. Tab can leave the disclosure while it remains open.
Make visibility immediate, retain the opacity and movement transitions, and close on focus leaving the entire disclosure without reclaiming focus. Runtime and real-browser regressions cover forward and backward traversal.
Appearance clears a newly reopened dialog’s state
Close and immediately reopen the dialog before its queued native close event arrives. The dialog stays visible while aria-expanded becomes false.
Ignore an earlier close event while the dialog is open. Real-browser tests cover the race in Chromium, Firefox, and WebKit at desktop and phone widths.
The two taxonomy HTML goldens also needed the already accepted sidebar repair: 33 hidden-leaf markers in each snapshot were removed after reviewing the complete diff. The 52-surface golden gate then passed.
The behavior is recorded in the bilingual architecture and shell contracts. No configuration migration or new dependency is required.
Validation
Local tools were Hugo Extended 0.166.0, Go 1.27.1, Node 26.9.0, Pandoc 3.11, and Chromium 151.0.7922.34 for PDF generation.
Layer
Evidence
Theme runtime
All 52 JavaScript tests passed after the repairs. Python discovery passed 116 tests; the 90-test migration suite was also run separately.
Theme ownership
Every bin/check-*.py checker was exercised, including explicit output-security arguments and packaged EPUB/PDF checks. Configuration schema generation was checked. Changed media, Gallery, output and golden owners were rerun after their repairs. Builds used warning-failure gates where the checker builds valid publishing output.
Documentation integration
make check passed with the local theme replacement: source/rendered Markdown, bilingual heading coverage, internal links, alternate-site builds, favicons, output goldens and release-pin contracts.
Browser integration
make browser passed 229 tests, including the full sitemap accessibility scan, six responsive widths, EN/ZH, navigation, search, components, code, community regressions and all four visual presets. The additional engine gate passed 6 tests across Chromium, Firefox and WebKit at 390 and 1440 px.
Publication fixtures
EPUB: 5 chapters, 31 link targets, no internal-check errors; EPUBCheck 5.3.0 reported zero errors and warnings. PDF: 23 pages, all 5 expected titles, no internal-check errors; rendered pages were inspected.
DDIA sample
Local-theme make check-local passed, including 14 translation chapters, 196 figure-layout checks and 38,170 internal references across 57 second-edition pages. Desktop, phone and dark reading views and the four-style menu were sampled.
SILO sample
Local-theme make check passed, including 536,561 internal references across 1,552 HTML files. Desktop documentation and phone search results were sampled.
The initial broad run exposed the stale goldens. One standalone security invocation also lacked its required CLI arguments; its corrected invocation passed over 493 fixture output files. A new Print assertion initially omitted Print from the test page’s own output list; correcting that test setup produced a passing HTML/Print/RSS regression.
Performance observations
A strict, minified local production build of the documentation site was inspected. For /docs/customize/config/, the referenced local JavaScript totals 62,192 bytes gzip (about 61 KiB, including Lunr); the two stylesheets total 98,838 bytes gzip (about 97 KiB), excluding fonts, images, search indexes, and third-party service traffic.
The ordinary documentation page omits the large diagram bundles. The Mermaid sample adds a 976,006-byte gzip Mermaid dependency (about 953 KiB) plus its small page runtime. Runtime-isolation and output checkers passed.
Limits and delivery state
The accessibility suite excludes upstream Redoc and Swagger UI DOM under its existing policy. Consumer browser checks sampled key desktop and mobile routes across DDIA and SILO. The repairs were grouped into local theme and documentation commits.
7.8.21 - Give large tables room to read
Framework and component evidence, measured reading concepts, and a bounded direction for OINK technical tables.
Historical research; see the 1.4.0 decision
Research date: 2026-10-26. This study informed the table-reading design in OINK 1.4.0. The accepted decision and table guide describe the released behavior and supersede the entrance and scope recommendations below.
An explicit Read table action opening a large native dialog is the strongest candidate for further evaluation. It gives desktop tables more room while preserving text size, original table semantics, and a short return path. Inline widening remains sufficient for many tables; the measured package excerpt already fits that mode on desktop. On a 390px viewport, the dialog adds only 16px of width, so horizontal scrolling remains on narrow screens. Five documentation frameworks use native tables and overflow handling by default, while third-party table libraries add data operations alongside additional integration weight.
Evidence separates layout, content, and release state
The public tag snapshot was v1.3.2, with tag ref 68cfbbdc177064e2c28277c09c385d78e5363ffd. Research began at theme HEAD 7bc8658bc1be13ef0ad3050b9d9f6862f8f1f65f and site HEAD 99751179eefada3fa7a91318c792ddac46d7e6bf, with uncommitted changes in both working trees. The short .wide alias tested in this experiment was subsequently shipped in OINK 1.4.0 as documented in the component contract.
The local owners inspected were oink/layouts/_partials/content/table-render.html, table-body.html, assets/scss/td/_content.scss, _table.scss, the preset/font tokens, and the surface coordinator. .wide/.td-table--wide control intrinsic sizing and token wrapping; .full-width reaches the available article canvas. .matrix supplies first-column row headers and bounded two-axis scrolling, with existing sticky header/first-column CSS. That CSS gives each header top:0, without accumulated multirow offsets or a mobile first-column width guard. .fields emits a definition list. Ordinary captions belong inside the table; numbered Book captions belong to the outer figure (Table guide, output contract).
Selected consumer source
Bounded sample and purpose
pigsty.cc/content/docs/infra/param.md, NGINX group
Four columns × 14 body rows; linked parameter identifiers and descriptions
pgext/content/list/pkg.md, lines 44–69
Six columns × 24 body rows; package/version/repository/category/RPM/DEB comparison
pigsty.cc/content/docs/ref/linux.md, overview
Eight columns × 14 body rows; OS/architecture and PG18–PG14 support cells
Two columns × seven body rows; small-table counterexample
Consumer snapshots were pigsty.cc at efaf7b19b442ddb284106418c78854552d949e9e, pgext at ab87fc7e5707d57f55129d3c45874abcc16fdef8, and piglet.run at 5a1572e6f9110cd5e8ef6e75cd50d9c4b6429f98; each pinned OINK v1.3.2. The separate 616-row extension catalog was left outside this prototype’s scope.
These examples distinguish many columns, many rows, long cells, and complex headers. Wider viewports primarily help the first; sticky orientation helps the second; wrapping helps the third. Multirow and merged headers need explicit associations and offset handling beyond wider layout. The selected prototype tables all have one header row and no merges. GFM pipe-table syntax itself defines a single header row and inline cell content (GFM tables, WAI multilevel headers).
Five frameworks make overflow the common baseline
The survey inspected official documentation and pinned default-theme source across five documentation frameworks. None of the five provides a built-in fullscreen table reader by default. Documentation links point to pages accessed on 2026-10-26; source links pin implementation commits.
Framework snapshot
Default table behavior
Optional/custom boundary
Material for MkDocs, 0f044dbe, 2026-10-24
Markdown tables; original table wrapped in local horizontal-scroll containers, with unwrapped fallback
Sorting uses an opt-in Tablesort 5.3.0 recipe; no built-in table reader, sticky columns, or table copy (Guide, CSS).
For static Hugo, the directly applicable patterns are semantic HTML, scoped scrolling, build-time focus attributes, and optional progressive enhancement. Material’s mounting code uses RxJS; Classic uses React/MDX, VitePress Vue/Vite, Starlight Astro, and Nextra Next/React.
Richer libraries add data operations and ownership
Current versions matter. DataTables 3.1.4 runs without jQuery, unlike 1.x releases. TanStack Table 9.3.1 uses constructTable, feature selection, and Store reactivity (DataTables v3 dependency boundary, TanStack v9 announcement).
Component
Fit and available operations
Integration and maintenance boundary
DataTables 3.1.4, released 2026-10-13; MIT, no required core runtime dependency
Enhances HTML tables using an internal data model; core sorting/search/paging; optional Buttons, FixedColumns, FixedHeader, Scroller
Closest candidate for later systematic table operations. Scrolling can duplicate or move headers; supports complex thead, not tbody spans (Release, package, span limit).
Tabulator 6.7.1, released 2026-10-22; MIT, no required runtime dependency
HTML importer reads first-body td cells, dropping .matrix row-header th semantics, and does not preserve general caption/scope/headers (Release, package, importer).
TanStack Table core 9.3.1, released 2026-10-12; MIT, @tanstack/store ^0.11.2
Headless sorting/filtering/pinning/selection/spanning logic; vanilla integration is supported
Maintainer owns HTML import, rendering, controls, styles, focus, export, and dialog; virtualizer is separate (Metadata, fixed package, vanilla guide).
DataTables’ FixedHeader/FixedColumns are optional extensions. Scroller requires equal-height rows, which conflicts with wrapped technical descriptions. Tabulator emits ARIA grid structures designed around cell navigation. TanStack’s spanning API requires explicit column definitions rather than importing arbitrary HTML merges. None of these packages includes a built-in fullscreen reading dialog (Tabulator’s printFullscreen targets print layout) (Scroller, Tabulator navigation, Print source, TanStack spanning guide).
Copy defaults also differ. Buttons 4.1.2 exports display data with current order/filter rules and span placeholders, without formula escaping by default. Tabulator 6.7.1 joins cell values with tabs/newlines without general quoting or formula neutralization. Tablesort 5.7.1 is a lightweight MIT, dependency-free sorting library that preserves table rows and handles Enter on headers without adding a reader, filter, or export layer (Buttons source, Tabulator Clipboard, Tablesort source).
Compare delivered bytes with their exclusions
Measurements used 14 fixed npm tarballs verified against registry integrity. Publisher-minified files were measured unchanged. Gzip used Python 3.14.8, zlib 1.2.12, gzip.compress(data, compresslevel=9, mtime=0); totals sum separately compressed files.
TanStack 9.3.1 selected reader logic, local bundle
49,505
14,248
TanStack 9.3.1 all core exports plus bindings/render helper, local bundle
115,146
30,983
TanStack virtual-core 3.19.7, separate local bundle
32,872
9,745
Tablesort 5.7.1 core + number comparator
3,756
1,763
DataTables core alone is 123,516/42,338 JS bytes and 30,007/3,843 CSS bytes, minified/gzip respectively. Extension totals use the exact Buttons, FixedColumns, FixedHeader, and Scroller packages plus matching -dt CSS. Optional style-adapter JS adds 2,501/1,279 bytes to the four-package total; Scroller’s adapter adds 650/326. Initialization, dialog code, translations, JSZip/pdfmake, and source maps are excluded. Buttons copy resides in its main file, so the compatibility shim is not counted again. Tabulator’s full package includes all built-in modules; Tablesort supplies only sorting.
TanStack measurements come from local esbuild bundles. Node 26.12.0/npm 11.20.0 and esbuild 0.25.11 bundled core 9.3.1 with Store 0.11.2 using --bundle --minify --format=esm --platform=browser --target=es2020 --legal-comments=inline and production NODE_ENV. The selected entry exports constructTable, tableFeatures, sorting/filtering/pinning/spanning features, sorted/filtered row models, storeReactivityBindings, and FlexRender. The all-core entry exports the core namespace plus those two helpers; the virtual entry exports virtual-core separately. Metafiles found no external imports. The 14,248-byte gzip logic sample covers headless state management only, excluding UI, CSS, HTML import, accessibility controls, dialog, copier, and virtualizer (Core package, Store, Virtual).
The concept widens desktops much more than phones
The external prototype used a real sibling documentation-site Hugo build with an external content mount. PGEXT-specific shortcodes became explicit labels/links; parameter fragments resolved to their source URLs; support icons received “Supported” text alternatives. Added captions and .wide were experimental adaptations. Every reading mode reused the same generated table data. The build used the sibling replacement with both workspaces disabled and external destination/cache/resource directories.
The comparison shell used a 230px rail, 40px desktop main gutters, 68ch normal measure, and 1130px available canvas, styled with generated OINK CSS and fonts. A separate generated table-guide reference measured a 770px desktop / 358px mobile viewport.
Package-table scroll viewport
Normal measure
Inline widening
Native dialog
Separate page mode
Desktop Paper/Terminal
652.80px
1130px
1358px
1408px
Desktop Slate/Ink
686.38px
1130px
1358px
1408px
Mobile, all four presets
358px
358px
374px
374px
These are local qa.json measurements at 1440×1000 and 390×844, DPR 1; light/dark geometry matched within each preset. Text remained 16px and code 14px throughout. Mobile intrinsic table widths remained about 969–1009px. Desktop inline widening already fits the six-column excerpt; the dialog adds bounded height, persistent controls, and isolation from prose. Its desktop visible table height was 847.20px, versus 897.20px in page mode; mobile dialog heights ranged 711.02–741.20px as controls wrapped.
Inline widening has the lowest context-switching cost. The dialog gains desktop space while retaining a direct return to the article. The separate page gains only another 50px on desktop and no mobile width; its main advantage is reloadability and URL sharing, at the cost of losing article scroll/focus on return. None of these modes scales text or invokes the Fullscreen API.
Chromium 151.0.7922.34, through Playwright 1.62.1, checked 16 preset × color × device combinations, each with three reading concepts plus baseline. The package sample passed original-node identity, unique IDs, caption/header scopes, loaded styles/fonts, title initial focus, Enter open, Escape/Close return, both Tab boundaries, stable toolbar, separated control/table regions, and page-mode reload. No page overflow was recorded; three additional mobile samples and a 320px Terminal/dark overflow probe extended the scope. A separate inspection preserved link targets and selection and restored inline horizontal scroll to 180px. Screenshot review covered 48 concept captures and contact sheets, and a Paper/light/desktop dialog axe scan reported zero violations.
The parameter and version samples’ first columns occupied 59.3% and 58.3% of the 374px mobile reader, motivating an optional mobile width guard. Preset styling remained distinct: Paper’s Plex Sans and restrained framing, Slate’s Inter and rounded controls, Ink’s flat sharp geometry, and Terminal’s mono chrome with Plex Sans prose.
Reproduction uses the external builder, source manifest/hashes, generated reference output, QA/inspection JSON, and screenshot set with Hugo 0.168.0+extended+withdeploy, Go 1.27.3 on macOS ARM64, Node 26.12.0, npm 11.20.0, and Python 3.14.8.
This prototype scoped evaluation to Chromium desktop and touch emulation with single-row headers; Firefox/WebKit, screen-reader testing, forced-colors, 200/400% zoom, merged headers, coordinator integration, and print-while-open belong to implementation acceptance.
A small reader preserves more than a generic grid
The recommended first stage is an explicit Read table action, a native dialog, and one original-node move/restore lifecycle. Hover-only entry is undiscoverable on touch and keyboard; whole-table click competes with selection, links, and scrolling. A visible title/Close control, named scroll region, initial title focus, contained Tab navigation, Escape, and guarded focus/scroll return are core requirements. Reuse OINK’s surface coordination conventions. A near-full dialog is distinct from browser fullscreen, whose standard excludes <dialog> as the request target (APG dialog, Fullscreen Standard).
Retain caption/th/scope/headers and original IDs. Moving the original table avoids clone collisions and divergent state, while inherited styling, outer numbered captions, external ARIA references, and footnotes still need explicit handling. Native tables can contain links and sorting buttons without becoming ARIA grids. Start with single-row sticky headers; leave complex headers scrollable without stickiness until offsets are validated. Comfortable spacing is default; compact mode changes padding while keeping font size. Optional first-column pinning must leave useful mobile reading width (APG table, APG grid, header semantics).
Keep .wide/.td-table--wide layout-only, .full-width bounded by article canvas, .matrix semantics intact, and .fields ineligible. No-JS content remains readable; Print expands static tables, Markdown retains source, and RSS retains its static/summary boundary without leaking reading controls.
If TSV copy is added in the future, it should copy the whole eligible table, including offscreen rows/columns, in author order: links become labels, code text remains, hidden controls/decorative glyphs are excluded, and meaningful icons use explicit text equivalents. It should reject hidden data rows/columns, nested tables, unequal row lengths, multiple header rows, or any DOM rowSpan/colSpan other than 1 (including rowspan="0"), using TAB between cells, LF between rows, normalized in-cell whitespace, and a leading apostrophe for formula-like cells starting with = + - @ (HTML table model, DOM text, Clipboard 2026-06-24 Working Draft, OWASP spreadsheet-injection limits).
A focused native reader leaves data-grid adoption possible later while avoiding a second data model. See the accepted decision for the shipped implementation boundary.
Accepted direction after review
Maintainer review selected explicit {.wide .expand} composition and a direct corner action, revealed on hover/focus and visible on touch, omitting the above-table toolbar, ellipsis menu, and TSV copy. The accepted decision and current contract define the shipped behavior.
7.9 - Design proposals and PRDs
The canonical bilingual home for OINK PRDs and designs that remain under evaluation.
Non-normative material
A proposal describes behavior that may not exist. The contracts, accepted
decisions, implementation, and owning checkers define current behavior.
Never use a proposal as a configuration reference.
This section contains the authoritative OINK product requirement documents,
RFC-style designs, and unresolved maintainer proposals. Do not create a local
plan/, plans/, proposal/, or parallel design tree in the theme repository
or the documentation repository.
Accepted for v1.6.0. All three stages ship in v1.6.0 (scanning BM25 engine with CJK bigrams, split index with staged loading of page text, and fields as search entries) and now live in the Shell and Components contracts; open tuning questions and a later database backend remain non-normative
Draft for R1–R3, drafted 2026-11-21. R0 is accepted for v1.6.0: plain CSS assembled by Hugo with no compiler, SCSS hooks retired, and Bootstrap JS removed; no other stage accepted. Orders the exit from Hugo’s removed LibSass, small reader gaps, version lifecycle, and a static API reference
Accepted and shipped in v1.7.0. All six components — Timeline, Update, Social posts, Video, Audio, and Map — expand the catalog from 21 to 27 components with no new shortcode (quoted social posts use > [!SOCIAL] in v1.8.0), one fence (map), and branches in the image, blockquote, and heading hooks; normative behavior now lives in the Components and Architecture contracts
Independent Go repository and first-stage boundary accepted; local CLI candidate implemented, not publicly released; later theme, migration, adoption, versioning, OpenAPI, and platform stages remain proposals
Paper/Slate ship in v1.2.0 and all six presets (paper, slate, github, ink, news, terminal) ship in v1.8.0 (see Ink and Terminal stabilization); GitHub, Ink, News and Terminal remain explicit opt-ins; see the accepted decision and dated acceptance record
Written 2026-11-28 and partly implemented in OINK v1.8.0. Ink is the written style (Kai and Fangsong, Palatino, headings at text weight, two inks) and News the printed style (newsprint, rules, one spot color), with gold-on-indigo and darkroom dark modes; Japanese and Korean stacks, a kicker and Blog list columns remain open
Draft PRD, written 2026-11-28. One oink binary that embeds Hugo and OINK for local preview, Git-aware multi-version serving and .oink packages, with SQLite-backed search, accounts, comments and page views; would supersede the CLI contract and the CLI roadmap’s versioning stage if accepted; nothing is implemented
Component refinement, unified diagram reading and local search refinement ship in 1.4.0 and now live under accepted decisions. Translation comparison ships in 1.5.0 as an accepted decision; its draft is retired.
The table-reading draft is also retired: the accepted decision
and component contract define the narrower,
.expand behavior released in OINK 1.4.0.
The bulk agent-index proposal was retired after its outputs were released.
Architecture defines the accepted
behavior. Agent-ready output gives the user steps.
The Book publication proposal was retired after BookManifest and the
EPUB/PDF tools were released. The accepted behavior is documented in
Architecture and
Writing a book; dated downstream adoption evidence
is recorded in Consumer evidence.
Pending consumer adoption does not keep an upstream design proposal active.
Git history retains both proposal drafts.
The generated-configuration-schema proposal completed its lifecycle and was
retired: Configuration defines the
required behavior, the
generated configuration schema decision
records the accepted rationale, and Git history retains the draft text.
CLI workspaces and adapters
Explicit workspaces and optional adapters remain in the current reduced CLI.
The current contract defines the command boundary,
and the R1–R8 and A18 record
preserves the historical acceptance evidence. The finite maintenance
roadmap remains retired from active navigation.
Where a new PRD goes
Create one English-primary page and its Simplified Chinese peer:
Use explicit, stable English heading IDs in both files. Keep code, keys, paths,
versions, and API names unchanged in Chinese. A proposal begins with visible
draft status and includes:
status, owner, date, and affected contract surface;
context and evidence;
goals and explicit non-goals;
proposed behaviour and output/accessibility/security boundaries;
compatibility and migration impact;
implementation and owning-checker plan;
acceptance criteria and open decisions;
a decision log for later changes to the proposal itself.
For a large experiment, you may add a dated page under
../research/. Keep temporary logs and generated
artifacts outside Hugo content and Git.
Lifecycle
draft proposal
├── rejected/superseded → remove from the active tree; preserve Git history
└── accepted
├── implementation + owning checker
├── affected EN/ZH contract
├── accepted Design decision when rationale is durable
└── changelog, migration, and user docs when their audiences need them
Acceptance does not make the PRD a second contract. Move accepted behavior
to the owning contract, stable rationale to Decisions, and user steps to the
applicable guide, then retire the proposal from active navigation.
Review gate
Before implementation, confirm that the proposal does not duplicate an existing
shell, resolver, component family, or data authority. If the design changes
during implementation, update this bilingual proposal before changing the code.
Acceptance requires the focused theme checker and the real documentation site.
It also requires rendered EN/ZH, applicable outputs, accessibility checks, and
responsive review.
Read-only Studio candidate
Studio is removed from the current CLI on 2026-10-04. Use oink dev,
an ordinary editor, and structured inspect/check reports. The
R7 record
preserves historical acceptance of the earlier browser implementation.
Reviewed editing
General source editing is removed from the current CLI. Guarded new,
move, review records, and baseline plans remain. Old editing plans are
rejected. The R8 record
remains historical evidence rather than the current command API.
7.9.1 - Backlinks and knowledge graph
A draft three-stage design to generate backlinks and local or global graph views from ordinary Hugo links.
G1 implemented; G2/G3 remain draft
On 2026-08-27, all G1 open decisions were resolved and G1 (static backlinks)
was accepted. The theme’s main branch implements G1, which is included in
OINK 0.8.0. The local and global graphs (G2/G3) remain drafts until G1
supplies real-world evidence. Their names and configuration are not public
API until acceptance.
Premise
Reverse navigation and a view of connected pages come from the link graph,
independently of [[wikilink]] syntax. Hugo already accepts ordinary Markdown
links and ref / relref, so OINK can derive a graph from content authors
already write, without another parser, Goldmark extension, or authoring syntax.
The first value is backlinks, not visualization. A static inbound-link list is
useful without JavaScript and remains readable in print and Markdown, making
an interactive graph an optional enhancement to an already complete list.
Goals and non-goals
Goals:
derive one language-local link index per build;
show deterministic inbound links on a page;
optionally show a bounded local neighborhood;
optionally publish a whole-site view and a machine-readable graph;
preserve ordinary preview when an edited link is stale or incomplete.
Non-goals:
introducing [[wikilink]] syntax;
indexing external, mailto:, same-page anchor, or self links;
executing JavaScript to discover links already present in content;
turning a visualization into the only way to navigate;
promising perfect extraction from arbitrary shortcode parameters or raw HTML.
Delivery stages
Stage
Deliverable
Runtime
Independent value
G1
Language-local link index and backlink list
None
Reverse navigation in HTML, Print, and Markdown
G2
Local graph around the current page
Existing ECharts plus a small local runtime
Spatial view with G1 as the accessible fallback
G3
Global graph page and graph data output
Same runtime
Whole-site exploration and machine-readable edges
Each stage requires separate acceptance. G1 does not depend on G2.
G2 does not require every page to load graph code.
Extraction contract
The proposed index scans source content once per language and records one edge
per source/target pair. After removing fenced code and inline code, it extracts
ordinary Markdown links and ref / relref, resolves internal pages, and
removes fragments for page identity. Self-links are excluded, and repeated
references produce only one edge.
The implementation must test at least:
duplicate links collapse to one edge;
fenced and inline code produce no edge;
external, protocol-relative, mail, same-page anchor, and self links are
excluded;
ref and relref are included;
each language produces an independent graph;
an unresolved derived edge warns or is reported by the focused checker
without making ordinary hugo server unusable.
Raw source scanning has known omissions: it may miss a URL in a custom
shortcode parameter or raw <a href>. These omissions must be documented
rather than hidden behind a claim of a complete semantic graph.
Backlink output
G1 renders an aside group in the right rail beside the table of contents and
taxonomy clouds, placing what points to this page beside what is on this page.
The group is expanded by default and shows the first eight entries, with the
rest behind a native disclosure so a heavily referenced page cannot occupy the
entire rail.
The site key params.ui.backlinks is a bare boolean, off by default.
A page overrides it with the prefix-free front matter key backlinks, which
a section can cascade. Entries sort by stable page path: a language-independent
order that naturally groups related paths without a second ordering authority.
The group uses ordinary links and is omitted when there are no inbound pages.
G1 silently removes derived edges that it cannot resolve. This is a documented
limitation of its role as a local navigation enhancement: site-wide broken-link
reports would duplicate existing warnings.
Print and Markdown retain the readable list. RSS omits the list unless
feed-level research shows that backlinks improve article feeds without adding
unnecessary site navigation.
Interactive graph boundary
G2 uses the locally vendored ECharts graph series, with the current page at the
center and its direct inbound and outbound neighbors forming the default depth.
A hard node limit prevents unreadable or expensive views. Keyboard focus, text
alternatives, reduced motion, forced colors, narrow screens, and print are
acceptance requirements rather than later polish.
If JavaScript or ECharts is unavailable, G1 remains complete and visible.
Only pages that render a graph load the runtime. The runtime must use the
existing feature-bundle key to prevent asset-cache collisions between pages
with different features.
Global output
G3 may add a dedicated graph page and an opt-in JSON output. The proposed JSON
schema contains a version, language, nodes, and directed edges with stable URLs.
It would not expose local file paths or unpublished pages. Generate this output
from the same index as G1 and G2 so all three representations remain consistent.
Compatibility and migration
Ordinary Markdown remains unchanged and needs no content migration.
Configuration names remain undecided until a prototype proves the minimum
required surface. Every interactive or global output is off by default.
A static backlink list may be considered separately because it supports local
navigation without network access or browser state.
Acceptance criteria
Acceptance requires a focused graph checker, extraction fixtures, and
HTML/Print/Markdown goldens. It also requires strict-build negative cases,
browser accessibility and responsive tests, and a real bilingual-site build.
Measure performance on a representative large site.
Open decisions
All G1 questions are resolved (see the decision log). G2/G3 must resolve these
remaining questions:
Does the local graph expose one depth or a tightly capped second depth?
Which page metadata, if any, is useful enough to enter graph JSON?
Is G3 useful enough to justify a new output format before G1 and G2 have
production evidence?
Decision log
2026-08-19: Drafted the three-stage design.
2026-08-27: Resolved and accepted G1, scheduled for OINK 0.8.0. G1 is opt-in:
the site key params.ui.backlinks is a bare boolean, off by default, and pages
override it with backlinks. Shell types do not restrict this policy because
it belongs to the site and page. A single stable-page-path sort replaces the
section → weight → title chain: one deterministic authority is enough for
reverse navigation, while a multi-level sort would introduce a second
navigation authority.
Unresolvable edges are silently removed, without warnings, as a documented
limitation. G2/G3 and graph data output still require production evidence.
2026-08-27: Design review moved the block from the page end to the right rail.
Backlinks are page metadata and belong beside the table of contents, while
the page end is the reader’s completion zone: share, feedback, provenance,
pager, and comments. The rail group limits visible entries to eight, with
the rest behind a native disclosure.
7.9.2 - Local search without Lunr
A draft that replaces Lunr with one scanning engine, ranks by BM25, and reads CJK text by script instead of by language tag.
Accepted for v1.6.0
Owner: OINK maintainers. Affected contracts: Shell
and Components.
All three stages are accepted for OINK v1.6.0 and defined normatively in the
owning contracts. This page preserves the design rationale, benchmark
evidence, and open follow-up questions.
Status and scope
Local search stays what it is: Hugo writes one JSON index per language, and the
reader’s browser searches it. A site still turns it on with offline_search: true
and needs nothing but the Hugo binary. This proposal changes the engine inside
that boundary, in three stages delivered together in OINK v1.6.0.
Stage
Change
State
1
One scanning engine replaces Lunr and the substring fallback
Accepted for v1.6.0
2
A large index is split: a small navigation index loads first, page text follows by size
Accepted for v1.6.0
3
Definitions below heading level become searchable entries
Accepted for v1.6.0
A database-backed search is a separate, later design. A database backend later
states only what this proposal keeps open for it.
Evidence
Measured on 2026-11-23 with Node 26.13 on one machine. Browser numbers will differ.
The engine in 1.5.1 has two paths. Every term is matched as a substring of each
field, and ASCII words also go through Lunr for English stemming and spelling.
Lunr builds its index over the whole site on the first such word.
Problem in 1.5.1
Measurement
The first English query stalls
271–410 ms on two sites with 1.3–1.7 MB content indexes; 2.5–3.5 s and about 800 MB of heap on a 792-page PostgreSQL manual
Every query is slow on long pages
27–120 ms on those two sites, against an 80 ms input delay; up to 890 ms on the manual, spent mapping excerpt offsets over whole page bodies
Substring matches
port returns five pages titled “… Support” first; 435 pages hold the substring, 70 hold the word
Unspaced Chinese finds nothing
7 of 16 queries such as 数据库连接池超时 return no result
A stemmed or corrected hit has no location
vaccum finds the VACUUM page with no section and only the page description
Operators are dropped
->> yields no term
Ranking ignores rarity and length
Each term weighs the same, and a page counts as one unit however long
Capacity is a second limit. The largest maintained consumers use summary
scope because their content indexes exceed the budget; content indexes of
5–10 MB exist. Stage 2 addresses that. Stage 1 does not.
On a maintained 163-page site whose content index was 8.1 MB, stage 2
publishes a 609 KB navigation index (123 KB gzipped) and 7.5 MB of page text
(2.4 MB gzipped). First results need the former instead of the whole index.
In a browser, creating the engine again when the text arrives takes 64 ms, and
a query then takes 3–8 ms.
For stage 3, an experimental conversion of the PostgreSQL manual was built
unchanged. Its 7,790 fields per language became entries. A query for
work_mem, shared_buffers or autovacuum_naptime opens the parameter’s own
entry, and does so from the navigation index alone, before any page text is
fetched. That index is 1.7 MB (335 KB gzipped) with the entries in it.
The stage 1 engine, on this site’s content index (166 pages and 1,443
sections per language, about 1.7 MB):
Measure
1.5.1
Stage 1
First English query
198–551 ms
8–19 ms
Median query
5.2–8.7 ms
1.6–2.1 ms
95th percentile
13.4–19.2 ms
3.4–4.1 ms
Expected page in the top five, both scopes
43 of 46
46 of 46
The last row counts the 46 curated queries that name a page, in the summary
and content scopes together. Two more expect an empty result and pass in both
engines. The three new passes are Chinese queries typed without spaces. On the PostgreSQL
manual, creating the engine takes 65–112 ms, a query averages 10–16 ms with a
worst case of 32 ms, and retained heap is 19–32 MB. A misspelt word costs
about 140 ms once, to collect the site’s vocabulary.
A prototype of the bigram matching was compared with jieba segmentation plus
BM25 on the Chinese manual. Over 35 Chinese and mixed queries the two agreed on
82% of the top ten pages. This measures agreement, not quality.
The engine source is 36.7 KB, or 11.6 KB gzipped. The 1.5.1 engine and Lunr
together are 42.1 KB and 12.7 KB.
Goals and non-goals
Goals:
remove the Lunr dependency and the index it builds in the browser;
answer unspaced Chinese, Japanese and Korean queries without a dictionary;
match words at word boundaries, and keep identifiers and operators literal;
rank with the rarity of a term and the length of a section;
locate and highlight every match, including inflections and corrections;
add no configuration key, build step, download or language switch.
Non-goals:
a segmentation dictionary, WebAssembly, a Web Worker, or a build tool beside Hugo;
a synonym file; search_keywords remains the way to add synonyms;
folding Traditional and Simplified Chinese; this needs a vendored table and a separate decision;
loading part of an index by query; a Hugo-only build cannot shard by term;
a remote search provider.
Stage 1: the engine
No index is built. The engine joins all searchable text into one folded string
and records where each field of each page and section starts. A query term is
located by scanning that string. The scan yields the counts that BM25 needs.
Query analysis
Text is folded with NFKC, lowercased, and whitespace is collapsed. The query
becomes pieces in the order typed:
Piece
What it is
Example
Word
Letters or digits of a script that separates words
port, репликация, 5432
Identifier
A piece holding -, ., /, \, _, : or =; kept whole
shared_buffers, --baseURL, /pg/data
Symbol run
Two or more characters with no letter or digit
->>, ::
CJK run
Consecutive Han, Hiragana, Katakana or Hangul characters
连接池, レプリケーション, 백업
A character’s Unicode script decides its class. The page language never does:
an English page may quote Chinese, and a reader may type either. A piece is cut
where a CJK character meets a letter or digit, so WAL归档 and WAL 归档 are
the same query and pg_upgrade升级 is an identifier and a run. A path such as
文档/搜索.md stays one identifier.
A CJK run of one character is one term. A longer run becomes its overlapping
bigrams: 连接池 is 连接 and 接池. Nothing decides where a word ends.
What a page must cover is counted in atoms: each word, identifier and symbol
run, and each character of a CJK run. A query holds at most 30 atoms.
A short list of English function words and six Chinese question words still
match, at a tenth of the weight, and no page is required to contain them. A
query made only of such words is searched as written.
Matching
Every match is exact or loose.
Piece
Exact
Loose
Word
The whole word
A longer word it begins; another inflection; one part of an underscore name; the inside of a compound, for words of five or more characters; a correction
Identifier
Bounded by non-identifier characters
Inside a longer identifier
Symbol run
Not next to another operator character
Inside a longer operator
CJK bigram
Any occurrence
—
Inflection uses Porter’s English suffix rules for a–z words. Words of other
alphabets match when they share at least four leading characters and differ by
at most three trailing ones. A word that holds a digit does not inflect.
Spelling help applies only when the selected scope holds no form of the word.
It covers a–z0–9 words of at least five characters, with one edit, or two
from eight characters. A transposition is one edit. The three most frequent
candidates in the site are searched as whole words. Identifiers are never corrected.
Ranking
A page is a complete match when it covers at least 90% of the query’s atoms by
weight. An atom weighs the inverse document frequency of its commonest covering
term. A bigram that occurs nowhere in the scope is not required while its
characters are covered by other bigrams. An atom that no term can cover stays
uncovered, so every page is then a partial match.
Pages are ordered by these keys:
Complete matches hide partial ones. A page covered within one section, together with the page’s own fields, leads a page that needs several sections.
Strength. Each atom takes the strongest match found for it: title 10, keywords 8, tags and categories 6, headings 5, description 3, body 1; a loose match counts 0.7 of its field. Strength is the weighted mean over atoms, multiplied by 1.5 when the pieces are adjacent and in order, and by the page’s search_boost.
The BM25 score of the best section, multiplied by search_boost.
Title, then URL.
Strength depends on where the query was found and never on how often.
Repetition therefore reorders pages only within equal strength.
Partial matches are ordered by coverage in tenths, then by the same keys. They
keep the matched/total label. A word counts once in it, and a CJK run counts
by pairs of characters.
BM25 runs per section with k1 1.2 and b 0.5 over section length in
characters. Occurrences are weighted by field, scaled by match quality, and
capped at 24 per field. A bigram of a run of n characters weighs
n / (2(n − 1)), because the run holds about n/2 words.
Each page still occupies one row and opens its best section.
Excerpts and highlights
The excerpt is the 160-character passage of the best section that shows the
most different matches. A result carries the strings that were found, so an
inflection or a corrected spelling is highlighted as written in the page. A
word is not highlighted inside another word unless it could match there.
Normalized matches still map back to the original text.
Stage 2: staged loading
The index template still writes every document with its body. What Hugo
publishes depends on the size of that output:
Index size
Published files
Page text
Up to 2 MiB
offline-search-index.<lang>.json, byte for byte as before
Inside the index
Above 2 MiB, text up to 8 MiB
The index without body, and offline-search-body.<lang>.json
Fetched by itself after the index, then added to the results
Text above 8 MiB, or Save-Data
The same two files
Fetched when the reader chooses “Search page text”, which shows its size
2 MiB is the existing raw budget of one index, so a site within the budget
sees no change. The split index holds everything that locates a page: titles,
headings with anchors and byte offsets, keywords, taxonomies, descriptions.
The body file is a list of {ref, body} entries. Both names are fingerprinted
in production.
The palette requests the index on the first search keystroke, as before, and
shows its results at once. While the text loads, the status line says so, and
an empty result is reported as loading, not as no results. When the text
arrives the engine is created again and the reader’s selected row is kept. A
failed download offers the same row to retry. Opening the palette alone still
requests nothing.
No key is added. offline_search_index remains a manual reduction, and a
summary, heading or title index has no body to move. A site template
that overrides assets/json/offline-search-index.json is split the same way.
The byte budget applies to the index that is fetched first.
Stage 3: searchable entries
Parameters and functions are usually defined in lists, not headings, so the
index could not target them. It now records search entries beside headings:
any rendered element with an id and a non-empty data-td-search-entry
title.
Every anchored field is an entry, from the fields shortcode and from a
{.fields} table. Nothing has to be configured or rewritten. A site can mark
its own elements the same way, from a shortcode or with a block attribute.
Entries join sections in document order with the same id, title and
start, so the index format and the engine are unchanged. The page text is
divided among headings and entries in that order. A section that holds
entries keeps only the text before the first one, and text inside an entry
opens that entry. headings still lists headings only.
field accepts id, so a reference page can keep an established anchor such
as guc-work-mem instead of field-work_mem. An unusable value, or one
another field already uses, warns and keeps the generated anchor. An id that
equals a heading’s is not detected, as with any explicit id.
An entry carries no kind. Nothing displays or filters by one yet, and the
field can be added to sections later without breaking a reader.
A database backend later
A later design may add a search provider backed by PostgreSQL. This proposal
keeps two things open for it. The index file is complete enough to import as a
corpus. The engine returns plain result rows through one call, which a remote
provider can also produce once the palette awaits results. Nothing here adds a
network request.
Compatibility and migration
Configuration and front matter keys do not change, and an index within 2 MiB
keeps its fields. Indexes written by earlier releases still load.
The theme no longer ships or loads Lunr, and window.lunr is undefined on OINK pages. A site that used the theme’s copy must load its own.
OinkSearchEngine.create takes (documents, maxResults). The Lunr argument is gone.
Results add marks and strength. The scale of score and textScore changed.
A term no longer matches inside a short word. Queries that relied on port finding support return fewer pages.
A contiguous phrase is a multiplier, not a tier. A large search_boost can outrank it.
A CJK run no longer has to occur whole. Results that were empty may now be complete or partial matches.
An index above 2 MiB has no body in its documents. A tool that read page text from the index must read offline-search-body.<lang>.json and join it by ref.
The dialog gains data-td-body-src and data-td-body-bytes when the index is split. offline-search-index.html still returns the index URL.
Two strings are added to every locale: ui_search_body_load and ui_search_body_loading.
Rendered fields gain data-td-search-entry, and an index holds one more sections item per field. A section that contains fields no longer answers for text inside them; that text opens the field.
Implementation and checks
Owner
Check
Theme
tests/js/search-engine.test.js for analysis, matching, ranking, excerpts and the published Porter examples; check-search.py for the built index and ranking on it
Theme
check-palette.py, check-navigation-contract.py and check-runtime-isolation.py assert that no page loads Lunr
Theme
check-vendor.py after removing the Lunr artifact, license and tree entry
Theme
check-search.py builds a probe above 2 MiB: one language is split, the other is not, section offsets address the separated text, and the dialog names the file and its size
Theme
tests/js/command-palette.test.js for results before the text, the loading state, the reader’s request, Save-Data, and retry after a failed download; check-i18n.py for the two strings
Theme
check-search.py for field and custom entries on the built index: order, titles, offsets, skipped invalid entries and their warning, and opening a field by name; check-content-primitives.py for the id parameter and its fallbacks
Site
tests/search/queries.json with scripts/check-search-corpus.mjs, which can time an older engine with --baseline-engine and --baseline-lunr
Site
Palette browser tests for composition, scope, partial state and keyboard use
User guides and the license table have been updated for v1.6.0 alongside the
normative contracts.
Acceptance and open decisions
The stages are accepted for OINK v1.6.0: the theme checks, real-corpus checks in
both summary and content scopes, and the documentation site’s check and
browser targets pass against them. This site’s index is within the 2 MiB
budget, so stage 2 is exercised by the theme’s probe and unit tests and by
larger consumer corpora.
Open decisions (deferred beyond v1.6.0):
Are the weights right? Field worth, the loose factor, the phrase multiplier, and b come from a 48-query set and one large manual, not from labeled relevance.
Should partial matches follow complete ones when few pages are complete?
Should offline_search default to on? Nearly every maintained consumer sets it.
Should Traditional and Simplified Chinese fold together?
Do Arabic and Hebrew prefixes need a rule of their own?
Is 8 MiB the right limit for loading page text unasked? It is a first choice, not a measured one.
Should an entry carry a kind, and should a result show it?
Decision log
2026-11-23: Accepted all three stages for OINK v1.6.0; promoted behavior into the Shell and Components contracts and updated user guides and license inventory.
2026-11-23: Drafted. Chose scanning over an inverted index after measuring 1–8 ms per term over 12 MB of text. Chose bigrams over Intl.Segmenter, which split 数据库连接池超时 into six fragments and varies by browser, and over a dictionary, whose 5 MB cannot ship with a theme. Rejected segmenting the query against the site’s own text after it proved unstable.
2026-11-23: Implemented stage 3. An entry is one more item of sections, so neither the index format nor the engine changed. The marker is an attribute any markup can carry; fields set it themselves. The planned kind was left out because nothing would read it.
2026-11-23: Implemented stage 2. The split happens at the existing 2 MiB budget, so compliant sites publish the same bytes. The index template stays the only author of documents, because five consumer sites override it; the split is derived from its output. Page text is not requested when the palette opens, which keeps the rule that commands never cost a download.
2026-11-23: Implemented stage 1 in the theme’s working tree. Ranking moved from the weakest field needed to a weighted mean of field strengths after a curated query regressed. A phrase became a multiplier after it lifted low-scoring research pages over the canonical one.
7.9.3 - Media convergence
A draft for the remaining convergence between content images, numbered figures, Landing media, and featured-image selection.
Partially implemented
The theme’s main branch implements M1 (the shared media-result contract)
and M2 (Landing resource metadata). M3 is resolved as option 2.
Only native Markdown images support processing. The full fig source form
remains a container. Its parameter list deliberately excludes command/options.
M4 (compatibility retirement) remains open until consumers are inventoried.
The sections below retain the original design record.
Current baseline
The content image hook, numbered fig, cards, and galleries resolve local page
resources, section resources, global assets, static files, and explicit remote
URLs through content/image-resolve.html. Raster resources can supply intrinsic
dimensions and processed derivatives. data-td-image-zoom marks HTML Zoom
eligibility, and the build-time detector checks only this theme-emitted marker.
Standalone Markdown images can combine a caption or Book numbering with
processing and a link. Numbered image figures share td-figure and
td-book-figure semantics. Landing media uses the shared URL trust policy,
while featured images deliberately use a ranking resolver because they select
a representative image rather than render one explicit source.
Remaining problem
The shared safety boundary is stronger than the shared media model. Landing
media does not obtain the same page-resource metadata and processing
result as body images. Featured-image selection and explicit image resolution
return different result shapes, some compatibility class names remain in
markup, and Book’s full fig form cannot express every processing option that
the native image hook supports.
The design question is therefore no longer “replace seven image entry points,”
but whether the remaining surfaces can share a small result contract without
erasing their different semantics.
Goals and non-goals
Goals:
define one normalized media-result shape for URL, source URL, dimensions,
alternative text, attribution, processability, and external status;
let explicit content images, Landing media, and representative images reuse
that shape where their source semantics overlap;
keep figure markup and Zoom eligibility single-owned;
decide whether the full fig form needs processing or whether authors should
use the native image form for processed numbered images;
retire compatibility markup only after consumer evidence and a release note.
Non-goals:
adding a third-party lightbox or remote image service;
changing image Zoom from opt-in to site policy by accident;
giving galleries a new caption, sequence, or carousel model;
merging non-image Book targets such as tables, equations, and examples into
an image-only base class;
making featured-image ranking identical to explicit image resolution.
Proposed phases
M1 — Result contract
Document the fields that the content and representative-image resolvers return,
then extract their shared fields into one internal media-result contract.
Source ranking stays in the featured resolver and source resolution in the
content resolver. This internal refactor must preserve output bytes.
M2 — Landing resource metadata
Allow Landing items to resolve eligible local resources through the media
contract, gaining intrinsic dimensions and the shared URL/security decision.
Explicit width and height in Landing data retain precedence. Remote and static
sources remain valid without claiming metadata for a processable resource.
M3 — Full figure capability decision
Choose one of two answers:
add processing arguments to the full fig source form and normalize them
through the same processing helper; or
keep processing exclusively on native Markdown images and document full
fig as the container for arbitrary numbered block content.
No implementation should leave both options half-supported. In both forms,
Markdown/LLMS must consistently link to the documented source or derivative.
M4 — Compatibility retirement
Before removing old image-element classes or attributes, inventory downstream
CSS and JavaScript. If a compatibility name is still used, retain it for a
documented release window. Alternatively, migrate the owning site in the
same release.
Safety, output, and accessibility
Image URLs keep the shared scheme and remote-host policy.
Missing required alternative text warns and renders a decorative fallback
only where the current contract permits it.
Width and height never claim metadata that an SVG, static file, or remote
source did not provide.
Linked images are not Zoom targets; the runtime preserves dialog focus,
keyboard close, reduced motion, and narrow-screen containment.
Print, Markdown, RSS, and LLMS strip interaction markers while retaining the
intended image, caption, attribution, number, and link.
Acceptance criteria
For each phase, collect byte-level HTML and Markdown evidence.
Run content and Landing resolver tests, URL/security checks, image-processing
tests, and Book target checks. Run gallery/Zoom browser tests and real-site
EN/ZH narrow-screen review. Acceptance requires an explicit M3 capability choice.
Open decisions
Is one shared result struct enough, or would a common lower-level URL/resource
record keep resolver ownership clearer?
Should Landing consume resource attribution, or only dimensions and URL?
Does full fig processing solve a real consumer need now that native images
support numbering, captions, links, and processing together?
Which emitted compatibility names are still used by real consumers?
7.9.4 - Theme roadmap: the Sass exit and the next product stage
A draft roadmap that puts leaving Hugo’s removed LibSass first, then closes small reader gaps, version lifecycle, and a static API reference.
Draft roadmap for R1–R3; R0 accepted for v1.6.0
This page proposes an order of work and records the evidence behind it. R0 is accepted for OINK v1.6.0: the stylesheet is plain CSS that Hugo assembles, with no compiler and nothing generated in Git; see R0. Beyond that, the page defines no configuration key, output, or component. Every name below is provisional until its stage is accepted and moved to the owning contract.
OINK theme and documentation site; the CLI only where a stage names it
Affected contracts
Architecture (toolchain, styles, outputs), Components, Shell, and customization guides
Source snapshot
Theme HEAD 49b5648 plus uncommitted work, documentation HEAD 3472785, local Hugo Extended 0.169.0
Recommendation
Make the next theme release about one thing: leaving LibSass without asking consumers to install Dart Sass. Hugo v0.170.0 removed LibSass and the extended edition. When this roadmap was drafted, OINK was pinned to 0.169.0, the last release that can build published v1.5.1, and its contract forbade the only upstream replacement. R0 shipped in OINK v1.6.0: the stylesheet is plain CSS, nothing compiles it, and no Hugo release is pinned.
After that, close what is half-built: first the small reader and author gaps that other frameworks treat as baseline, then version lifecycle, then a static API reference. Keep one content-model project active at a time, as the CLI roadmap already requires.
Stage
Subject
Why in this position
R0
Sass exit and the Hugo 0.170 baseline
Forced by upstream. It blocks every later upgrade
R1
Small reader and author gaps
Low cost and frequent use. No new authority
R2
Version lifecycle
Already the default next content capability. Upstream changed its premise
R3
Static OpenAPI reference
API content is absent from search and agent outputs
Continuing
Agent output and engineering quality
Finishes existing work. Adds no service
Context and evidence
Hugo 0.170 removes LibSass
Hugo v0.170.0, published on 2026-11-13, states that the extended edition is gone and that Dart Sass is the only transpiler. Setting transpiler to libsass returns an error. hugo.IsExtended always returns false, and module.hugoVersion.extended is deprecated and does nothing. Sass users must install Dart Sass separately.
Published v1.5.1 compiles two stylesheets through toCSS with the built-in compiler: scss/main.scss in head-css.html and scss/redoc.scss in scripts.html. The toolchain contract says that ordinary consumers must not install Dart Sass or another Sass executable, and that later changes must preserve that boundary. For v1.5.1, both statements cannot hold on Hugo 0.170.
According to the survey below, Docsy 0.17.0 and Doks 2.0 chose to require Dart Sass. This review did not build OINK on Hugo 0.170.
What the theme styles depend on
Measured on the theme checkout on 2026-11-21:
Fact
Value
Theme-owned SCSS
About 16,600 lines under assets/scss/
Distinct --td-* custom properties
185
Sass variable references
147, to 55 variables
Mixin calls
50, of which 39 are Bootstrap media-breakpoint-*
@extend rules
15
Bootstrap
5.3.8. The full SCSS is imported, and bootstrap.bundle.js is loaded for dropdowns
At that date the theme already expressed most of its design through custom properties. Its remaining Sass use was narrow, but Bootstrap’s palette was still computed by Sass at compile time.
Two local trials set the boundary of the options below:
Dart Sass 1.105.2 did not compile the SCSS source of that date. It stopped at the nested @import 'chroma/dark' in _chroma.scss and reported that every @import rule is deprecated and will be removed in Dart Sass 3.0.0. Changing the transpiler would therefore also have required source changes.
On Hugo 0.169.0, with neither Node nor Sass on PATH, css.Build bundled @import, expanded hugo:vars into :root custom properties, lowered native nesting for the given browser targets, and preserved @layer. Hugo alone can therefore bundle plain CSS.
How consumers use the SCSS hooks
bin/update-consumers.py inventories 51 primary checkouts, 45 of them on v1.5.1. Their hook files were measured on 2026-11-21:
Measure
Checkouts
Carry a non-empty _styles_project.scss
46 of 51
Use no mixin, @extend, control rule, or Sass variable in it
38 of 46
Use // comments
44 of 46
Use nested rules
40 of 46
Use &-suffix selector concatenation
16 of 46
Call a mixin
6 of 46
Set Sass variables in a variables hook
18 of 51
The style hooks total about 26,000 lines; the largest has 1,893. None calls a Sass color function. The variables hooks mostly set $primary, $secondary, the four status colors, $line-height-base, and font families.
Most hook content is plain CSS written with Sass comments and nesting. It is still not valid CSS: // comments and &-suffix concatenation need a mechanical conversion. Eight files need real Sass semantics. Any Sass exit that ignores these hooks breaks nearly every consumer.
A later check found a second dependency. pgsty.com, pigsty.cc and pigsty.io compiled seven SCSS entries in their own templates that imported the theme’s partials directly.
Shipped, with NAVJSON and an agent-docs scorecard in CI
Nested or per-section llms.txt for large sites
Mintlify, Fern
One index per language; full text per top-level section
Blocks shown only to people or only to agents
Mintlify, GitBook
None
Copyable prompt block
Mintlify, GitBook
None
Page status badge in navigation
Material for MkDocs, Starlight
None
Inserted, deleted, and focused lines in code
Expressive Code, Fumadocs, VitePress
None; fences have title, copy, wrap, collapse, and line options
Glossary with hover definitions
Material for MkDocs, Mintlify
None
Dismissible site announcement
Material for MkDocs, Hextra, Fumadocs
None
Related pages
Mintlify
Backlinks only
Visible fallback for a missing translation
Starlight
The language switch targets the language home page
Version switch that stays on the equivalent page; outdated banner
Mintlify, Docusaurus
Docsy-style version menu and archived-version banner
One searchable page per API operation
Mintlify, Fumadocs, Scalar
Swagger UI or ReDoc embed; other outputs link to the specification
Output with no inline script
Relearn 9
Inline startup scripts; the deployment guide explains hashes and nonces
The Hugo statements above were read from the release page and function reference, and the two trials were run locally. The other rows come from a survey of each project’s own documentation and changelog on 2026-11-21. They were read through a summarizing tool and not checked row by row, so confirm a row again before a stage depends on it.
Hugo itself added relevant capabilities since v0.153.0: a site matrix of languages, versions, and roles, with sites.complements to lend existing pages to another site without writing new output. Content adapters can generate pages from local data. R1 to R3 below must evaluate these before freezing a format.
What already works
As of OINK v1.7.0, the theme has 30 shortcodes (29 when drafted), 22 Landing sections, Book publication, Duo View, visual presets, static backlinks, and local search with mixed CJK and Latin terms. Its static agent outputs are more complete than most open-source frameworks in the survey. Community issues mostly ask for correctness and reading comfort, not for more component families. R1 therefore concentrates on those gaps.
Goals and non-goals
Goals:
build OINK with a current Hugo release and no other executable;
give every existing consumer a tested migration path for its style hooks;
close baseline reader and author gaps with static, semantic output;
complete version lifecycle and API reference so their content reaches search, Print, Markdown, and agent outputs;
keep every theme-owned network feature off by default.
Non-goals:
requiring Dart Sass, Node, or the OINK CLI for an ordinary build;
a hosted assistant, MCP server, analytics backend, or signed-in content;
a visual editor or a new reading shell;
type-aware code hover, page narration, or an API testing platform;
interactive graph views (G2/G3) before the stages above ship.
R0: the Sass exit
Options
Option
What a consumer needs
Assessment
A. Require Dart Sass
A second executable on every machine, CI job, and container
Rejected by the current dependency contract
B. Stay on Hugo 0.169.0
Nothing
Not durable. No later upstream fix can be adopted
C. Publish compiled CSS; customize with custom properties and plain CSS
Hugo only
Chosen on 2026-11-22 and delivered first
D. Rewrite the theme source as plain CSS before anything else
Hugo only
Same consumer result as C. Doing it first would have delayed the upgrade, so it followed C as the next step and removed the maintainer-side compiler
Decision and delivered design
On 2026-11-22 the owner chose option C: ship compiled CSS, retire the SCSS
hooks, and adjust the sites that compiled theme SCSS themselves. That first
delivery kept SCSS as the source and committed the compiled bundles, so a
maintainer still needed LibSass. The source was then converted to plain CSS,
which is option D taken as the next step, and the compiler was removed. Both
steps are accepted for OINK v1.6.0. The contract is
Plain CSS stylesheet delivery.
Item
State
Stylesheet source
Done. Plain CSS layer files under assets/css/td/, listed in cascade order by layouts/_partials/css/layers.html. assets/scss/, the vendored SCSS, the compiled bundles under assets/oink/ and bin/build-css.py are deleted. Nothing generated is kept in Git
Consumer build
Done. css/bundle.html concatenates the layers with resources.Concat; templates call no compiler and there is no build step. The stylesheet is not passed through css.Build: it needs no bundling, and css.Build would have to treat every font URL as external
Site layer
Done. assets/css/project.css and assets/css/project/*.css, plain CSS, published as one stylesheet after the theme’s. Hugo minifies it and does not transform it
Sass variables
Done differently from the draft. No token derivation was added. A site restates the values its variables produced as plain overrides in project.css. In the theme, values that were Sass variables are written out in the layers
Site-owned shells
Added. A layout asks css/bundle.html for chrome, landing, search or compare by name. These replace the SCSS partials that pgsty.com, pigsty.cc and pigsty.io compiled in their own templates
Compiler
Closed. There is no compiler, for a site or for a maintainer, so the question of replacing LibSass with Dart Sass no longer arises
Hugo 0.170 baseline
Site builds verified on Hugo 0.170.1 on 2026-11-22 with only the Hugo binary, and again on 2026-11-23 after the conversion. No Hugo release is pinned: checks use the installed one, CI installs the current one, and any edition works. theme.toml and hugo.yaml still declare 0.169.0 as the minimum
Script done, styles open. The theme no longer loads Bootstrap’s JavaScript; see the 2026-11-23 entry below. Reducing the styles is not part of this delivery. Each Bootstrap component is now its own layer file under assets/css/td/bootstrap/
Neither step changed how pages look. After the first delivery, for a site
without style hooks, the production stylesheet equaled the previous one except
for whitespace inside one @starting-style block. The conversion to plain CSS
changed no rule: on 2026-11-23, with Hugo 0.170.1, the production main
stylesheet was byte-identical (556,437 bytes) to the last one compiled from
Sass, and the regression fixture’s 683 output files were identical apart from
the stylesheet path. The four smaller stylesheets now reuse main’s layers, so
they gained selectors, but no rule or declaration changed.
Compatibility and migration
The three SCSS hooks were public surface, so retiring them is a breaking
change. This release ships as v1.6.0 on the v1 module path
(github.com/pgsty/oink) with the breaking changes documented upfront in the
changelog and upgrade guide.
Hooks are converted by hand; the upgrade guide lists the steps. A site’s rules now load after the theme, so they beat later theme rules of equal specificity, most visibly the visual presets. A converted site is therefore compared page by page.
A one-time converter was written during this delivery and then removed, together with the Sass override layer it compiled through, so the theme keeps no legacy Sass path. Before its removal, on 2026-11-22, a dry run over the 46 inventoried hook files reported no failed check, and each of the 51 inventoried checkouts was copied, converted where it still had hooks, and built against the new theme on Hugo 0.170.1 with only the Hugo binary: 50 built, 55,020 pages in all, with no stylesheet warning. The remaining one, pgsty.com, timed out fetching its own remote report manifest in that harness and built completely in a separate run.
pgsty.com, pigsty.cc and pigsty.io were adjusted by hand. After the first delivery, on 2026-11-22, their rebuilt stylesheets reproduced every declaration of the old compiled ones, and four of the seven were byte-identical after minification. They now ask for the smaller stylesheets by name.
Classic themes/oink consumers and vendored copies follow the same path and are reviewed separately, as the release process already requires.
The theme no longer contains SCSS that a site could compile for itself. A site that wants to change Bootstrap overrides the corresponding custom properties and rules in its project stylesheet. The theme does not invoke a compiler and keeps no legacy Sass path.
The remaining consumers convert when they adopt the release. Until then a site
that still carries hooks builds with a warning and the theme’s default styles.
R1: small reader and author gaps
Each item is independent, opt-in where it adds markup, static in HTML, expanded in Print, and plain text in Markdown and agent outputs. Names are provisional.
Item
Proposed behavior
Main constraint
Page status
A front matter value such as new, beta, or deprecated marks the sidebar row and article header
Closed vocabulary, 32 locales. NAVJSON v1 is a closed schema and stays unchanged
Line markers in fences
Fence attributes mark inserted, deleted, and focused lines
Attributes, not in-source comments, so Copy still returns authored source
Glossary
One data file per language defines terms; an explicit reference renders a definition on hover and focus, and a glossary page is generated
No automatic scan of page text in the first stage
Announcement
One site-level notice, dismissible, shown again when its text changes
Visible without JavaScript; absent from Print, Markdown, and feeds
Related pages
A page-end group from Hugo’s related-content index, or an explicit front matter list
Sits beside backlinks without a second navigation authority
Missing-translation fallback
A language may show the source-language page with a visible notice
Never silent. The page declares its real language and canonical URL
Not-found suggestions
The 404 page suggests near matches from the local search index
Only when local search is enabled. No network
Sortable tables
An author marker adds column sorting to the table reader
Not a default; authored order stays in other outputs
Related pages cover most of what a local graph view would add. G2 and G3 in the knowledge-graph proposal therefore stay deferred.
R2: version lifecycle
The CLI roadmap keeps the detailed draft. This roadmap adds one requirement: before the manifest format is frozen, evaluate Hugo’s native version dimension against independent per-version builds.
The evaluation must answer:
Can a version dimension coexist with the existing params.versions menu and external archives?
What do build time and output size cost for several versions in two or more languages?
Does the native dimension give page correspondence without a separate logical key?
How are canonical URLs, search indexes, and agent bundles scoped to one version?
Which new schema version carries version identity, given that NAVJSON v1 is closed?
Reader-side targets are unchanged from the CLI roadmap and gain two from the survey: switching version stays on the equivalent page, and an outdated or unreleased version says so on every page.
R3: static OpenAPI reference
Swagger UI and ReDoc render only in HTML. Print, Markdown, and feeds receive a link to the specification, and operations never reach local search or agent bundles. The accessibility suite excludes both embeds.
The CLI roadmap proposes a generator that writes Markdown. Before choosing, compare it with a Hugo content adapter that generates one page per operation from a local specification at build time. An adapter needs no CLI and no generated source in Git, but must resolve references and cycles in templates. Choose with a real specification, not a toy one.
Either way, the result is ordinary pages in the existing output pipeline. Interactive requests stay out of the first increment. If added later, credentials live only in session storage and no proxy is used.
Continuing work
Agent output
Item
Proposed behavior
Sectioned llms.txt
A large site splits its index by section so each file stays within the size check
Audience markers
A block attribute keeps content in HTML only or in Markdown and agent outputs only, decided at build time
Prompt block
A fence renders a copyable prompt and reuses existing page actions
Discovery files
An opt-in experiment publishes a site-authored skill file and its well-known index. The conventions are still changing
Content negotiation
Documented server recipes for Accept: text/markdown. Static hosting cannot do this, so it is a guide and not a theme feature
A hosted MCP server and a built-in assistant stay out of scope. The existing search-tail extension lets a site connect its own.
Engineering quality
Strict CSP. Move stable inline initializers to same-origin files with data configuration, and publish a hash manifest for what must stay inline. This closes F10.
Engine matrix. Run the core shell, navigation, content, and dialog suites on Firefox and WebKit, and publish a support matrix. This closes F11.
Navigation feel. Run the Speculation Rules experiment the performance rules already describe on one named production consumer, together with cross-document view transitions as a CSS-only enhancement.
Freshness. Optional review date, owner, and expiry in front matter, shown in the page annotation and reported by the CLI. A modification date is never presented as verification.
Social cards. Build-time images need a site-supplied font for CJK titles, so this comes last.
Sequencing
Order
Delivery
Exit evidence
1
R0 compiled CSS delivery, since superseded by the plain CSS source in row 3
Done on Hugo 0.169.0 and 0.170.1 with no Sass executable on PATH: theme checkers, the documentation site’s checks and browser suite, and a file-by-file comparison of the regression fixture
2
R0 migration tool, run dry on the 51 inventoried checkouts
Done, then removed: every hook file converted, with no failed declaration check and one site to review. The tool was deleted with the Sass override layer it needed; hooks are now converted by hand
3
R0 plain CSS source, accepted for v1.6.0
Done on 2026-11-23 with Hugo 0.170.1: the production main stylesheet is byte-identical to the last one compiled from Sass, and the regression fixture is identical apart from the stylesheet path. No compiler and no generated file remain
4
OINK v1.6.0 release and consumer adoption
Tag v1.6.0 verified on Go proxy; consumers upgrade pins and build with Hugo alone
5
R1 items, each on its own
Owning checker, goldens for every output, bilingual contract
6
R2 evaluation, then one accepted design
Two real repositories use it before compatibility promises
7
R3 comparison, then one accepted design
A real specification is fully accounted for
Agent-output and quality items fit between stages when they do not compete with the active one. Bootstrap reduction was cut from R0. Its script has since been removed; reducing its styles stays open.
Implementation and owning checkers
Stage
Theme owner
Site and CLI
R0
check-stylesheets.py owns the layers and their assembly; check-presets.py and check-font-tokens.py
Real-specification fixture; accessibility with no embed exclusion
Each stage moves its accepted behavior to the owning contract in both languages and then leaves this page.
Acceptance criteria
R0: an unmodified consumer renders the same pages on Hugo 0.170.1 or later with only Hugo installed; the stylesheet checker fails when the layer lists and the layer files disagree or a layout calls a compiler; the upgrade guide tells a site how to convert its hooks.
R1: each item has HTML, Print, Markdown, and RSS behavior covered by goldens, strings in all 32 locales, and keyboard, forced-colors, RTL, and narrow-screen review.
R2 and R3: a named real consumer, a bilingual contract accepted before any compatibility promise, and no second navigation or Markdown authority.
Every stage: ordinary hugo server stays usable with invalid input, and a normal build downloads nothing.
Open decisions
Resolved on 2026-11-23: ship as v1.6.0 on the v1 Go module path (github.com/pgsty/oink) with deliberate breaking changes documented in CHANGELOG.md and the upgrade guide, keeping module paths stable for existing consumers.
Closed: the theme source is plain CSS, verified on 2026-11-23. There is no maintainer build, so no Dart Sass release has to be chosen and its 11 selector changes do not arise.
Resolved on 2026-11-22: no legacy path for sites that install Dart Sass themselves.
Resolved for now: brand and semantic colors are custom properties in site CSS. A configuration key remains possible later.
Is the page-status vocabulary closed?
Is glossary linking ever automatic?
Do line markers drop out of Markdown output or become a diff fence?
Does version lifecycle use Hugo’s native dimension or independent builds?
Is the API reference generated by a content adapter or by the CLI?
Which production consumer measures Speculation Rules?
Decision log and sources
2026-11-21: Drafted from a review of the theme, its active proposals and community issues, a survey of other frameworks, and local trials of Dart Sass and css.Build.
2026-11-22: The owner decided on compiled CSS delivery, retirement of the SCSS hooks, and hand adjustment of the three sites that compiled theme SCSS. Implemented on the theme’s main branch with the documentation site and those three sites; not committed, tagged, or deployed. The R0 design section now records what was built, which differs from the draft in three places: no css.Build, no token derivation, and bundles for site-owned shells.
2026-11-22: Verified on Hugo 0.170.1 after upgrading the local Hugo. With only the Hugo binary on PATH, the theme checkers pass, the regression fixture’s 686 output files match the previous pipeline apart from the main stylesheet, the documentation site passes its checks and 546 browser tests, and 50 of 51 consumer checkouts build after conversion. Published v1.5.1 fails on that Hugo because it needs Dart Sass. At that point the maintainer-side compiler was still the LibSass in Hugo Extended 0.169.0.
2026-11-23: The stylesheet source is plain CSS, assembled by Hugo from the layer files under assets/css/td/. assets/scss/, the vendored SCSS of Bootstrap, Font Awesome, Inter and IBM Plex Sans, the compiled bundles under assets/oink/, bin/build-css.py and the CI job that recompiled the bundles are deleted. bin/check-stylesheets.py replaces bin/check-scss.py, and stylesheets are published under /css/ instead of /scss/. Verified with Hugo 0.170.1: the production main stylesheet is byte-identical (556,437 bytes) to the last one compiled from Sass, and the regression fixture’s 683 output files are identical apart from the stylesheet path. The maintainer-compiler question is closed because there is no compiler. No Hugo release is pinned. On the theme’s main branch; no tag contains it.
2026-11-23: The theme no longer loads or vendors Bootstrap’s JavaScript, and Popper went with it. Only two controls used the script: the version menu of the bottom bar and the phone drawer, and the Landing download channels. The first is now the hover popover the navbar version menu already was, placed by CSS; the second switches in the Landing runtime. Both keep their markup classes and look. The core script every page loads, js/core.js, went from 92,443 to 8,740 bytes minified. A site that uses a Bootstrap script component in its own markup must load the script itself; none of the 48 inventoried module consumers does. On the theme’s main branch working tree; no tag contains it.
2026-11-27: Removed the sentence “add no new component family” from the summary and from R1’s rationale. It had been drafted by an agent and never decided by the owner. New content components proceed under their own proposals.
7.9.5 - Content components expansion: review and shared design
The reviewed plan for six new content components (Timeline, Update, offline X, Video, Audio, and Map), the shared decisions behind them, and their delivery order.
Accepted in OINK 1.7.0
All six components ship in OINK v1.7.0, are documented in the
component guides, and are governed by the
Components contract.
This proposal is preserved as design rationale.
Record
Value
Status
Accepted and shipped in OINK v1.7.0 (implemented 2026-11-27)
Owner
OINK maintainers
Scope
OINK theme; this documentation site; one optional oink-cli helper (separate proposal)
The documented component catalog grows from 21 to 27. In v1.7.0 the shortcode count
grew from 29 to 30 (social); the later callout form returns it to 29. The image and
heading render hooks gain branches, and one fence hook (map) is added.
Review verdict
All six components close real gaps, and the first draft understood OINK’s
infrastructure well. Its weakness was shape: it gave nearly every component a
new shortcode, a long parameter list, and a runtime. Taken together that was
7 new shortcodes, about a hundred parameters, fields, and configuration keys,
3 new runtime chunks, and 16 locale keys. The final design has one new
shortcode, about 35 parameters and keys (most of them existing figure and fence
attributes), one small chunk plus one vendored engine, and six locale keys.
The accepted Markdown-first decision
requires a proposal to show first why Markdown plus an existing hook is
insufficient. Applied to each component, that test removes most of the surface:
Draft element
Final decision
Main reason
timeline + event shortcodes, .timeline list marker
Definition list + {.timeline} only
A timeline is marker/event pairs; Markdown already has pairs
{{%/* update */%}} with seven parameters and a sticky rail
.update heading marker with date and tags
A heading already carries outline, anchor, search, and Print IDs; the rail duplicates the TOC
x with metrics, verified badges, image lists, quote parameters, data files, and an author registry
social with six parameters and a Markdown body
Images, galleries, and quoted posts compose from existing syntax; snapshots rot
video shortcode with about twenty parameters
Image syntax for video files and platform URLs
The image hook already resolves, captions, numbers, and degrades media; it drops .mp4 today
audio shortcode with chapters, speed, mutex, and transcript body
Image syntax; transcripts use a folded callout
Native controls cover playback; single-active playback ships in shared media.js for 2+ players, while chapters wait for evidence
map fence plus single-point shortcode, named styles, CARTO default
One fence; no default tile provider
One form; the theme must not choose a commercial tile service for every site
New file-resolve.html copying the image lookup order
Extract the existing lookup and share it
One lookup order, not two
The review also found two facts the draft could not have known without probes:
Overriding Hugo’s built-in x with a shortcode that takes a body turns the
legacy unclosed form {{</* x user="…" id="…" */>}} into a build failure
(shortcode "x" must be closed or self-closed, Hugo 0.170.1). A template
warning cannot run first. The owner then renamed the component social,
which leaves Hugo’s x untouched. See Social posts.
Image.Exif was removed in Hugo 0.155. Image.Meta returns GPS coordinates
only when the site’s imaging.meta.fields includes GPS, which Hugo’s
defaults exclude. Photo auto-pinning therefore needs a site-level opt-in. See
Map.
Evidence
Probe or survey
Result
Used by
Definition list followed by {.timeline}
Goldmark emits <dl class="timeline">; a definition keeps several paragraphs
Timeline
Heading with {.update date="2026-11-23" tags="Breaking, Performance"}
render-heading receives class, date, and tags; the TOC shows only the heading text
Update
 and  in a page bundle
The image hook receives IsBlock, attributes, and resources typed video/mp4 and audio/mpeg
Video, Audio
Current content/image-resolve.html
A non-image resource warns and is dropped
Video, Audio
Percent shortcode that emits a Markdown heading
The heading enters .TableOfContents
Update alternatives
Built-in x overridden by a body-taking template
Unclosed legacy calls fail to parse
Social posts (the rename)
Image.Meta on a JPEG with GPS EXIF
Coordinates only after enabling GPS fields in imaging.meta.fields
Map
Leaflet on npm, 2026-11-27
latest 1.9.4; 2.0 in beta (beta.5, 2026-11-19)
Map
Consumer Markdown under ~/www and ~/pgsty
No use of Hugo’s x, tweet, youtube, or vimeo shortcodes; raw Bilibili <iframe> embeds on two blogs; raw <video>; autoplay loop muted GIF replacements pointing at expiring signed URLs
Social posts, Video
The probes ran against a minimal Hugo site with OINK’s required Goldmark
settings. They confirm Hugo behavior, not OINK output. Each implementation stage
repeats them as fixtures.
Shared design rules
Authoring entry points
Every component uses an entry point that already exists or one new, narrowly
justified one:
Entry point
Today
Gains
Goldmark block attributes on lists
.steps, .cards, .filetree
.timeline on a definition list
Heading render hook
id, class pass-through
.update with date and tags
Image render hook
Images, figures, Book numbering, Zoom, Draw.io candidates
Video files, audio files, recognized video platform URLs
Data fence
gallery, filetree, echarts, …
map
Blockquote alert hook
Callout types, fold markers, {icon=}
[!SOCIAL] with avatar, date, url, platform (the v1.7.0 social shortcode, revised)
No component adds a percent-delimited shortcode. steps remains the only one.
Resource lookup
Video, audio, posters, subtitle tracks, post avatars, and map thumbnails all need
the lookup that content/image-resolve.html performs today: page bundle,
branch bundle, global assets/, then static/ or an explicit HTTP(S) URL. The
implementation extracts that lookup into one partial that both the image
resolver and a media resolver call. The image resolver keeps its image-only
rules (processing, alt metadata, byline). Image output must stay byte-identical
across the refactor; the existing goldens prove it.
Remote URLs are never fetched at build time. A remote media URL is the author’s
explicit choice, as it is for images today.
Network policy
The architecture contract
requires network-capable features to be explicitly and completely configured.
Two of the six components have such features:
Warns and stays off, as Draw.io does without a server
Neither feature has a theme-chosen default provider. Timeline, Update, Social posts, and
local or object-storage media need no configuration.
Runtime budget
Component
HTML runtime
Loaded when
Timeline, Update, Social posts
None
—
Video or Audio
js/chunks/media.js
Page has a file player or an enabled platform card
Map
content-components.js adapter plus vendored Leaflet and its CSS
params.map is complete and the page has a map
Markdown, Print, and RSS set none of these flags.
Styles, accessibility, and locales
New rules live in plain CSS layer files under assets/css/td/, listed in
layouts/_partials/css/layers.html before rtl, the presets, accessibility,
and print. They use --td-* tokens, logical properties, and preset geometry
(flat Ink and Terminal surfaces), and cover forced colors, reduced motion,
narrow screens, long tokens, and print. Author markers (.timeline, .update)
stay unprefixed; generated classes use td-.
The six components together add six locale keys (Social posts: one; Video:
two; Map: three, with its zoom buttons reusing the diagram keys), in all 32 locale
files with native translations, checked by bin/check-i18n.py.
Answers to the first draft’s questions
Question
Answer
Default tiles once params.map.enable is true
None. As with Draw.io, maps stay off until tiles and attribution are set (Map)
TOC text when an update has both a label and a title
The heading text; there is no separate label or title (Update)
When to extract GPS coordinates from photos
A later stage after explicit coordinates, as a site imaging.meta opt-in (Map)
Video accepts num natively as a figure; a map is wrapped in fig, like other diagram fences; audio is not numbered (Audio)
Delivery order
Stage
Scope
Why here
S1
Timeline and Update
CSS plus one heading-hook branch; no runtime, no configuration
S2
Video and Audio files, shared lookup extraction, media.js for autoplay
Highest observed use; replaces raw <video> and GIFs
S3
Social posts
One shortcode, one locale key
S4
Video platform cards and opt-in players (params.video_embeds)
Third-party iframes; needs CSP and privacy review
S5
Map: vendored Leaflet, params.map, the fence
The only new vendored engine
Later
Map photo pins from GPS metadata; audio chapters; oink fetch social
Each waits for its own evidence
Each stage ships with fixtures under tests/site/, intentional golden updates,
EN/ZH guides under /docs/components/, contract updates, and browser review on
this site. Stages are independent; a later one can be dropped without
reworking an earlier one.
Open decisions
Acceptance and release (resolved). All six components ship in OINK v1.7.0;
normative behavior now lives in the Components contract.
Demo media in Git. The guides’ video and audio demos add about 600 KB
of binary files to this site’s repository. Keep them in the page bundles,
or move them to object storage and reference them by HTTPS URL, which the
media form supports.
Decision log
2026-11-27 (first draft). Requirements and architecture for six
components in one page: timeline/event, {{%/* update */%}}, offline x
with a platform enum, audio, video, and opt-in OpenStreetMap map.
2026-11-27 (review). Split into six proposals plus this overview. Reduced
the public surface to one shortcode (x), one fence (map), and branches in
the image and heading hooks. Recorded the probe evidence above, the x parse
finding, the EXIF configuration requirement, and the roadmap conflict.
2026-11-27 (owner). Renamed the offline post component social so it no
longer conflicts with Hugo’s x. Removed the theme roadmap’s “add no new
component family” sentence, which had never been an owner decision; the
roadmap conflict section of this page went with it.
2026-11-27 (implementation and acceptance). All six components were
implemented on main with fixtures, goldens, invalid-input cases, and
runtime unit tests, accepted for OINK v1.7.0, and documented with guides and
demos on this site. Deviations from the drafts are recorded in each
component’s decision log.
2026-11-28 (owner). Applied the Markdown-first test to Social posts as
well: the shortcode becomes the > [!SOCIAL] callout, so no component in
this set needs a new shortcode. See the
Social post decision log.
7.9.6 - Timeline component
A native definition-list timeline for dated or ordered events in prose, with no shortcode and no runtime.
Native: a Markdown definition list followed by {.timeline}
New public API
The author marker .timeline; no shortcode, attribute, or configuration key
Runtime
None
Affected surface
Component contract, a new stylesheet layer, a new guide at /docs/components/timeline/
Summary
A timeline is a sequence of pairs: a marker (a date, a time, a version, “Day 2”)
and what happened. Markdown already has a construct for pairs, the definition
list. OINK styles a definition list marked {.timeline} as a vertical axis
with a marker column and an event column. Nothing else is added.
2024-05
: **First prototype.** The theme renders its own documentation.
2025-08
: **Markdown-first authoring.** Native forms replace most shortcodes.
2026-11
: **Plain CSS.** The stylesheet needs nothing but the Hugo binary.
{.timeline}
Problem
Prose pages often narrate events in order: incident postmortems, project
milestones, a product’s history, a conference agenda, a biography. Authors
write these today as bullet lists with a bold date, as tables, as steps
(whose generated numbers misstate the meaning), or as raw HTML. None of them
shows time as a visual axis, and none has a stable structure.
The visual grammar already exists. The Landing timeline section
(layouts/_partials/landing/sections/timeline.html) renders date, title, and
description on an axis, but only from Landing data on a landing page. Prose
cannot reach it.
Design principles
The structure is a pair. Each entry has exactly one kind of marker and a
body. A definition list encodes that directly (<dt>/<dd>); a bullet list
with a bold first word only imitates it.
Native first. The Markdown-first decision
prefers a native form when Goldmark can keep the meaning. It can: Goldmark
attaches the class to the <dl>, and a definition keeps full block content.
The marker is free text. “2024-05”, “09:02”, “v1.6.0”, “Day 2”, and
“Q3 2026” are all valid. The component does not parse dates, so it never
rejects a real-world marker.
One visual grammar. The prose timeline uses the same axis, node, and
marker-column vocabulary as the Landing section, expressed with article
tokens.
Goals and non-goals
Goals
A readable chronological axis in HTML from ordinary Markdown.
Identical meaning in Print, RSS, Markdown, and LLMS, with no new output
branch.
Zero JavaScript and zero configuration.
Non-goals
A timeline/event shortcode pair, per-event icons, tones, badges, or
links as parameters.
Date parsing, sorting, grouping by year, or relative times (“3 days ago”).
Horizontal, zoomable, or Gantt-style timelines (Mermaid already offers Gantt
and timeline diagrams for schedules).
Entries in the page outline; that is the Update component.
Replacing the Landing timeline section or steps.
Proposed behavior
Authoring
Each term (a line without a leading colon) is a marker. Terms are inline
Markdown on one line; plain text is recommended.
Each definition (: …) is an event body. Continuation paragraphs, lists,
and fences are indented as for any definition.
A marker may have several definitions; they render as consecutive events
under one marker.
{.timeline} sits on the line directly after the last definition, with no
blank line. As with every Goldmark block attribute, a blank line detaches
it and the marker is silently lost; the guide states this next to the
example.
The conventional event title is a leading bold phrase. It is a writing
convention, not syntax.
The native form requires Goldmark definition lists
(markup.goldmark.extensions.definitionList), which Hugo enables by default.
The component contract’s prerequisite list gains this line.
Rendering
Goldmark produces the markup; the theme adds only CSS, scoped to
.td-content dl.timeline so a site’s unrelated .timeline rules do not
collide:
Condition
Layout
Wide column
Two-column grid: a marker column sized to its content and capped (about 10rem), and an event column. An axis line runs along the start edge of the event column, with a node on each marker row
Narrow column
One column: marker above body, axis and nodes on the start edge
Ink, Terminal
Flat surfaces; square nodes (0px in Ink, 2px radius in Terminal); preset --td-meta-font-family (Inter sans-serif in Ink, IBM Plex Mono in Terminal) with tabular numerals
Forced colors
Axis and nodes use system colors; no meaning carried by color
Print
Axis as a thin border; no backgrounds; short entries avoid page breaks inside
RTL
Logical properties mirror the axis
Long tokens
Markers wrap rather than widen the column
Outputs
Output
Result
HTML
<dl class="timeline"> from Goldmark, styled by the theme; no runtime
Print
The same markup with print rules
Markdown / LLMS
The authored source (native forms keep source)
RSS
The <dl> as rendered; feed readers show terms and definitions
Accessibility
Screen readers announce a definition list with term/definition pairs in source
order. Markers are text, so nothing depends on the axis graphics, which are
decorative pseudo-elements.
Trade-offs and alternatives
Option
Decision
Reason
First-draft timeline + event shortcodes with time, title, badge, icon, tone, link
Rejected for the first stage
Two shortcodes and a parent/child collector for decoration, not a missing capability. A plain-text title parameter is weaker than a Markdown body, and the Markdown output would have to be synthesized
Bullet list with a bold date and {.timeline}
Rejected
The marker is not structurally separate; CSS would depend on li > p:first-child > strong:first-child and break when an item starts differently
A steps variant
Rejected
Steps generate numbers; a timeline marker is authored text
Reusing the Landing section through a data file
Rejected for prose
A data file per timeline moves prose out of the page. The visual tokens are shared instead
<ol> semantics
Not chosen
An ordered list announces order but not the marker/body pair. Order is still the source order in a <dl>
Costs of the chosen form:
Definition-list syntax is less familiar than bullets. The guide leads with a
copyable example.
GitHub and some editors do not render definition lists. The source still
reads as a marker line followed by : event lines.
Per-event decoration is out of reach. If evidence shows it is needed, a later
proposal can add a full form; the native form stays the primary one.
Compatibility
Purely additive. The theme gives .timeline no meaning today. A local consumer
scan found one site stylesheet using .timeline, scoped under its own
application class, so the scoped theme selector does not collide with it.
Implementation plan
Add a stylesheet layer (for example assets/css/td/timeline.css) and list
it in layouts/_partials/css/layers.html before the RTL, preset,
accessibility, and print layers.
Add a fixture page to tests/site/ covering single and multiple
definitions per marker, rich bodies, a marker with long tokens, and an RTL
page; record HTML, Print, Markdown, and RSS goldens with
bin/check-goldens.py --update.
Owning checks: bin/check-stylesheets.py, bin/check-goldens.py, and
hugo --source tests/site --printPathWarnings.
Update the bilingual component contract
(native form and prerequisite) and add EN/ZH guides with the cheatsheet row.
Review on this site: four presets, light and dark, desktop and mobile, RTL,
forced colors, and browser print.
Acceptance criteria
A definition list with {.timeline} renders the axis layout with no
template change and no runtime.
Markdown and LLMS outputs equal the authored source.
A definition list without the marker renders exactly as before.
Reviews pass for all presets, both color schemes, narrow screens, RTL,
forced colors, and print.
Open decisions
Marker column width. Recommended: content-sized with a cap. A fixed
width, as on the Landing section, aligns better but truncates “Q3 2026 –
Q1 2027”.
A compact modifier. Recommended: none in S1; add
{.timeline .td-timeline-compact} only if fixtures show a need.
Shared CSS with Landing. Recommended: share tokens and proportions, not
selectors; the two contexts have different containers.
Decision log
2026-11-27 (first draft).timeline/event shortcodes plus a
.timeline list marker.
2026-11-27 (review). Native definition list only; shortcodes, icons,
tones, and badges removed from the first stage.
2026-11-27 (implementation). Implemented as specified: assets/css/td/timeline.css (a content-sized marker column capped by fit-content(10rem)), the .timeline author marker registered in bin/check-namespace.py, and the timeline-update fixture with HTML, Markdown and Print goldens.
7.9.7 - Update component
Changelog entries as ordinary headings marked .update, with a date and tags, so every entry joins the outline, search, and Print without a shortcode.
Native: a Markdown heading with {.update date="…" tags="…"}
New public API
The author marker .update and two heading attributes, date and tags
Runtime
None
Affected surface
layouts/_markup/render-heading.html, component contract, a stylesheet layer, a new guide at /docs/components/update/
Summary
An update entry is a heading. Marking it .update adds a metadata line with a
machine-readable date and neutral tag chips, and gives the entry its visual
rhythm. Because the entry is still an ordinary heading, it joins the TOC,
keeps its self-link, keyboard heading navigation, and search section, and is
namespaced in multi-page Print — all with no new mechanism.
## v1.6.0 — Plain CSS stylesheets {.update date="2026-11-23" tags="Breaking, Performance"}
Stylesheets now assemble from plain CSS layers with only the Hugo binary.
### Highlights {#v1-6-0-highlights}
- SCSS hooks retired in favor of `assets/css/project.css`.
- Bootstrap JavaScript removed.
## Unreleased {.update}
Work merged after the latest tag.
Problem
Single-page changelogs, “What’s new” pages, weekly notes, and policy-change
logs are a sequence of dated sections. Authors write them today as headings
followed by an ad-hoc date line and badges. The date has no <time>
semantics, every site invents its own layout, and badges written inside a
heading leak into the TOC and anchor.
Mintlify’s <Update> shows the demand. OINK already has layout: releases,
but it serves a different case: one content page per GitHub release, with its
own URL, feed item, and assets. A product that wants one readable stream on
one page has no component.
Design principles
An entry is a heading. Membership in the outline is the essential
property; everything that already works for headings must keep working.
Native first. The heading hook already receives block attributes; the
probe confirmed class, date, and tags arrive intact and the TOC shows
only the heading text.
The page is the authority. An update page is the source of truth for its
own entries. A version that already has a release page is not described a
second time here, following the rule that
facts stay outside presentation strings.
Do not compete with the TOC. The docs shell already shows the outline
with scroll tracking in the right rail.
Goals and non-goals
Goals
Dated, tagged entries from ordinary Markdown headings.
Identical meaning in Print, RSS, Markdown, and LLMS.
Zero JavaScript and zero configuration.
Non-goals
A {{%/* update */%}} shortcode, a container, or a two-column sticky rail.
Separate label and title fields, a level parameter, or a link
parameter; the heading text, heading level, and body already express them.
Tag color vocabularies (for example “breaking” → red).
Per-entry URLs, feed items, or GitHub release binding; those belong to
layout: releases.
Generating entries from data, sorting, or filtering.
Proposed behavior
Authoring
Attribute
Rule
Invalid input
.update
Author marker on any heading level; usually ## for entries
—
date
Optional. String YYYY, YYYY-MM, or valid calendar YYYY-MM-DD
Non-string or invalid calendar date warns and drops the date; the entry and valid tags stay
tags
Optional. String of , or , separated plain text; items are trimmed, empty items skipped
Non-string warns and drops the tags
id
Existing heading rule; explicit #id recommended for version headings
Existing behavior
date and tags on a heading without .update warn and are dropped. That is
the heading hook’s existing rule for unsupported attributes, so no new
diagnostic path is needed. An entry without a date (for example “Unreleased”)
is valid.
The heading text is the entry’s label and title: ## v1.6.0,
## v1.6.0 — Plain CSS stylesheets, or ## 2026-11 weekly notes. Subsections
inside an entry are ordinary lower-level headings and nest under it in the TOC.
The metadata line sits after the heading, not inside it, so heading text, the
accessible name, the self-link, and the search section title stay clean. The
date shows the authored ISO string, which already matches OINK’s default date
format in every locale.
Styling, scoped to the article:
An entry heading gets extra space above it and a separator rule, which give
a long stream its rhythm.
The date uses the metadata font with tabular numerals.
Tags are neutral chips sharing badge geometry. Presets own their colors.
Ink and Terminal keep flat, square geometry; forced colors use system
colors; print drops backgrounds and keeps the separator.
Outputs
Output
Result
HTML
Heading plus metadata line; no runtime
Print
The same; multi-page Print namespaces the heading ID as for any heading
Markdown / LLMS
The authored source, including the attribute block
RSS
Heading plus metadata line as static HTML
Choosing between Update and release pages
Need
Use
One readable stream on one page
.update headings
One page per version, its own URL and feed item, release assets, GitHub binding
First-draft {{%/* update label date title tags level id link */%}} with a sticky two-column rail
Rejected
It works in Hugo (a percent shortcode that emits a heading does enter the TOC), but seven parameters re-encode what heading syntax already says; the label must be escaped into generated Markdown; the Markdown output must be synthesized; and it would be the second percent shortcode after steps
The sticky rail itself
Rejected
In the docs shell the left navigation, right TOC, and a rail would leave about 38rem for code and tables, and the rail repeats what the TOC already tracks. A per-entry wrapper is also required for position: sticky, so the rail forces the shortcode
One {{%/* updates */%}} container with headings inside
Rejected
Sticky children share one containing block and pile up; a grid cannot make a heading span its section. The visual gain does not justify a container
A front-matter page mode that turns every ## into an entry
Deferred
Implicit; mixes introduction headings with entries. Revisit only if pages show the explicit marker is tedious
Keyword-to-color tag mapping
Rejected
A hidden English vocabulary that never matches Chinese tags, and colored chips compete with presets
Badges inside the heading text
Rejected
They leak into the TOC, anchors, and search titles
Costs of the chosen form:
No Mintlify-style rail. The look is a clean entry stream, not a clone.
Attribute syntax on headings is less discoverable than a named shortcode; the
guide and the cheatsheet lead with it.
The Markdown output keeps {.update …} on the heading line. Agents read it
easily; it is the same trade-off every native form makes.
render-heading.html runs for every heading on every page, so the new branch
must stay cheap: test for the update class before any other work.
Compatibility
Additive. A heading without .update renders byte-identically. Today date and
tags on a heading already warn and are dropped, so no existing page can
depend on them.
Implementation plan
In render-heading.html, when the validated class list contains update,
allow date and tags, validate them, and emit the metadata line after the
heading.
Add a stylesheet layer (or a section of an existing content layer) and list
it in layers.html.
Fixtures: entries with and without dates, invalid dates, tags with
whitespace and empty items, nested subsections, an entry inside a multi-page
Print section, and a heading with date but no marker. Record HTML, Print,
Markdown, and RSS goldens.
Owning checks: bin/check-content-primitives.py (attribute policy),
bin/check-output.py, bin/check-goldens.py, bin/check-stylesheets.py.
Confirm search/sections.html keeps the heading text as the section title.
Update the bilingual component contract and add
EN/ZH guides with the cheatsheet row.
Acceptance criteria
TOC entries, anchors, keyboard heading jumps, and search sections are
unchanged by the marker.
<time datetime> appears only for valid dates; invalid input warns and keeps
the entry.
Headings without the marker are byte-identical to the current output.
Multi-page Print namespaces update headings like any other heading.
Preset, color-scheme, narrow-screen, RTL, forced-colors, and print reviews
pass.
Open decisions
Visual weight. Recommended: separator and metadata line only. A
start-edge axis per entry would need a wrapper and is deferred.
Date in the TOC. Recommended: no; the TOC stays compact and authors can
put a date in the heading text when it is the label.
Locale key for tags. Recommended: none; tag chips carry no extra label.
If an accessible group name proves necessary, reuse the existing taxonomy
label.
Decision log
2026-11-27 (first draft). Percent-delimited update shortcode with a
sticky rail and seven parameters.
2026-11-27 (review). Replaced by the .update heading marker with date
and tags; rail, tone mapping, and per-entry links removed.
2026-11-27 (implementation). Implemented in render-heading.html and assets/css/td/timeline.css. Headings without the marker stay byte-identical (the theme goldens prove it); invalid input is covered by check_update_headings in bin/check-content-primitives.py. No locale key was needed.
2026-11-27 (post-review hardening). Extracted styles to assets/css/td/update.css; added visually hidden , separators inside .td-update-meta to fix search-index, RSS, screen-reader, and copy token gluing; added rich-copy.js support; fixed dark-mode print contrast (--td-print-*) and h2.update bottom-border sandwich; replaced negative margin with :has(+ .td-update-meta) and tightened first-entry / h2+h3.update spacing; aligned Ink top border and tag surface; added if not .Attributes fast path, printf "%T" string type guards, real calendar date checks via time.AsTime, and full-width , tag splitting.
2026-11-27 (acceptance review). Firefox still copied the tags glued (FixDocs) and WebKit put each comma on its own line, because flex items are blockified and user-select: none removed the separators from the selection. The metadata line is now inline flow with <span class="td-update-sep">, </span> separators at font-size: 0, and all three engines copy 2026-11-23, Fix, Docs. The if not .Attributes fast path never ran, since Goldmark gives every heading an id; it now applies when that id is the only attribute, roughly halving the heading hook’s template time on the documentation site with byte-identical output. The fixture goldens record the separator markup and the new word count.
7.9.8 - Audio component
Audio through ordinary Markdown image syntax — a titled player with the theme’s control row for podcasts, voice samples, and recordings, with transcripts in a folded callout and shared single-active playback when multiple players appear on a page.
Accepted and shipped in OINK v1.7.0 (implemented 2026-11-27)
Owner
OINK maintainers
Delivery stage
S2, with video files
Form
Native: a block Markdown image whose destination is an audio file
New public API
None beyond accepting audio destinations; attributes caption, id, and preload
Runtime
Shared js/chunks/media.js for the control row and single-active playback
Affected surface
The media partial shared with Video, a stylesheet section, a new guide at /docs/components/audio/
Summary

{caption="OINK Radio · 24 minutes · recorded November 2026"}
> [!DETAILS]- Transcript
> Welcome back. This week we removed the last Sass compiler …
An audio file renders as a figure: the bracket text as a visible title, the
browser’s native <audio controls>, and an optional caption. The transcript,
show notes, or lyrics are ordinary content after it; a folded callout keeps
them out of the way in HTML and expanded in Print.
Problem
Podcast episodes, text-to-speech and voice-model samples, pronunciation guides,
music excerpts, and recorded talks need a player inside prose. Today
 warns and drops, and raw <audio> has no title, caption,
Print, or RSS form. A bare player tells the reader nothing about what it plays.
Design principles
Same syntax and branch as video. One media partial owns detection,
lookup, and static outputs for both.
The name is visible. A video shows its picture; audio has none, so the
bracket text doubles as the visible title and the player’s accessible name.
The page owns the controls; the browser owns playback. The native
<audio controls> is the no-JavaScript player. With the runtime, one
theme control row with a single seek bar replaces it in every browser
(revised 2026-11-28; the native strip first stood as the player).
Compose, don’t absorb. A transcript is content, and OINK already has a
folded container that prints expanded. The component does not grow a body.
Goals and non-goals
Goals
Local, bundle, global-asset, static/, and object-storage audio files.
A visible, accessible title; an optional caption.
Static Print, RSS, Markdown, and LLMS forms with a usable link.
Native playback works without JavaScript. The shared runtime draws the control row and pauses other audible players.
Non-goals
An audio shortcode or a transcript body inside the component.
Hand-typed metadata that can drift from the file: duration, artist.
Codec fallbacks (mp3=, ogg=, m4a=).
In the first stage: cover art, chapters, waveforms.
Podcast feeds or RSS <enclosure> elements; podcast distribution is a site
concern.
Proposed behavior
Detection
A block image is audio when its destination ends in mp3, m4a, aac,
oga, ogg, opus, wav, or flac in any letter case (a page or global
resource, a static/ path, or an HTTPS URL), or is a resource whose Hugo
media type is audio/*. Hugo defines no audio/* type by default, so the
media type only matters when a site declares one. Resolved local resources
preserve query strings and fragments (such as Media Fragments #t=30,60) with
their percent-encoding as written. An inline
audio destination renders as a plain link.
Attributes
Attribute
Rule
caption
Plain text below the title, linked via aria-describedby
id
Validated like other figure IDs; an ID that another unnumbered audio or video figure or a numbered Book target already uses warns and is dropped from whichever comes second. Heading and plain image IDs are not compared
preload
metadata or none; defaults to metadata for the first 6 audio players on a page and none from the 7th onward
num, poster, autoplay, track, width, height, link, command,
and options warn and are dropped. Book numbering is left out because
OINK’s numbered kinds are figures, tables, equations, and examples; calling a
recording a figure would mislabel it. An empty bracket text warns and the file
name becomes the title.
Rendering
<figureclass="td-media td-media--audio"><figcaption><spanclass="td-media__title"id="td-audio-…-a0-title">Episode 12: Leaving Sass for plain CSS</span><spanclass="td-fig-caption"id="td-audio-…-a0-caption">OINK Radio · recorded November 2026</span></figcaption><audiocontrolspreload="metadata"src="…/episode-12.mp3"aria-labelledby="td-audio-…-a0-title"aria-describedby="td-audio-…-a0-caption"><ahref="…/episode-12.mp3">Episode 12: Leaving Sass for plain CSS</a></audio><pclass="td-media__url"><ahref="…/episode-12.mp3">https://…/episode-12.mp3</a></p></figure>
Audio is always a figure (without .td-figure, so its header stays
start-aligned), because it always has a visible title. The player spans the
reading width; consecutive audio figures and an immediately following
.td-callout--details transcript use :has() positive margins so each
audio-transcript pair groups tighter than adjacent pairs: 8px between a
recording and its transcript, 16px between consecutive recordings, and the
ordinary media margins, 1.5rem above and 1.75rem below, around each group
(:where(.td-media):not(.td-figure), one class of weight above Bootstrap’s
figure reset). Presets style the
frame and title (the card takes --td-code-radius like callouts; Paper and Ink align its surface with adjacent callouts;
Terminal uses --td-brand-line-strong and --td-ui-font-family); the control
row follows the preset and color mode in every browser (see
Components), and the
no-JavaScript native player keeps the browser’s look.
preload="metadata" lets the browser show the duration without downloading
the file; switching the default to preload="none" from the seventh audio
player onward prevents connection bursts on long sample pages.
Outputs
Output
Result
HTML
<audio controls>, replaced by the theme control row from js/chunks/media.js
Print
Title, caption, and the file URL as a visible .td-media__link on screen and paper (paper-palette overrides in @media print)
Markdown / LLMS
The authored source; a following transcript callout stays readable text
RSS
Title as a direct link to the file (absolute URL) and the caption
Rich copy
Start-aligned figure preserving title, caption, and clickable URL link
The callout hook already renders folded callouts as static, expanded blocks in
dedicated Print and RSS, and Markdown keeps their source. A transcript written
as > [!DETAILS]- is therefore complete in every static output without any
audio-specific rule.
Large files
The Video guidance
applies: prefer object storage for long recordings; page-bundle audio is
committed to Git.
Trade-offs and alternatives
Option
Decision
Reason
First-draft {{</* audio */>}} with src, mp3, ogg, m4a, title, artist, cover, duration, chapters, caption, preload, loop, download, compact, and a transcript body
Rejected
Codec fallbacks are obsolete, duration and artist are facts that drift from the file, cover and compact create two layouts, and the body duplicates a folded callout
A runtime for a speed toggle and chapters
Speed adopted 2026-11-28; chapters deferred
The theme control row cycles speed in every browser; chapters need WebVTT evidence before growing the UI. The shared media script handles single-active playback
Hidden bracket text, as for images
Rejected
A bare player is unlabeled for sighted readers
Numbering as a Book figure
Rejected
A recording is not a figure; a numbered audio kind would need its own Book index, which nothing requests
Costs of the chosen form: no podcast-style card with cover art, and the player
looks slightly different in each browser. Both are acceptable for a first
stage whose job is to make audio publishable at all.
Later candidates
Each needs its own evidence and adds to js/chunks/media.js, which video
already introduces:
Chapters: from a WebVTT chapters track (the standard carrier) rather
than a parameter mini-language.
Cover art: poster on audio, if podcast pages ask for it.
Compatibility
Additive; today an audio destination warns and renders nothing.
Implementation plan
Audio lands with video files in S2 and reuses the same lookup extraction, media
partial, and fixtures. Specific work:
Audio detection, the figure layout, and static outputs in
content/media.html.
Fixtures: each source kind, an empty bracket text, an unsupported attribute,
inline audio, consecutive samples, and a transcript callout in each output.
Owning checks: check-media-primitives.py, check-output.py,
check-output-security.py, check-goldens.py, check-stylesheets.py,
tests/js/media.test.js, tests/js/rich-copy.test.js, and
tests/browser/audio.spec.mjs. No locale key is needed.
EN/ZH guide and cheatsheet row; contract update.
Acceptance criteria
A single player shows elapsed time in the page accent. Starting a second audible player pauses the first.
Each audio figure has a visible title and an accessible name via aria-labelledby (plus aria-describedby when captioned).
Print, RSS, Markdown, and LLMS contain no <audio> element and keep a usable
link (visible on screen and paper in Print; linked title in RSS).
A following > [!DETAILS]- transcript is expanded in dedicated Print and pairs tightly with its player on screen.
Open decisions
Title placement. Resolved: above the player, start-aligned.
Single-active playback in S2. Resolved: the same runtime handles progress for every file player and coordinates multiple audible players.
Decision log
2026-11-27 (first draft).audio shortcode with chapters, speed control,
mutex runtime, cover, duration, and transcript body.
2026-11-27 (review). Native image syntax with caption and id;
transcripts composed from a folded callout; runtime features deferred.
2026-11-27 (implementation). Implemented in the shared media partial and assets/css/td/media.css; no runtime and no locale key. Two invalid-input cases were added to bin/check-media-primitives.py.
2026-11-27 (review revision). Addressed deep-review findings: dedicated Print now uses visible .td-media__link; @media print resets audio cards to paper-palette tokens in dark mode; removed .td-figure from audio and enforced start alignment; switched <audio> accessible naming to aria-labelledby/aria-describedby (with render-block.html ID rewriting); preserved query strings and #t= Media Fragments on local resources; replaced negative margins with :has() positive margins for consecutive cards and Audio+Transcript pairing; aligned Paper and Terminal frame/title styling; preserved audio URL and start alignment in rich-copy.js; added preload attribute with 6-player auto-threshold (none from 7th onward); added unnumbered duplicate #id detection and accurate audio: warning prefix; enabled single-active playback in js/chunks/media.js only when 2+ players exist on a page; added nested <a> guard in check-output.py, expanded check-media-primitives.py, JS unit tests, and tests/browser/audio.spec.mjs.
2026-11-27 (adversarial review fixes). Restored the 24px/28px margins that :where(.td-media) had lost to Bootstrap’s figure { margin: 0 0 1rem } (now :where(.td-media):not(.td-figure)), so the 8px/24px pairing holds; single-active playback now treats any muted or zero-volume player as silent and also reacts to volumechange, so unmuting a playing loop pauses other audio and an author’s own muted loop is left alone; book/register-target.html checks unnumbered media IDs, making the duplicate-ID check two-way; local fragments keep their percent-encoding (EscapedFragment); preload warns only in HTML; the audio card takes --td-code-radius in every preset and Ink’s callout surface. The browser suite asserts absolute spacing and uses real play(); check_audio_matrix() covers upper-case extensions, a site-defined audio/* media type, encoded fragments, Book-target ID clashes in both orders, and a subpath baseURL.
2026-11-28 (control row). The owner judged the native strip plus the theme’s separate accent strip as two progress bars and asked for one bar that tells played and loaded time apart by color, styled per preset. Firefox and Safari do not expose their native track, so js/chunks/media.js now removes controls and draws one control row (play, time, a single seek bar, speed, mute and volume) with eight ui_media_* labels in all 32 locales; the native player remains the no-JavaScript fallback. Played, buffered and unloaded time keep at least 3:1 between played and each neutral in every preset and mode.
7.9.9 - Video component
Video through ordinary Markdown image syntax — local or object-storage files, muted looping demos that replace GIFs, and privacy-first cards for YouTube, Bilibili, and Vimeo.
Accepted and shipped in OINK v1.7.0 (implemented 2026-11-27)
Owner
OINK maintainers
Delivery stages
S2 (files, autoplay), S4 (platform cards and players)
Form
Native: a block Markdown image whose destination is a video file or a recognized video-platform URL
New public API
Image attributes poster, track, autoplay for video; configuration params.video_embeds
Runtime
Shared js/chunks/media.js for file players and enabled platform cards
Affected surface
render-image.html, the shared resource lookup, a media partial, a stylesheet layer, the configuration schema, a new guide at /docs/components/video/
Summary
Video uses the syntax authors already use for images:

{caption="One-command setup" poster="install.webp" track="install.vtt"}

{autoplay=true caption="Paper, Slate, Ink, and Terminal"}

{poster="talk.webp" caption="Conference talk, 2026"}
The image hook recognizes a video destination and hands it to a shared media
partial. A file becomes a native <video> with controls. autoplay=true turns
it into a muted, looping demo that plays only while visible and never under
reduced motion. A YouTube, Bilibili, or Vimeo URL becomes a static card that
links to the platform; when the site lists that platform in
params.video_embeds, clicking the card loads the platform’s player in place.
Problem
 warns and drops today, because the image resolver accepts
only image resources.
Authors fall back to raw <video> with no caption, numbering, Print, or RSS
form, and to raw <iframe> players that load third-party scripts and cookies
on page view, shift the layout, fail where the platform is blocked, and rot
when videos disappear.
Animated GIF demos are large and cannot be paused; the usual replacement is a
hand-written autoplay loop muted video that ignores reduced motion.
Evidence from local Markdown under ~/www and ~/pgsty (2026-11-27): two
blogs embed the same Bilibili <iframe> directly; a travel post uses raw
<video controls>; repository READMEs in the same corpus use autoplay loop muted videos whose URLs carry expiring signatures. No checkout uses Hugo’s
built-in youtube or vimeo shortcode.
Design principles
A video is a figure. It has a source, an accessible name, an optional
caption, and an optional Book number, exactly like an image. The image hook
already owns all four, so video extends it instead of adding a shortcode.
Precedent exists. GitLab Flavored Markdown renders image syntax that
points at a video or audio file as a player, and Obsidian embeds YouTube
videos written with image syntax. OINK’s own Draw.io component is a native
image form.
The URL is the identity. A platform URL is what readers, feeds, and
agents understand, and it carries the start time. The theme derives player
URLs from it at build time; nothing is fetched.
No third-party request without consent. By default nothing leaves the
page. With a site opt-in, the platform is contacted only after a reader
clicks.
Progressive enhancement. Every form works without JavaScript; the runtime
replaces native file controls with the theme control row, coordinates audible players, gates autoplay on visibility, and opens enabled embeds in place.
Goals and non-goals
Goals
Local, page-bundle, global-asset, static/, and object-storage (HTTPS)
video files.
Poster, one subtitle track, caption, Book numbering, and layout without
shift when a size is known.
A GIF replacement that is small, pausable, and respects reduced motion.
YouTube, Bilibili, and Vimeo without third-party requests by default.
Static, readable Print, RSS, Markdown, and LLMS forms.
Non-goals
A video shortcode, or overriding Hugo’s built-in youtube and vimeo.
Codec fallbacks with several <source> elements; MP4 (H.264) plays
everywhere OINK supports.
Streaming (HLS/DASH), custom player chrome, playlists, chapters.
Remote platform thumbnails, oEmbed, or any build-time request.
Platforms beyond the three, or arbitrary iframe URLs.
Proposed behavior
Detection
A block image is a video when its destination is one of:
Destination
Recognized by
Page, branch-bundle, or global resource
Hugo media type video/*
static/ path or HTTPS URL
Extension mp4, m4v, webm, ogv, or mov
Platform URL
A strict pattern below
An inline image with a video destination renders as a plain link to the file or
watch page, with the bracket text as link text. Anything else keeps today’s
image behavior.
Attributes
Attribute
Applies to
Rule
caption, num, id
All video
The shared figure contract; num registers a Book fig target
poster
All video
Image path through the shared image resolver. A local raster also supplies width/height
track
Files
One WebVTT file through the shared lookup. srclang is the page language; the label is the language name
autoplay
Files
true or false; see below. Warns and is ignored for platform URLs
width, height
All video
Positive integers; intrinsic size or aspect hint, overriding the poster’s
link, command, and options warn and are dropped. The bracket text is the
accessible name. Without width/height or a local poster, the box reserves
16:9 until metadata loads.
Files
<figureclass="td-figure td-media td-media--video"><videocontrolspreload="metadata"playsinlinesrc="…/install.mp4"poster="…/install.webp"width="1280"height="720"aria-label="Installing OINK in one command"><trackkind="subtitles"src="…/install.vtt"srclang="en"label="English"default><ahref="…/install.mp4">Installing OINK in one command</a></video><figcaption><spanclass="td-fig-caption">One-command setup</span></figcaption></figure>
Unlike a block image, a video always renders inside a <figure>, with or
without caption or num.
autoplay=true emits muted loop playsinline and a data-td-media-autoplay
marker, but not the autoplay attribute. The runtime starts playback when at
least half of the video is visible, the page is visible, and the reader has not
asked for reduced motion; it pauses when the video leaves the viewport. The
control row stays, so the motion can always be paused. Without JavaScript the
reader sees the poster or first frame and plays it by hand.
Platform URLs
Platform
Accepted URLs
Derived player
YouTube
youtube.com/watch?v=<id>, youtu.be/<id>, youtube.com/shorts/<id> with an 11-character ID; t or start
IDs are validated against these patterns before any URL is built; author text
never enters a player URL. A b23.tv/BV… short link resolves to the player;
only an opaque short link that cannot be resolved offline, such as
b23.tv/abc, renders the card without a player and warns with the full-URL
form.
Default output is a card: the poster or a neutral surface, a play glyph, the
bracket text, and the platform name, all inside one link to the canonical watch
URL. No iframe, script, or thumbnail request.
With the platform listed in params.video_embeds, the card also carries the
derived player URL. On click, the runtime replaces the card with an iframe that
has the bracket text as title,
allow="autoplay; picture-in-picture; fullscreen",
sandbox="allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox",
allowfullscreen, and referrerpolicy="strict-origin-when-cross-origin", and
moves focus into it. Without JavaScript the link still opens the platform.
Configuration
params:# Platforms whose player may load in place after a reader clicks.# Any of: youtube, bilibili, vimeo. Empty: cards only link out.video_embeds:[]
A non-list warns and keeps cards only; unknown names warn and are ignored. A
list (rather than a boolean) lets a site enable Bilibili without YouTube when
part of its audience cannot reach YouTube. Sites with a Content Security Policy
add the enabled player hosts to frame-src; the guide lists them.
Outputs
Output
Result
HTML
File players and enabled platform cards load the shared media.js
Print
Poster when present, caption and Book label, and the file or watch URL as visible text; no <video> or <iframe>
Markdown / LLMS
The authored source
RSS
Poster (absolute URL) when present and a link with the bracket text; no <video> or <iframe>
Ordinary browser printing of HTML shows the poster or current frame; print
rules reveal the URL beneath it.
Large files
A video in a page bundle is committed to Git. The guide recommends an
object-storage or CDN URL for anything beyond a few megabytes, in line with the
repository rules for binary assets. The theme does not measure file sizes at
build time; a size report belongs to oink-cli checks.
Trade-offs and alternatives
Option
Decision
Reason
First-draft {{</* video */>}} with src, youtube, bilibili, vimeo, webm, mp4, controls, muted, loop, gif, ratio, and more
Rejected
About twenty parameters restate what image syntax and figure attributes already express, and a shortcode would be a second way to place video
Overriding Hugo’s youtube and vimeo
Rejected
Hugo’s vimeo can fetch from Vimeo at build time (its simple mode); each override widens divergence from Hugo (see the X parse finding); a URL is clearer than an ID
It ignores reduced motion and keeps playing off-screen; the runtime gate is the accessible form
Remote platform thumbnails
Rejected
A third-party request on every view
A boolean params.video_embeds
Rejected
Reachability differs by platform and region
Costs of the chosen form:
Image syntax for video is a convention, not CommonMark semantics. Renderers
other than GitLab show a broken image; the Markdown output keeps the URL, so
agents still understand it.
Discoverability shifts from a shortcode’s parameter list to the image guide;
the cheatsheet gets its own Video row.
render-image.html gains a dispatch. The media branch lives in its own
partial so the image path stays readable and its goldens unchanged.
Compatibility
Additive. A video destination produces a warning and no output today, so no
page depends on that behavior. Image output must stay byte-identical, which the
existing goldens verify. params.video_embeds is a new key.
Implementation plan
Extract the lookup from content/image-resolve.html into a shared partial;
image goldens must not change.
Add content/media.html (detection, attributes, outputs) and dispatch to it
from render-image.html before image-only work.
Add assets/js/media.js as the stable chunk js/chunks/media.js, selected
from a Page Store flag in scripts.html; unit tests under tests/js/ with
mocked IntersectionObserver and matchMedia.
S4: platform patterns, params.video_embeds in hugo.yaml,
bin/check-params.py, and the generated configuration schema.
Locale keys in all 32 files: ui_video_play (“Play video”) and
ui_video_open (“Open on the video site”), checked by
bin/check-i18n.py.
Fixtures: files from each source kind, poster with and without size,
subtitles, autoplay, inline video, each platform pattern, invalid IDs, short
links, and each output. Owning checks: check-media-primitives.py (the
image hook and shared resolution), check-runtime-isolation.py (the chunk
flag), check-output.py, check-output-security.py, check-goldens.py,
check-stylesheets.py, check-params.py, check-i18n.py, node --test.
Browser review on this site: keyboard, focus after the player loads, reduced
motion, presets, mobile, and print.
Acceptance criteria
Pages with only plain platform links omit the media runtime.
With video_embeds: [], the HTML contains no player host URL.
Autoplay never starts under prefers-reduced-motion: reduce and pauses
off-screen.
Print, RSS, Markdown, and LLMS contain no <video>, <iframe>, or runtime
marker.
Existing image goldens are byte-identical.
Open decisions
Uncaptioned video (resolved). The shipped implementation always wraps
videos in <figure class="td-media"> for a uniform frame and consistent
print and typeset-copy output.
Subtitles. Recommended: one track per page; each language page names
its own file. A list form is deferred.
Bilibili comments. Recommended: danmaku=0 with no option in S4.
Unknown size. Recommended: reserve 16:9; vertical videos set
width/height or a poster.
Decision log
2026-11-27 (first draft).video shortcode with source modes, about
twenty parameters, gif=true, and opt-in facades.
2026-11-27 (review). Moved to native image syntax with three media
attributes, an accessible autoplay gate, platform URLs as identity, and a
per-platform params.video_embeds list.
2026-11-27 (implementation). Implemented in content/media-detect.html, content/media.html, content/video-embeds.html, assets/js/media.js and assets/css/td/media.css, with the lookup extracted into content/resource-lookup.html. Differences from this draft: the configuration key is the flat list params.video_embeds (the parameter contract flattens single-key maps); a video without caption or number keeps a td-media wrapper without a figcaption; Print and RSS name the video beside its URL; the locale keys are ui_video_play and ui_video_open. Both network settings are validated on every page. Eight invalid-input cases were added to bin/check-media-primitives.py, and tests/js/media.test.js covers the runtime.
2026-11-27 (review hardening). Fixed decimal parsing for leading-zero timestamps (08s, 010), expanded platform URL parsing (youtube-nocookie.com, music.youtube.com, player.vimeo.com, Vimeo ?h= and #t=, uppercase AV, b23.tv/BV…, trailing slashes, and 9:16 default ratio for YouTube Shorts), decoupled poster image dimensions from paired width/height aspect ratios, replaced setTimeout(0) autoplay event tracking with a FIFO expected-event queue, added iframe sandbox and tightened allow and the runtime player-URL regex, excluded .td-media-card__poster from Draw.io detection, fixed dark-mode play-button contrast, poster scrim contrast, narrow-screen card grid overlap, portrait 80vh symmetry, forced-colors styling, RTL play-icon alignment, and Print/RSS watch URLs (including browser print after iframe replacement). Added zero-binary media-type and video matrix checks in bin/check-media-primitives.py, video_embeds item enum generation in bin/generate-config-schema.py, and tests/browser/video.spec.mjs.
2026-11-27 (acceptance review fixes). Cards carry their ratio as --td-media-ratio and cap their width at min(100%, 80vh × ratio) (card and player), because WebKit does not narrow a box whose aspect-ratio height max-block-size clamps; where container units exist the ratio is a minimum height measured from the figure, because WebKit also keeps an aspect-ratio box at its ratio height and clipped wrapped titles. Browser print gives poster-less card text the paper ink in dark mode. Draw.io skips only images inside a.td-media-card again, leaving other linked diagrams editable. Bilibili’s embed-code src, player.bilibili.com/player.html?bvid=…|aid=…, is recognized instead of rendering as a remote image. Covered by the video matrix and a stylesheet contract in bin/check-media-primitives.py, tests/js/drawio.test.js and tests/browser/video.spec.mjs.
2026-11-28 (control row). File videos share audio’s theme control row: one seek bar whose colors tell played, buffered and unloaded time apart, speed, a captions toggle for the one track, mute and volume, and full screen on the figure with the row kept under the picture (iPhone falls back to the native player). Clicking the picture toggles playback. Native controls remain the no-JavaScript fallback.
7.9.10 - Map component
A map data fence whose place list is always the content, progressively enhanced with an opt-in OpenStreetMap-ecosystem map through vendored Leaflet and a site-chosen tile service.
Accepted and shipped in OINK v1.7.0 (implemented 2026-11-27)
Owner
OINK maintainers
Delivery stage
S5; photo pins from GPS metadata later
Form
Data fence: ```map with a YAML or JSON list of places
New public API
The map fence and its fields; configuration params.map
Runtime
None by default; vendored Leaflet through content-components.js when maps are enabled
Affected surface
layouts/_markup/render-codeblock-map.html, scripts.html, content-components.js, VENDOR.json, a stylesheet layer, the configuration schema, three locale keys, a new guide at /docs/components/map/
Summary
```map {caption="Kyoto in three days" route=true}
- name: Kinkaku-ji
lat: 35.0394
lng: 135.7292
text: Quietest right after opening.
image: kinkakuji.webp
link: "#day-1"
- name: Kiyomizu-dera
lat: 34.9949
lng: 135.7850
```
HTML, Print and RSS render a numbered list with names, notes, thumbnails and
OpenStreetMap coordinate links. Markdown and LLMS preserve the authored fence.
When a site enables maps and names its tile service, an interactive map with
matching numbered markers appears above the list in HTML. Nothing is enabled,
and no tile service is chosen, by default.
Problem
Travel writing, photo essays and Expo pages, event and office locations,
field trips, and site visits need places on a map. Authors use screenshots
(static, no links, stale), Google Maps iframes (API keys, billing, terms,
regional blocking, third-party scripts), or nothing. OINK has no way to say
“these places, in this order” that also survives Print, feeds, and agents.
Design principles
The list is the content; the map enhances it. A reader without the map
(Print, RSS, no JavaScript, a blocked tile host) gets the same places,
in the same order, with working links.
Network only after complete configuration. Tiles are third-party
requests from the reader’s browser. As with Draw.io, the theme ships no
default server and stays off until configured
(architecture contract).
The site chooses the tile service. Tile services have usage policies,
quotas, keys, and attribution terms. A theme default would make that legal
and operational choice for every site.
One form. A fence holds one place as easily as twenty; there is no
second shortcode.
WGS 84 coordinates. The system used by GPS, photo metadata, and
OpenStreetMap.
Goals and non-goals
Goals
A static list in HTML, Print and RSS and the original place data in Markdown and LLMS, with zero configuration.
An opt-in interactive map: numbered markers, popups with name, note,
thumbnail, and link, an optional route line, and dark tiles when provided.
No page scroll hijacking, keyboard operation, and localized controls.
Vendored engine, loaded only on pages that need it.
Non-goals
Google Maps, Mapbox SDKs, or any API-keyed engine bundled by the theme.
A theme-chosen default tile service.
A single-point map shortcode, named tile styles, custom marker icons or
tones, or a static fallback image parameter in the first stage.
GPX or GeoJSON tracks, clustering, search, routing, or geocoding.
Coordinate transforms for GCJ-02 or BD-09 tiles (see limitations).
Map tiles or images generated at build time.
Proposed behavior
Places
The fence body is a YAML or JSON list. Each item:
Field
Rule
Invalid input
name
Required, plain text
Item skipped with a warning
lat
Required number, −90 to 90
Item skipped with a warning
lng
Required number, −180 to 180
Item skipped with a warning
text
Optional plain text
—
image
Optional image through the shared image resolver; a local raster is resized for the list and popup
Unresolvable: warns, no thumbnail
link
Optional URL through the shared URL policy; a same-page #anchor is the common case
Invalid: warns and is dropped
Unknown fields warn. A fence with no valid place warns and renders nothing.
Explicit lat/lng keys avoid the latitude/longitude order confusion of
GeoJSON’s [lng, lat] arrays.
Fence attributes
Attribute
Rule
caption
Plain text figure caption
route
true connects places in list order with a line
zoom
Integer 1–22 (implemented range; drafted as 1–19). Default: 15 for one place; fit all places otherwise
height
A positive px, rem, em, vh or vw length; a percentage or zero warns and keeps the default, a responsive frame capped below the viewport height
id
Validated element ID
tab, group, value
The shared adjacent-tab behavior; the map resizes when its panel is shown
num is not supported, as for other diagram fences; wrap the fence in fig
when a Book number is needed.
Static form
HTML, Print and RSS use this static list.
<figureclass="td-map"><olclass="td-map__places"><li><spanclass="td-map__name">Kinkaku-ji</span><spanclass="td-map__text">Quietest right after opening.</span><ahref="https://www.openstreetmap.org/?mlat=35.0394&mlon=135.7292#map=16/35.0394/135.7292"rel="external">35.0394, 135.7292</a></li> …
</ol><figcaption>Kyoto in three days</figcaption></figure>
Coordinates are shown as authored. The OpenStreetMap link is an ordinary
outbound link, not a request.
Configuration
params:map:enable:falsetiles:""# required: HTTPS template with {z}, {x}, {y}; {s} and {r} allowedattribution:""# required: the plain-text attribution the tile service demandsdark_tiles:""# optional: used while the page is in dark modemax_zoom:19# optional
enable: true with a missing or invalid tiles or attribution warns and
leaves maps off. The guide shows configuration examples — OpenStreetMap’s
standard tiles (light use under the OpenStreetMap Foundation tile usage policy,
attribution required), a commercial service with a domain-restricted key, and a
self-hosted server — without making any of them a default. A key in a tile URL
is public; the guide says so.
Interactive map
When params.map is complete and the output is HTML:
The figure gains a canvas and a JSON copy of the validated places;
hasMap selects the content-components.js adapter and registers the
leaflet engine in data-td-component-engines. Leaflet’s stylesheet is
linked only on those pages, as the Asciinema player’s is.
The adapter mounts each map within 320px of the viewport, like the other
engines.
Markers are numbered HTML markers matching the list numbers, styled with
preset tokens; no marker images.
Popups are built with DOM APIs (textContent, element creation) from the
JSON: name, note, thumbnail, link. No innerHTML.
Scroll-wheel zoom is off, so reading never zooms the map. Zoom buttons,
keyboard control, and pinch remain. On narrow screens the frame stays shorter
than the viewport so the page can always be scrolled past.
With dark_tiles, tiles follow the color scheme; without it, light tiles stay
(no color inversion of map imagery).
Size is recomputed on resize, when a tab panel is shown, and when a
disclosure opens.
Attribution uses Leaflet’s attribution control with the configured text.
If the engine or tiles fail, the canvas hides and the list remains.
The list stays visible under the map as its legend and as the accessible
alternative.
Outputs
Output
Result
HTML, maps off
Static form only; no canvas, script, or tile URL
HTML, maps on
Map above the static form
Browser print
Print rules hide the canvas; the list prints
Dedicated Print
Static form
Markdown / LLMS
The authored fence
RSS
Static form with absolute thumbnail URLs
Engine
Leaflet (BSD-2-Clause) is small, needs no WebGL, and supports HTML markers and
keyboard control. On 2026-11-27 npm lists 1.9.4 as latest and 2.0 in beta
(2.0.0-beta.5, 2026-11-19). Vendor the current stable release at
implementation time, with license, version, source, and checksums in
VENDOR.json. If 2.0 is stable by then and is distributed only as an ES
module, the engine loader (a classic script with a readiness check) needs a
matching change first.
MapLibre GL with vector tiles or a single PMTiles file on object storage is the
stronger long-term route to self-hosted maps, at a larger size and with WebGL.
The fence format is engine-neutral, so a later proposal can switch or add an
engine without changing content.
Photo pins from GPS metadata
A place with a local photo and no coordinates could take its position from the
photo. Verified on Hugo 0.170.1:
Image.Exif was deprecated in Hugo 0.155 and is now removed.
Image.Meta returns Lat/Long only when the site’s
imaging.meta.fields includes the GPS fields. Hugo’s default field filter
excludes GPS, and a theme cannot change a site’s imaging configuration.
Published original photos keep their GPS data unless stripped, which can
reveal private locations.
This is therefore a later stage: explicit coordinates first, then GPS-derived
pins as a documented site opt-in with a privacy note.
Accessibility and privacy
The numbered list conveys everything the map does. Map controls get localized
names. Tile requests send the reader’s IP address and the viewed area to the
tile service, only after the site enables maps and only when a map comes into
view.
Limitations
Coordinates are WGS 84. Map services in mainland China commonly use GCJ-02 (or
BD-09), so WGS 84 markers on those tiles appear offset by hundreds of meters.
The first stage documents this and supports only WGS 84 tiles. A later
params.map option could convert markers for GCJ-02 tiles if a site needs it.
Trade-offs and alternatives
Option
Decision
Reason
Google Maps
Rejected
Keys and billing, terms that restrict caching, regional blocking, third-party scripts
A second form for what a three-line fence expresses
CARTO light/dark tiles as the default
Removed
A commercial service with its own usage terms; the theme should not choose it for every site
styles, center, marker icon and tone, fallback image, full
Removed for now
Numbered markers tie the map to the list; a fallback image duplicates the list
Hiding the list when the map mounts
Rejected
The list is the legend, the accessible alternative, and the print form
Static map images rendered at build
Rejected
Needs tiles at build time, contradicting offline builds
Click-to-load maps
Shipped as loading: click
Lazy loading on approach is the engine norm and stays the default; params.map.loading: click waits for an explicit button where privacy review or touch scrolling demands it
Costs: a vendored engine to maintain, a configuration step before any map
appears, and no default look out of the box. These follow directly from the
network policy.
Compatibility
Additive. map is a new fence language and params.map a new key. With maps
off, a page with a map fence is fully readable.
Implementation plan
Vendor Leaflet under assets/third_party/leaflet/ with VENDOR.json
entries.
render-codeblock-map.html with a parse partial (validation, thumbnails via
the image resolver and processing), static form, and enabled form.
params.map in hugo.yaml, the resolver with Draw.io-style completeness
warnings, bin/check-params.py, and the generated configuration schema.
A leaflet adapter in content-components.js; scripts.html engine and
stylesheet registration; unit tests with a stubbed engine.
Locale keys in all 32 files: ui_map_label and ui_map_open_osm; the zoom
controls reuse ui_diagram_zoom_in and ui_diagram_zoom_out.
Fixtures: maps off and on, one and many places, invalid places, route,
thumbnails from each source kind, tabs, and each output. Owning checks:
check-components.py (data fences), check-runtime-isolation.py,
check-vendor.py, check-output.py, check-output-security.py,
check-goldens.py, check-stylesheets.py, check-params.py,
check-i18n.py, node --test.
Browser review on this site with a configured tile service: keyboard,
touch scrolling, dark tiles, tabs, presets, print.
Acceptance criteria
With maps off, no output contains a tile URL, the Leaflet script, or its
stylesheet.
With incomplete configuration, the build warns and behaves as maps off.
The list is identical with maps on and off.
Scroll-wheel input over a map scrolls the page.
Popups contain no author HTML.
Open decisions
List presentation under the map. Recommended: always visible, compact.
Alternative: collapsible for long lists.
Marker style. Recommended: numbers only in S5; icons later on request.
Engine version. Recommended: decide between 1.9.4 and 2.x when S5
starts.
GCJ-02 support. Recommended: out of scope until a site asks.
Decision log
2026-11-27 (first draft).map fence plus single-point shortcode,
CARTO default tiles, named styles, marker icons and tones, fallback images,
and EXIF pins in C3.
2026-11-27 (review). One fence; no default tile service; the list is
always rendered; EXIF pins moved to a later stage after verifying Hugo’s
Image.Meta defaults.
2026-11-27 (implementation). Implemented with vendored Leaflet 1.9.4 (VENDOR.json), render-codeblock-map.html, content/map-config.html, a leaflet adapter in content-components.js and assets/css/td/map.css. Differences from this draft: the fence is parsed as YAML by resource name, because Hugo’s content sniffing reads a YAML list written as - {name: …} as JSON; the zoom controls reuse ui_diagram_zoom_in and ui_diagram_zoom_out, so only ui_map_label and ui_map_open_osm are new; params.map is validated on every page. Invalid input is covered in bin/check-content-primitives.py and bin/check-params.py; tests/js/content-components-map.test.js covers the adapter.
2026-11-27 (review hardening). Fixed {s} subdomain tile validation and YAML .nan coordinate build crash; raised selector specificity in map.css to outrank body-end leaflet.css, aligned popups/controls/focus rings across all four presets and dark mode, fixed popup close-button overlap, dark-mode print ink, slate dark --td-on-link, RTL popup/coordinate direction, forced-colors popup border, and print pagination; added touch single-finger scroll pass-through, keyboard-nav.js map-focus yield, complete tile-failure canvas hiding, prefers-reduced-motion support, marker aria-label, Escape popup dismissal, localized close label, tabs.js-first ordering for hidden tabs, list-click panning, and rich-copy.js canvas exclusion; added optional attribution_url (OSM copyright link compliance), subdomains, and loading: click (32-locale ui_map_load), plus Playwright regression coverage in tests/browser/map.spec.mjs.
2026-11-27 (adversarial review). A non-string params.map.loading (a list or map) stopped the build, because cond evaluated strings.TrimSpace on it; it now warns and keeps lazy. Tile templates may use only {s}, {z}, {x}, {y}, {-y} and {r}: any other placeholder, in the host, path or query, warns at build time, since Leaflet throws on one it cannot fill and left an empty map. When every first tile fails, the map is removed only after Leaflet finishes dispatching the layer’s load, which otherwise threw a TypeError; failing dark_tiles fall back to the dimmed light tiles instead of removing the map for good. The loading: click button names every host the map may contact, {s} as * and the dark_tiles host included. tests/browser/map.spec.mjs runs in test:content-components. Minor follow-ups: a pen drags the map like a mouse; a popup opened with Enter takes focus and returns it to its marker when closed from inside; a load button activated from the keyboard hands focus to the map; params.map.subdomains is documented as empty by default (Leaflet’s abc); ui_map_load reads “Завантажити мапу” in Ukrainian and “טעינת המפה” in Hebrew.
7.9.11 - Social post component
A static, offline card for quoting a post from X or another social platform, written as a > [!SOCIAL] callout — author, handle, avatar, date, link, and a Markdown body — with no build-time fetch and no runtime.
> [!SOCIAL] OINK Example `@oink_example`
>
> The post text, in ordinary **Markdown**, with its line breaks and links.
>
> 
{avatar="/logo.svg" date="2026-02-15" url="https://example.com/oink_example/status/1" platform="x"}
The card shows the avatar, name, handle, platform icon, body, attached images,
date, and a link to the original. Everything comes from the page; nothing is
fetched at build or view time. platform (default none) selects the icon
for X, Bluesky, Mastodon, Threads, Weibo, Zhihu, Telegram, or LinkedIn posts
with the same layout. Outside Hugo the source is an ordinary blockquote, so
GitHub, an editor preview, or Obsidian shows the name, text, images, and any
quoted post.
Problem
Hugo’s built-in x shortcode requests oEmbed data from X at build time (Hugo
caches the response locally, so a clean build such as CI fetches it again),
and the resulting embed loads widgets.js in the reader’s browser. For OINK
that means:
the build needs the network, contradicting the rule that a normal build
downloads nothing, and fails where X is unreachable;
readers load a third-party script with tracking and layout shift;
the quote disappears when the post is deleted, made private, or the account
is renamed;
the card ignores OINK’s presets, color schemes, Print, Markdown, and RSS.
The v1.7.0 social shortcode solved those, but its source read poorly outside
Hugo: in plain Markdown the opening tag and the first line of the post merge
into one paragraph, the closing tag hangs off the last one, and a parameter
avatar never shows. Its Markdown output also needed a second, hand-built
attribution renderer.
The common workaround, a screenshot, is inaccessible (text in pixels), not
searchable, and absent from LLMS output.
Design principles
A quoted post is a quotation. It renders as
<figure> + <blockquote cite> + attribution — an editorial card that
reads as a citation, not a pixel copy of the platform.
The page holds the content. The author saves the text and media once;
the theme renders what is there and never fetches.
Compose the body. Images, galleries, and quoted posts are written with
syntax OINK already has, so the card needs no parameters for them.
The platform identifies, it does not restyle. One layout for all
platforms; platform changes only the icon.
Leave Hugo’s names alone. The component has its own name, so Hugo’s
embedded x keeps working exactly as Hugo documents it.
Markdown first. A quoted post is a blockquote with attribution, which
Markdown already writes. The callout title is the one slot Goldmark hands
over separately, so it carries the identity line, and block attributes
carry the facts Markdown has no syntax for.
Goals and non-goals
Goals
A recognizable, accessible post card with zero network use and zero
JavaScript.
Text, links, images (with Image Zoom), multi-image grids, and one level of
quoted post.
The same static card in Print, the author’s own blockquote in Markdown and
LLMS, and a blockquote with attribution in RSS.
A source that reads as a quotation in any Markdown viewer.
Non-goals
Fetching anything, at build time or in the browser; the theme never calls a
platform API.
Overriding or changing Hugo’s built-in x shortcode.
Engagement counts (likes, reposts, replies, views) and verification badges.
Per-platform skins, brand colors, or imitation of a platform’s interface.
Threads, replies, polls, or video playback inside the card. A post’s video is
written as a Video in the body.
GitHub issues, Hacker News, Reddit, or link-preview “bookmark” cards; their
data shapes differ.
A data-file form or an author registry in the first stage.
Behavior
Title and attributes
Part
Rule
Invalid input
Title
The identity line, rendered as written with inline Markdown. Each code span becomes the handle (<span class="td-social__handle" dir="ltr">); the rest is the name
Missing: see below
avatar
Image path through content/image-resolve.html (parameter="avatar"); decorative (alt="") because the name is adjacent
Unsafe scheme or non-image resource: warns naming avatar and drops; a static path missing from the project’s own static/ (checked only when that directory exists, after decoding and cleaning the path): warns with the ID social:avatar-static, which a site using module mounts or a custom staticDir can list in ignoreLogs, and keeps the path; a static path that climbs above the site root with ..: warns (social:avatar-static), is dropped, and the card draws the initial; remote HTTPS URLs are never fetched
date
Plain text. YYYY-MM, or YYYY-MM-DD optionally followed by T or a space, HH:MM, optional :SS, and an optional Z or ±HH:MM, on a real calendar day, becomes <time datetime> (the space written as T); anything else renders as <span class="td-social__date">
—
url
Original post, through the shared URL policy (HTTP/HTTPS with rel="external", or site-internal path without rel="external"). Optional, so a deleted post can still be quoted
Invalid: warns and is dropped
platform
x, bluesky, mastodon, threads, weibo, zhihu, telegram, linkedin, none (default at every depth)
Unknown or empty: warns, uses none
content/attributes.html validates the attribute line: class, data-* and
aria-* pass to the figure, and any other name warns. Attribute values are
strings, so the shortcode’s type warnings have no counterpart. A + or -
fold marker warns and is ignored.
A title is required. Without one, the callout warns and renders the body as a
plain blockquote (or a blockquote link when the body is empty and url is
valid), so the quoted words are not lost. With a body, url survives only as
the quote’s cite attribute; date, platform and avatar are ignored.
Without an avatar, a circle shows the first grapheme cluster of the title’s
plain text after leading @, spaces, and invisible format characters are
removed, falling back to a person icon if nothing visible remains; no default
avatar or Gravatar is requested.
The render hook cannot see an enclosing callout, which is why the default
platform is the same at every depth instead of x on top-level cards.
Body
The body is the callout’s own Markdown, rendered with the page:
Content
Written as
Text, line breaks, links, code
Ordinary Markdown
One attached image
A Markdown image; it gets Image Zoom when eligible
Several images
A gallery fence inside the body (compact grid matching the card radius)
A quoted post
A nested > [!SOCIAL], whose attribute line carries one >; it is styled by the .td-social .td-social descendant selector
A video
A Video image line
Footnotes in the body resolve like any page footnote. An empty body warns;
with a valid url the card renders as a link-only card (or a blockquote link
without a title), otherwise it renders nothing.
Rendering
<figureclass="td-social td-social--x"><figcaptionclass="td-social__author"><imgclass="td-social__avatar"src="/logo.svg"alt=""loading="lazy"decoding="async"><spanclass="td-social__names"dir="auto">OINK Example <spanclass="td-social__handle"dir="ltr">@oink_example</span></span><iclass="td-social__platform fa-brands fa-x-twitter"aria-hidden="true"></i><spanclass="visually-hidden"> · X</span></figcaption><blockquoteclass="td-social__body"cite="https://example.com/oink_example/status/1">…</blockquote><pclass="td-social__meta"><ahref="https://example.com/oink_example/status/1"rel="external"><timedatetime="2026-02-15">2026-02-15</time> · View original<spanclass="visually-hidden"> — OINK Example @oink_example</span></a></p></figure>
Platform
Icon (vendored Font Awesome 7.3.1)
x
fa-brands fa-x-twitter
bluesky
fa-brands fa-bluesky
mastodon
fa-brands fa-mastodon
threads
fa-brands fa-threads
weibo
fa-brands fa-weibo
zhihu
fa-brands fa-zhihu
telegram
fa-brands fa-telegram
linkedin
fa-brands fa-linkedin
none
None
The icon is decorative and monochrome; the platform name is available to
assistive technology as visually hidden text when present. The card uses
elevated surface tokens (--td-brand-elev) with --bs-body-bg for nested
quotes, keeps body typography independent of blockquote’s Kai rule, and
follows each preset’s geometry (0px in Ink, 2px and square avatar in
Terminal). Print maps the card to --td-print-* tokens regardless of screen
color mode and prints the original URL after the link. RTL mirrors through
logical properties while isolating LTR handles and ISO timestamps; long
handles and URLs wrap.
Outputs
Output
Result
HTML
The card; no runtime. Body images opt into the shared Image Zoom as usual
Print
The static card on the paper palette with the URL visible
Markdown / LLMS
The callout exactly as written, with its attribute line; a nested post stays a nested blockquote
RSS
A <figure> with <blockquote cite> (omitted on link-only cards) and an attribution line using absolute URLs, the handle as plain text; no avatar
Hugo’s own x
Hugo’s embedded x shortcode remains available and unchanged: it fetches
oEmbed data at build time and loads X’s script in the browser. OINK does not
intercept it. The guide recommends the [!SOCIAL] callout for offline,
permanent quotes.
Overriding x was the first plan and was rejected after a probe on Hugo
0.170.1: a shortcode template that reads .Inner makes Hugo’s parser require
every call to be closed or self-closed, so Hugo’s documented unclosed form
{{</* x user="…" id="…" */>}} would fail to build
(shortcode "x" must be closed or self-closed) before any template could warn.
Rights and archiving
The theme stores nothing by itself. Authors decide what they may quote and
which avatars and media they may keep; the guide says so. A card persists after
the original is deleted, which is the point of offline quoting; url is
optional so the author can drop a link that no longer resolves.
Trade-offs and alternatives
First-draft element
Decision
Reason
The name x, replacing Hugo’s built-in
Renamed social (owner, 2026-11-27)
No conflict with Hugo, no parse failure for existing x calls, and the name reads naturally for every platform
likes, reposts, replies, views
Removed
Snapshots that go stale and mislead; four locale keys
verified (blue, gold, gray)
Removed
Platform-specific, changes over time, and implies verification the theme cannot perform
images and image_alts lists
Replaced by body images and gallery
Alt text stays next to each image; Zoom, processing, and resolution come for free
A data file per post is a second authority; a helper can write shortcode text
data/x_authors.yaml registry and automatic assets/avatars/<handle>.* lookup
Removed for now
avatar="avatars/name.jpg" already shares one global file; implicit file lookups are hard to discover
github, hackernews, reddit platforms
Removed
Titles, threads, and missing avatars are a different component
Automatic handle prefixes per platform
Removed
Handles are shown as written
Per-platform styles
One layout
Presets own color; platform redesigns would otherwise date the theme
The social shortcode with six parameters (shipped in v1.7.0)
Replaced by the [!SOCIAL] callout (owner, 2026-11-28)
The source reads as a quotation in any Markdown viewer, Markdown and LLMS output is the source itself, and footnotes, Image Zoom and other hooks apply to the body without a block renderer
A plain blockquote with a closing — Author line and {.social}
Rejected
The hook would have to parse the attribution out of rendered HTML to lay out the header and the date line
An avatar written as a Markdown image in the title
Rejected
A probe on Hugo 0.170.1 shows that an image ends the alert title: text after it moves into the body, and a trailing image leaves an empty paragraph
The date link written in the title
Rejected
It would hide the date and URL in a presentation string and lose <time>, cite, and the RSS absolute URL
Reusing [!QUOTE] with social attributes
Rejected
Attributes would decide whether one type renders as a callout box or a card
Companion helper
Writing the parameters by hand is the main friction. A future
oink fetch social <url> in ../oink-cli could, once at writing time,
download the avatar and media into the page bundle and print a ready
[!SOCIAL] callout. It is outside this proposal and needs its own oink-cli
proposal, because the endpoints it would use are unofficial, may change or be
restricted, and raise terms-of-use questions. The theme never depends on it.
Compatibility
v1.7.0 added the social shortcode, taking the count from 29 to 30.
The callout form removes it again (30 back to 29) and adds the social
callout type. A page that still calls the shortcode fails to build with
template for shortcode "social" not found.
bin/migrations/oink06.py migrate --only social rewrites every call:
author becomes the title text, handle a code span, the other parameters
the attribute line, and a nested call a nested callout. It writes
platform="x" on top-level cards that relied on the shortcode’s default and
reports calls it cannot express. On vonng.com it converted 492 calls (89
nested) in 149 files with no findings, and 88 cards rendered from four
converted bundles matched the v1.7.0 cards in platform, nesting, images,
links, dates and visible text.
Block attributes need markup.goldmark.parser.attribute.block: true, which
OINK already requires.
Implementation and checks
Part
Where
Template
layouts/_partials/content/social.html, reached from the social branch of layouts/_markup/render-blockquote-alert.html (shared attribute, URL and image partials; static Print and RSS branches)
Styles
assets/css/td/social.css
Locale
ui_social_view_original in all 32 catalogs
Fixture
tests/site/content/fixtures/social.md and its Chinese peer, pinned by HTML, Markdown, Print and RSS goldens
Invalid input
Thirteen social-* cases plus check_social_posts() and template/CSS contract checks in bin/check-content-primitives.py; bin/check-components.py keeps the shortcode deleted and failing as missing; Playwright coverage in tests/browser/social.spec.mjs
Migration
bin/migrations/oink06/transforms/social.py, frozen by tests/migrations/test_oink06.py
A build with network access disabled renders every fixture.
No social page requests anything from a platform host, at build or view time.
Markdown and LLMS contain the source callout and no component HTML.
A plain Markdown viewer shows the name, handle, body, images and quoted post
as a blockquote.
Invalid input warns and keeps the quoted words whenever a body exists.
Preset, color-scheme, narrow-screen, RTL, forced-colors, and print reviews
pass.
Open decisions
Platform list. Expanded to x, bluesky, mastodon, threads,
weibo, zhihu, telegram, linkedin, and none. Add another platform
only with a vendored icon and an author request.
Author registry. Recommended: not yet; reconsider after real pages show
repeated metadata.
Decision log
2026-11-27 (first draft). Offline x with a platform enum of eight,
metrics, verification badges, image and quote parameter sets, a data-file
form, and an author registry.
2026-11-27 (review). Reduced to six parameters and a composed Markdown
body; recorded the verified parse failure for legacy x calls.
2026-11-27 (owner). Renamed to social to avoid conflicting with Hugo’s
x; platform keeps the other platforms.
2026-11-27 (implementation). Implemented as specified, with the platform
name added as visually hidden text and the print rule showing the original
URL after the link.
2026-11-27 (deep review & hardening). Fixed dark-mode print cutout,
nested CSS specificity, RTL BiDi isolation, nested platform SR symmetry,
anonymous empty+url output, HTML5 <time> validation, grapheme initial
slicing, compact card gallery layout, CJK body font isolation, forced-colors
avatar border, offline static/ avatar warning, and context-aware Markdown
inline escaping; added zhihu, telegram, and none platforms and
Playwright regression coverage.
2026-11-27 (adversarial review). Initials skip invisible leading
characters (zero-width space, BOM, bidi marks, any Unicode space); the static
avatar check decodes and cleans the path, warns on .. above the site root,
and makes its missing-file warning suppressible as social:avatar-static;
Markdown ends every card with a blank line so adjacent cards stay separate
quotations; the guide’s date, avatar-resolution and anonymous-card wording
now matches the implementation.
2026-11-28 (owner). Markdown first: what Markdown can present is not
converted. The shortcode’s source read poorly in plain Markdown, so the card
becomes the > [!SOCIAL] callout; the title is the identity line with the
handle as a code span, and avatar, date, url and platform become
block attributes. Probes on Hugo 0.170.1 confirmed that the title keeps
inline Markdown, that attributes attach directly under a callout and under a
nested one with a single >, and that an image cannot sit in the title.
2026-11-28 (implementation). The shortcode and
content/markdown-escape-inline.html are deleted; the card renders from
content/social.html; platform defaults to none at every depth because
the hook cannot see a parent; nested styling moves to a descendant selector
and the deeper-nesting warning is dropped; Markdown and LLMS keep the
source; the migration toolkit gains a social transformation.
7.9.12 - OINK CLI and the next product stage
The accepted independent CLI boundary and local first-stage scope, with later adoption, theme, migration, and content-model work still proposed.
Local first-stage candidate; later roadmap remains draft
The independent Go repository pgsty/oink-cli and first-stage development were authorized on 2026-09-29. Its six commands now have a local 0.1.0-dev implementation, with final local acceptance recorded separately. Current behavior belongs to the CLI decision and result contract and CLI introduction. Theme 1.2, its tooling descriptor, Docsy migration, version lifecycle, OpenAPI, MCP, and Studio remain proposals.
Record
Value
Status
Repository choice and first-stage scope accepted. Local candidate implemented and validated. Later roadmap remains draft
Owner
OINK maintainers
Date
2026-09-29
Scope
OINK theme, independent CLI, existing Starter, and documentation site
Affected contracts
Architecture, configuration/diagnostics, outputs, migration, and later version navigation/API content
Source snapshot
Theme HEAD 3a18234, documentation HEAD 85f16bf, Starter HEAD 137843b, plus the explicitly identified local work below
Recommendation
Create a separate oink-cli repository, publish one executable named oink, and keep OINK as the single product identity. The theme renders content. The CLI helps users initialize, inspect, validate, upgrade, and eventually migrate their sites. The documentation site continues to own public guides, bilingual design records, and integration acceptance.
The CLI contract owns first-stage behavior, while the dated acceptance record lists executed checks and remaining limits. This roadmap stays active for its later stages and adoption targets.
The first release should improve the path from an existing repository to a reliable publication. Its four main workflows are doctor, check, init, and upgrade. dev and build may provide small, transparent Hugo shortcuts. A supported Docsy migration path follows evidence from actual input repositories. Version lifecycle and OpenAPI generation come after that first usable release, with one major content-model project active at a time.
Keep the theme usable without the CLI. Commit or otherwise deliver generated Hugo inputs. After you remove the CLI, ordinary Hugo must still be able to build the site. Regenerating those inputs remains a separate operation.
Product position and target user
Recommended public description:
OINK is a local-first documentation toolkit built on Hugo, publishing engineering knowledge for readers and agents.
Retain “Hugo theme” in installation and discovery pages because it describes what users install, while “knowledge compiler” describes the internal architecture. A new name should keep the current Markdown/Hugo workflow clear.
Prioritize Git-oriented maintainers of open-source infrastructure, developer tools, and multilingual technical documentation. They need to get a site working, diagnose failures, upgrade safely, and move content without losing URLs or meaning.
For the first stage, non-goals include a visual CMS, hosted accounts, a deployment control plane, a package marketplace, an LLM runtime, a semantic-search service, and a new rendering engine. Books, blogs, and landing pages remain supported, but their feature catalogs do not drive this roadmap.
Evidence and changes to the research recommendation
This proposal considers the supplied strategy report and checks it against the local implementation, bilingual Design section, Starter, and current primary documentation.
Observation
Product consequence
OINK already has a public Starter, generated configuration schemas, migration scripts, publication tools, and focused theme checkers
Provide selected workflows as product features. Do not create a second implementation of every tool
The front-matter schema deliberately omits type constraints
Strict checks must follow the owning resolvers and actual Hugo output
Existing version support includes a cross-site menu, archive banners, and optional path concatenation
Focus on lifecycle and reliable page correspondence
Current version documentation explicitly uses independent Hugo builds
Preserve that model initially. Do not silently add a multi-version renderer to one build
OpenAPI widgets become specification links outside HTML and have documented accessibility exclusions
Static, accessible endpoint content is a concrete future improvement
Backlinks are implemented. G2/G3 remain draft
Graph visualization remains a draft proposal
bin/update-consumers.py exists in this working tree as local maintenance tooling
Its release-resolution and preservation rules serve as design input for oink upgrade
The supplied report emphasizes adoption and an optional tools layer. Four changes make its recommendations implementable:
Put safe upgrades alongside initialization and diagnosis. Existing users have an immediate, testable maintenance need.
Separate maintainer regression checkers from consumer checks. A synthetic-fixture checker is not automatically a general-purpose site validator.
Treat migrations as supported input profiles with explicit boundaries rather than complete Docsy or arbitrary MDX conversion.
Replace the simultaneous versioning/OpenAPI/graph/platform program with sequential decisions.
Existing tools illustrate the workflow tradeoffs. Mintlify’s CLI exposes preview, validation, and link checking. Nimbus combines scaffolding and agent-readable output while remaining pre-1.0. Docusaurus makes version snapshots explicit and warns about their maintenance/build cost. Copying Nimbus’s full source-owned UI model would move upgrade work to OINK consumers. Use that pattern for small generated recipes. Keep the upgradable theme module.
Why a separate repository
Option
Benefit
Cost
Decision
Extend Python scripts under theme bin/
Fastest small maintenance improvements. Tests accompany the change
Difficult installation and distribution. No unified public command contract
Retain for internal and historical tooling
Put cmd/oink in the theme’s root Go module
One checkout and atomic source edits
Mixes a Hugo asset module with application dependencies, binary releases, and consumer support
Do not choose for the public CLI
Use an isolated Go submodule in the theme repository
Atomic repository changes without sharing Go dependencies
Separate module tags and releases still need management. Code can more easily depend on unpublished theme internals
Viable fallback for a prototype with a fixed time limit. Not the preferred product repository
Create pgsty/oink-cli
Clear executable boundary, independent releases, no need for users to clone theme internals
Requires explicit compatibility and cross-repository acceptance
Accepted. Local Go repository created
This decision assigns release and maintenance responsibilities rather than claiming that a monorepo is technically impossible. A nested module can isolate dependencies, and separate repositories still require coordination: a renderer change may need two pull requests, paired contracts, and a compatibility test. OINK already operates a theme/site/Starter split, so that cost is acceptable if the public boundary stays small.
Theme and CLI releases must not share a forced version number. A proposed oink CLI 0.1.x should work with a tested OINK 1.1.0 baseline and the next supported theme release. Declare compatibility per capability. Report unsupported functionality. Do not assume that every schema from the newest theme is valid for every older site.
Do not create separate repositories for the linter, migration engine, OpenAPI generator, or a shared SDK now. They can begin as internal CLI packages. The binary can be built in Go without importing Hugo’s internal Go packages or making the theme module depend on the CLI.
Existing CI/provider tools. The first CLI release does not deploy
optional oink CLI
init / doctor / check / upgrade
later migrate / generate
|
v
user-owned Markdown + Hugo config + data
|
Hugo Extended + OINK theme
|
HTML / Print / Markdown / search / indexes
|
readers / agents / optional adapters
The CLI reads Hugo’s effective configuration, the resolved theme’s published contract artifacts, and rendered outputs. It must not guess the final page tree from filenames or maintain a second navigation resolver. Hugo config exposes effective configuration. Module inspection must also account for replacements, workspaces, and vendoring.
Next theme release: proposed OINK 1.2
This section remains draft. The local CLI candidate works against published OINK v1.1.0. The first-stage CLI decision neither accepts nor requires a 1.2 release or a new tooling descriptor.
Set an adoption objective for this release: a site can explain its configuration and output capabilities to tools, and upgrade without adopting a new authoring model. The release should be small enough to ship independently of the broader roadmap.
Priority
Requirement
Acceptance
P0
Package a small, versioned tooling descriptor beside existing schemas, describing available schema/output contracts and supported toolchain boundaries
Check the descriptor against its owning implementation. The CLI can inspect it from the resolved module. No extra per-page output or runtime request
P0
Make selected high-value configuration diagnostics actionable: parameter, invalid value, expected form, fallback, and owning guide
Cover actual onboarding failures such as Goldmark/output/language configuration. Retain ordinary preview warnings and strict publication failure
P0
Preserve one navigation and Markdown authority across reader and machine outputs
Existing output and navigation checks continue to cover language, ordering, subpath, and opt-in behavior. No duplicate CLI renderer
P0
Release with a tested Starter snapshot and a reviewed downstream adoption record
Validate published module resolution separately from sibling replacement builds. Record consumer pins and deployments independently
P1
Add stable identifiers to the small set of diagnostics consumed by tooling, if the prototype shows they are necessary
A focused owning checker verifies each identifier. The CLI never depends on parsing all human warning prose
The descriptor contains release metadata without becoming a configuration authority. Configuration schemas remain generated from current authorities, whose resolver/checker continues to own optional shape validation. A generic renamed-key registry would conflict with the current diagnostic decision. Migration transformations therefore belong to explicit CLI profiles rather than a permanent compatibility path in templates.
No new visual component family is required for 1.2. Correctness, accessibility, and already-demonstrated regressions can still justify changes. Existing media work keeps its own acceptance scope. This roadmap does not require every draft to be complete before release.
First CLI release: proposed 0.1
The commands below are implemented in the local 0.1.0-dev candidate. Their current flags, result semantics, and limits are defined by the CLI contract and CLI introduction.
Command
User outcome
First-release boundary
oink doctor
Understand why the site cannot run or why its environment differs from CI
Inspect Hugo Extended/version, module pin and effective source, Starter/toolchain requirements, essential configuration, and enabled outputs. No repair by default
oink check
Know whether a publication build and its local references are valid
One strict build into isolated output, then check local links/anchors/assets and enabled machine outputs. Report coverage and unsupported checks
oink init my-docs
Start a small, neutral site that can be maintained without the CLI
Generate from a pinned Starter snapshot into a new/empty target. Select the supported language profile and explicit theme pin
oink upgrade --to <tag>
See the exact changes needed for a theme upgrade
Preview first. --write applies a reviewed scope after validation. Protect unrelated module dependencies, user changes, and vendored output
oink dev / oink build
Use a memorable entry point without learning a second build system
Thin Hugo invocations with visible effective arguments. build uses publication strictness. Direct Hugo remains fully supported
check is the single quality entry point. Avoid separate overlapping lint, validate, audit, and check products in 0.1. Later --scope options can separate source hints from rendered-output validation when users need the distinction.
Diagnosis and quality scope
Start with failures that users can act on and that checks can identify reliably: wrong toolchain, unresolved theme, malformed required configuration, missing local link targets/anchors/assets, and inconsistent enabled output references. Resolve routing and anchor truth from Hugo’s output, including language and base-path handling. Do not label a valid custom front-matter key as invalid merely because an editor schema does not list it.
Disabled optional outputs are not missing-output errors. The local candidate does not check translation completeness. Any future completeness rule must use the site’s declared languages and coverage policies. Duplicate titles, orphan pages, missing descriptions, prose style, and freshness remain later optional observations after real false-positive review. Browser accessibility and interaction checks remain in the site Playwright/axe suite.
The local candidate freezes oink.result/v1. Structured diagnostics have stable rule IDs, severity, known locations, explanations, actions, and explicit coverage. JSON stdout contains only the result. Logs go to stderr. No command waits for input. Exit meanings are 0 for completed work with no blocking findings, 1 for policy findings, and 2 for required incomplete work. Required unsupported checks cannot succeed. The result contract owns the detailed fields. Build-derived findings never receive invented line numbers.
Keep raw Hugo errors available as subprocess evidence. A future SARIF export can project from the same result without changing rule semantics.
Upgrade and file preservation
The existing consumer-upgrade script provides local precedents: distinguish declared pin from resolved version, disable both workspace mechanisms for release verification, recognize module replacements, and inspect _vendor. Port those behaviors with focused tests inside the standalone Go binary.
For 0.1, upgrade one explicitly selected site. Multi-site fleet discovery stays with the maintainer script until a consumer need is demonstrated. A normal check may examine an intentional local theme replacement. check --release must verify the declared published release without those replacements. It should report a conflicting go.mod replacement rather than edit it away.
Preview the proposed touched files and verify the prospective upgrade before applying it. Back up only those files, refuse changes to files that changed since the preview, and preserve unrelated dirty work. A failed operation must describe what was and was not applied, with a recovery path that does not overwrite subsequent edits. A dirty repository is not a reason to block read-only diagnosis. Refreshing vendor content requires a separate explicit action.
Do not commit, push, deploy, alter global agent settings, or install system packages as side effects of initialization or repair. Initialization creates the requested named directory. Changes to existing files default to a preview.
Distribution and offline behavior
The local candidate currently provides a tested source/Make installation path and archive preparation on macOS arm64, with other archive targets cross-compiled. A published Homebrew formula and public download/tag installation remain future distribution work.
Use a Go executable with release archives/checksums and a Homebrew installation path. Initially qualify macOS and Linux on tested architectures. Mark other targets experimental until you validate their filesystem and process behavior. The installed CLI itself needs no installed Go toolchain, Python, Node, or account. Hugo remains an external renderer. Initial module resolution still needs the site’s documented Git/Go/Hugo toolchain.
Embed or ship an exact, licensed Starter snapshot for deterministic initialization. Do not fetch a moving main branch on every invocation, and do not maintain handwritten CLI copies of Starter configuration. Check embedded/template drift during CLI release.
Distinguish a cold installation from offline operation. Downloading Hugo, the theme, or an uncached template requires connectivity unless supplied locally. Once dependencies are present, local diagnosis/check/build paths must work without external services. On a cache miss, an offline request must fail clearly without fetching silently. External URL checking, remote specifications, and other network actions are separate opt-ins. No default telemetry or background update check is required.
Migration: the first expansion
Start with a documented Docsy input profile selected from actual candidate sites, reusing the current migration fixtures and report model as evidence. Validate configuration, navigation, assets, languages, and routes as well as Markdown syntax.
Proposed workflow: oink migrate --from docsy --source <site> --output <new-site>. Assess the migration before writing. Apply it only with an explicit flag and a separate destination. Every source item receives one primary status: unchanged-compatible, transformed, manual-review, or unsupported. Counts must reconcile, with reasons and source locations. Custom templates and dynamic behavior remain visible manual work.
Acceptance means source preservation, idempotent supported transforms, no edits inside literal code examples, valid local references, and an explicit old-to-new route report. Prefer unchanged URLs. URL changes require a redirect plan for the hosting target.
Arbitrary JSX, imports, and embedded React/Vue are programs. Do not execute untrusted source to infer their meaning or silently drop unsupported constructs. Start a second framework only after the first profile is reused successfully without maintainer rescue. Full MDX migration is a later product investment.
Next content capability: version lifecycle
After the first CLI is useful, version lifecycle is the default next candidate because it extends OINK’s existing independent-build model. Move OpenAPI ahead only if real API users provide the stronger repeated need. Do not implement both foundations simultaneously with one primary maintainer.
Theme responsibilities: consistent version identity in the reader surface, reliable page switching, archive status, and correctly scoped search/machine outputs. CLI responsibilities: inspect/list versions, prepare a snapshot, validate page correspondence, and change declared lifecycle state. Use oink --version for the executable. A future oink docs version ... namespace would distinguish documentation versions.
Prefer a small version manifest with version label, source reference, base URL, status, and default selection. Keep independent per-version builds and existing external archives. CLI-managed manifests may produce checked-in Hugo configuration; in that mode, authors edit the manifest and configuration becomes a checked projection. Existing manually managed params.versions remains supported. The initial prototype must settle this projection before freezing its format.
Page correspondence needs a logical page key scoped by documentation family, language, and version. Reuse a suitable existing translationKey or explicit stable key before inventing universal UUIDs. You should disclose missing peers and link them to a defined version/section landing page. You should not fabricate an equivalent page or concatenate an unchecked URL. Route aliases handle moves separately from page identity.
Distinct historical content should ordinarily keep its own canonical URL. Do not point every old page at the newest version. Language alternates must refer to genuine translated peers in the same version. Default search and agent bundles stay inside the selected language/version. A cross-version collection, if later needed, is explicit. Archiving preserves the source and records how the built artifact is retained. It does not delete the source or silently redeploy an immutable archive.
NAVJSON v1 currently has closed object schemas. Adding version or identity fields therefore requires an explicit new schema/output contract or a separate artifact, not a supposedly harmless addition to v1. No change to current page identity is justified merely to reserve space for a future graph.
Following capability: static OpenAPI reference
The first OpenAPI product should be a read-only static reference generator. The CLI parses a local specification and supported local references, emits ordinary Markdown/Hugo data, and records source provenance. The theme supplies accessible semantic presentation and the existing output pipeline. Ordinary Hugo then builds HTML, Print, Markdown, search, and agent indexes from those generated pages.
Start with operations, parameters, request/response bodies, and linked schema descriptions. After a parser prototype, explicitly declare supported OpenAPI versions and constructs. Unsupported constructs cannot disappear silently. Scope operation identity to the API/specification. If operationId is missing, the generator can derive a method/path key and warn about identity changes. Reused operationId values across different APIs must not collide.
Keep human-authored guides separate from generated facts. Generation must be deterministic, record source hashes and generator version, detect stale output, and refuse to overwrite unexpected human changes. Check generated source into the site, or supply it as a versioned build input, so rendering itself remains CLI-independent. Resolve remote references in an explicit preparation step. Normal generation must not follow arbitrary external URLs.
Acceptance requires a real user specification in addition to a toy example, complete accounting of supported operations, cyclic-reference handling, stable routes, semantic content in all selected outputs, and accessibility checks with no inherited Swagger/Redoc exclusion for the new static renderer. Measure a representative large specification before promising a throughput target.
Keep existing Swagger/Redoc integrations compatible. Interactive requests, credential handling, SDK generation, mock servers, and an API testing platform are outside this first compiler increment.
Architecture and compatibility rules
Keep CLI internals small: command handling, Hugo/process integration, diagnostics, template loading, and bounded file changes. Add migration and OpenAPI packages when their stages begin. This is a suggested decomposition, not a plugin ABI or public SDK.
Three boundaries need versioning: the CLI’s machine result format, the theme’s public schema/output contracts, and each supported migration/generation input profile. Prefer capability checks over a single “requires newest OINK” rule. A newer unsupported schema must produce a useful compatibility diagnosis.
The CLI cannot import a sibling theme’s private Python modules, depend on a local checkout layout, or download executable checks at runtime. Port selected consumer operations and test their behavior. Keep template-internal checkers in the theme, and make future changes to exposed consumer rules update their owning contract. Keep existing scripts available during the transition. Remove duplication only after the replacement covers supported cases.
No CLI configuration file is required initially. Hugo retains rendering configuration. If repeated usage later justifies a tool-policy file, it may hold ignored paths, rule severity, or a reviewed baseline, but must not mirror params.ui, navigation, languages, or module pins. A reviewed lint baseline cannot suppress a failed Hugo build, an unreadable input, or an unsupported required check.
Roadmap and staffing assumption
Stages 0 and 1 have a local first-stage candidate, with validation details in the acceptance record. The 8–12 week first-stage planning envelope below assumes roughly one full-time implementation owner plus part-time documentation/review help. Toolchain qualification, recruitment, and bilingual review take time; reduce scope before adding parallel work.
Stage
Timing from approval
Deliverable
Exit evidence
0: establish the boundary
Weeks 1–2
Accept repository choice; collect failure examples; define result format and supported baseline; prototype read-only doctor/check against current 1.1.0
Starter plus at least three varied real repositories; failures and coverage omissions recorded
First-run study and repeat upgrade use; migration limitations are explicit; published pins and consumer adoption checked separately
3: validate migration and one content model
Months 4–6
Harden the first migrator; choose version lifecycle or OpenAPI based on users; propose theme 1.3 / CLI 0.2 as needed
At least two real repositories use the chosen workflow; accepted contract precedes compatibility promises
4: earn expansion
After month 6
The other content capability, then optional recipes/provenance or agent transport where justified
Repeated use and maintenance capacity
If stage 2 overruns, remove migration writing from that release and keep its assessment report. Do not cut upgrade preservation, truthful diagnostics, or independence from the CLI. If no independent team wants the migration profile, stop expanding framework coverage and investigate onboarding/positioning instead.
Freshness/ownership is a later optional quality feature, initially a report whose findings users actually act on. A modification date must never be presented as verification. Ship a handful of useful official page recipes before a registry. Graph G2/G3, MCP, analytics adapters, executable examples, Studio, and managed services each need a specific user problem and capacity decision; this roadmap assigns them no delivery dates. Existing static agent outputs make MCP less urgent than adoption.
Acceptance and product measures
Area
Initial target or required property
First successful use
With prerequisites already installed, at least 4 of 5 unfamiliar target users reach local preview and a passing strict check within 15 minutes without maintainer intervention; Record cold installation separately
Maintenance value
At least three real sites use diagnosis/checks and repeat a supported upgrade; Every failure has an actionable report
Diagnostic precision
Triage all blocking findings in the pilot; aim for less than 5% false positives in an explicitly counted labeled sample
Integrity
Zero silent content loss; every migration input is accounted for; repeat transforms have no diff; user edits and unrelated dependencies survive
Independence
Initialized/generated sites build through ordinary Hugo with provisioned dependencies; optional CLI and output features remain optional
Offline behavior
Run the qualified local workflow with outbound access denied after provisioning; record cache misses and explicitly networked features separately
Compatibility
Current tested theme baseline and candidate release, pinned site regression toolchain, root/subpath, and EN/ZH cases
Adoption
Seek five independent pilot teams within the first stage, and track which reach production and continue using the result at 30/90 days
Use independently maintained production sites as the main adoption measure, verified through public references or voluntary user confirmation. A stable documentation site should not stop counting merely because it has no commit in 60 days. Track theme upgrade recency separately from retention. Stars, download counts, internal consumer count, and agent-generated volume serve as supporting signals.
Track time to first local success, time to production, upgrade effort, and manual migration effort separately. Do not add default telemetry to obtain these measures.
Implementation ownership and validation
Change
Owning validation
Tooling descriptor and schema compatibility
A focused theme descriptor check plus generate-config-schema.py --check and relevant parameter checks
Theme output checks plus bilingual documentation-site integration, browser, accessibility, responsive, and visual review
Run the smallest owning check first. Public behavior changes still require implementation, checker, and both language contracts in one coordinated delivery. Use the sibling site’s make check, make browser, and make dev workflow for actual integration and visual acceptance.
For a release, separately record local checks, commits, tags, published module/binary resolution, consumer pins, and deployment. Theme release adoption continues through the maintained consumer inventory procedure. Use a coordinated issue/checklist to connect the repositories.
Open decisions and stop conditions
Repository selection and first-stage implementation are settled locally. Remaining release decisions include qualified platforms, the public distribution channel, compatibility claims justified by executed evidence, and independent pilot recruitment.
Result and exit semantics are frozen for the local candidate in the CLI contract. The minimal theme descriptor and stable theme warning identifiers remain separate proposals. Before a versioning beta, settle manifest projections, archive retention, and page correspondence. Before an OpenAPI beta, settle the supported spec subset and generated-source ownership.
Reconsider the separate CLI investment if pilots only need a tiny maintenance script, if rules must repeatedly duplicate template semantics, or if maintaining distribution consumes more effort than the measured user benefit. Keep successful standalone scripts in that case. If evidence changes, reorder versioning and OpenAPI. Do not expand the total concurrent scope.
Decision log and sources
Date
Record
2026-09-29
Draft created from the supplied strategy research and local source review. Recommends a separate optional CLI, a small adoption release, bounded migrations, and sequential content capabilities.
2026-09-29
Subsequent user authorization accepted the independent Go repository and first-stage development. A local 0.1.0-dev candidate implements doctor/check/init/upgrade/dev/build. Stable behavior moved to the CLI decision and usage guide. Local acceptance passed for CLI commit e623d93.
External primary sources were checked on 2026-09-29: the linked Mintlify command reference, Nimbus repository, Docusaurus versioning guide, and Hugo config/module documentation.
7.9.13 - oink: preview and multi-version serving from a docs repository
A draft PRD for one oink binary that embeds Hugo and OINK and runs directly on a Git documentation repository for local preview, production serving, multi-version publishing, single-file packages and online features, with the theme changes it needs.
Draft, 2026-11-28
This proposal describes a product direction that is not implemented. Do not use it as a
configuration or command reference. Current behavior is defined by the
architecture contract, the CLI contract
and the versions guide.
Status and surface
Status and date: draft, 2026-11-28; product requirements and an architecture direction, not an implementation contract
Owner: OINK maintainer
Baseline: OINK v1.7.0; installed Hugo v0.170.1; the local 0.1.0-dev candidate of pgsty/oink-cli (unreleased, no users)
Related proposals: takes over the unimplemented version-lifecycle stage of the
CLI roadmap; answers the open question of
theme roadmap R2, “native version dimension or
independent builds”; delivers the database backend that the
local search proposal left open
Affected implementation: a new oink binary repository (see open decisions); the theme’s
version menu, banner, search, comments, sidebar and error pages (see
theme coordination)
Release intent: staged, see milestones; this proposal commits to no release date
Summary
Run the same oink binary in any OINK documentation repository:
oink dev # preview the working tree, refresh on saveoink serve # production: publish branches and tags as versionsoink build -o site.oink # export the same versions as a static tree or one file
The machine needs no Hugo, Go or Node. The binary embeds upstream Hugo (imported as a library, not forked)
and the OINK theme.
The core model fits in one sentence: Git is the content store, a version is a label bound to a ref, and
rendered output is a content-addressed snapshot. The production server publishes only committed,
successfully built snapshots and moves version pointers atomically. Storage and computation grow with
unique content, not with versions times pages.
Four invariants run through the whole document:
Plain Hugo still builds the site. oink adds versions, serving and online features and never changes
what a page means; without oink nothing breaks.
Production serves only committed, successfully built snapshots. Half-edited files, bad commits and
build timeouts never replace live content; the last good snapshot keeps serving.
Appearance has one authority. Hugo and OINK render every byte of HTML, including error pages, version
menu fragments and corpus shells. The server routes, splices declared slots and caches; it renders no
templates.
Cost follows unique content. A tag is built once, and an unchanged page is stored once.
Context and evidence
Current state
OINK treats each documentation version as a separate site: built and deployed on its own, with the
params.versions menu written into every build. Adding a version means updating the list on every
branch and rebuilding them all (see the versions guide).
oink-cli is a local candidate that calls an external Hugo; it is unreleased and has no users. On
2026-11-28 the owner said the new design need not follow it.
Comments, page views, sign-in, access control and cross-version search have no home on static hosting;
comments are giscus only.
Why per-version static builds explode
Measured on 2026-11-28 in the pgdoc-cn repository (the pgweb HTML of the Chinese PostgreSQL manual,
559 releases plus master) and on the bilingual PG 18 OINK site:
Measurement
Result
Every version checked out
6.15 GB of HTML in 529k files; the Git pack is 78 MiB
File-level deduplication
527k unique files, almost none removed: each minor release touches about 1,000 files, most of them only for the version number in the page header and footer
Deduplication by body after stripping header and footer
98k unique bodies, 1.29 GB
Pages that really change per minor release
median 107 (p90 333); about 35 on the 17 and 18 lines
zstd in ~1 MiB clusters sorted by path across versions
31 MB of unique bodies; 73 MB for whole pages with headers and footers
Read one page from Git / turn it into an OINK body
p50 156 µs / p50 0.38 ms (p99 2.7 ms)
One OINK build (bilingual PG 18, v1.7.0)
38 s, 4.2 GB peak, 808 MB; 431 KB per page on average, 55% of the SELECT page is sidebar
The site’s own vendored OINK v1.4.0
fails to build on Hugo 0.170.1
The explosion has three sources: version-dependent chrome baked into every page, storage file by file, and
OINK inlining the whole sidebar in every page. None of them is content. Without them all 560 versions
take 30–70 MB, and materializing all of them in the background costs about one CPU minute. The last row
also shows that an old version cannot be re-rendered with the theme it once used.
What Hugo already provides
The whole command line is one function. Hugo’s commands.Execute(args []string) error is the entry
point of a public package (v0.168.0 source, commands/commandeer.go); embedding Hugo’s CLI is one line.
Replacing the theme needs no Go. With no go on PATH, pointing github.com/pgsty/oink at a local
directory through HUGO_MODULE_REPLACEMENTS builds an OINK site completely; without the replacement
Hugo stops with binary with name "go" not found in PATH (measured on 2026-11-28 with Hugo v0.170.1).
Static compilation should work. In the v0.168.0 source, WebP and AVIF codecs run in WASM and cgo
serves only the removed LibSass; OINK is plain CSS, so a binary that embeds Hugo should cross-compile
with CGO_ENABLED=0 (not yet tried).
The sites matrix has a version dimension. Since v0.153, [versions] configuration,
sites.matrix.versions on mounts, and site.Version and .Rotate in templates form a native version
dimension. It puts every version in one build, which suits small static sites; see
alternatives.
The development server is already good.hugo server rebuilds incrementally, live-reloads and shows
errors in the browser.
Owner inputs
These requirements come from the owner’s discussion on 2026-11-27 and 2026-11-28 and are the premise of
this proposal. Everything else on this page is a proposal and binds nothing until the owner accepts it.
One Go binary named oink, in OINK style; local Markdown in Git is the only authoritative source.
It runs directly on a documentation repository: local preview with live updates while editing, and
production serving.
Production is Git-aware: it can pin one branch or publish a set of tags as versions; the default
branch is the default version; in PG a major version is a branch and a minor version a tag; historical
versions are read from Git and rendered on the fly.
Building many static versions must not make the site explode.
SQLite keeps state and the full-text index, with better full-text search, page views, comments and even
access control.
It is based on Hugo, embedded thinly, like the Hugo module inside Caddy.
A .oink package format that the macOS app Crib opens directly.
First-round requirements: comments, users, access control, full-text search, page views and versions;
covering pg.center and pgext; 500+ PG documentation versions; Cloudflare preferred; images may come from
nginx.
The existing oink-cli may be disregarded, and the requirements themselves may be improved.
Goals and non-goals
Goals:
G1 One binary. Running oink in any OINK repository previews it without Hugo, Go or Node; the same
binary is the production server.
G2 Git-aware versions. Versions come from branches and tags; aliases such as current and latest
move atomically; all 560 versions of pgdoc-cn are available.
G3 No explosion. Storage and build cost follow unique content; the store for every pgdoc-cn version
stays under 100 MB.
G4 No outage from edits or bad commits. Production follows commits only, keeps the last good
snapshot, and rolls back in about a second.
G5 One experience. A commit looks and behaves the same in hugo, oink dev, oink serve and a
.oink package; every version shares the current appearance.
G6 Optional online features. Full-text search, page views, accounts, access control and comments run
on SQLite, are off by default and are enabled per site.
G7 Offline and distribution. One .oink file opens directly in oink serve and in Crib.
Non-goals for the first version:
No visual CMS, in-browser editing or Git commits from the web.
No Hugo fork, and no new rendering engine or template language.
No multiple sites per process and no state shared across instances; a PostgreSQL state backend can come
later.
No built-in TLS certificate issuance; run behind Cloudflare, nginx or Caddy.
Version slots and online features are not supported for non-OINK themes (such sites build, but are out
of scope).
No reconstruction of the theme an old tag once used.
Users and scenarios
Role
Scenario
Expectation
Authors and translators
Writing in the repository
Run oink, refresh on save; warnings appear in the page with file and line
Maintainers
Publishing a version
A new tag goes live automatically; a bad commit never reaches readers; one command rolls back
Operators
Deploying and upgrading
One binary and one data directory; serving resumes immediately after a restart; upgrades need no downtime rebuild
Readers
Reading and finding
Switching versions stays on the same page; old versions carry a clear banner; search and comments work
Offline readers
Crib or an air-gapped network
One .oink file opens every version
What each target site uses:
Site
Shape
Main capabilities
PG documentation on pgsql.cc
560 versions of pgweb HTML
HTML corpus renderer, lines and aliases, cross-version search, .oink package
Product docs such as Pigsty
one line per minor release
Hugo renderer, default version at the root, comments
pgext
one version, about 10,000 pages
atomic publishing, server search, page views
pg.center
dynamic Go and PG application
oink serve for the documentation part; embedding as a Go library later
Product shape
Commands
Command
What it does
oink
oink dev inside a site directory; help elsewhere
oink dev [DIR]
Preview the working tree: refresh on save, drafts shown, localhost only by default
oink serve [DIR | GIT-URL | FILE.oink]
Production: publish versions from Git refs, or serve one package read-only
oink build [--versions] [-o DIR | FILE.oink]
Export a static tree or a single-file package
oink check [--versions]
Build and summarize Hugo and OINK diagnostics with CI-friendly exit codes
oink versions
List the versions, aliases and refs resolved from Git without building
oink new [site | page]
Create a site or page skeleton
oink status, rebuild, rollback, user
Manage a running server through a local socket in its data directory
oink hugo …
Run the embedded Hugo command line unchanged
oink --version
Print the versions of oink, the embedded Hugo and the embedded theme
Development mode
The source is the working tree, uncommitted files included; drafts and future-dated pages show;
it listens on 127.0.0.1 by default.
The engine is Hugo’s own development server. oink runs the embedded hugo server in a child process
(render to memory, incremental rebuilds, live reload) and reverse-proxies it, adding three things:
an in-page diagnostics overlay, so Hugo and OINK warnings appear with file and line in the page and
not only in the terminal;
the same /_oink/ endpoints as production, so search, comments and the rest can be tried against a
local state.db;
other versions from Git on request (--versions), so the whole site with its version menu can be
seen locally.
No blank page on failure. A failed rebuild keeps the last good page, and the overlay points to the
error.
Folder mode (a later milestone): a directory without Hugo configuration gets a generated temporary
configuration and the embedded theme, README.md becomes the section index, and the folder structure
becomes the sidebar.
Production mode
It reads Git and never the working tree. A half-edited file can never reach production; that is
the fundamental guarantee that editing a file cannot crash the site.
It serves at startup. Snapshots in the store are usable immediately and nothing rebuilds at boot.
Only a change of engine identity (the oink, Hugo or theme release) rebuilds, in the background and one
version at a time.
It accepts three inputs: the current checkout (using its .git); a remote repository URL (mirrored
into the data directory); or a .oink package (read-only, no builds).
It keeps following refs: resolve versions, build missing snapshots in the background, switch
atomically after success; oink status, oink rollback and oink rebuild handle status, rollback and
rebuilds.
Static and packaged output
oink build is serve frozen into files: the same snapshots and the same slot splicing.
oink build builds the default version into public/, used like hugo.
oink build --versions -o dist/ writes a static multi-version tree: each version under its prefix,
version slots spliced at export time, a versions.json, and aliases as _redirects. It suits sites
with few versions and static hosts such as Cloudflare Pages.
Without configuration, the head of the default branch is the only version, served at /. Pinning
a branch is this case, or --ref chooses one.
tags is a regular expression with the named groups line and patch. Each line becomes a
version labeled with its line, whose content is the tag with the highest patch. With
releases: true, every tag also becomes an exact release such as 17.4.
branches maps labels to branches, for moving versions such as devel or next.
Line content comes from the newest tag by default; line_branch publishes the head of the line’s
branch instead, for translation projects that ship corrections between releases.
aliases maps names to versions or to the computed target latest, the highest-numbered line.
default names the version served without a version prefix; archived marks lines that are no
longer maintained.
Ordering compares dotted numbers component by component; tags that do not match the expression
(such as v4.0.0-rc1) are not published.
Product documentation: one line per minor release, default version at the root.
oink.yaml
versions:tags:'^v(?P<line>\d+\.\d+)\.(?P<patch>\d+)$'# v3.7.2 → line 3.7branches:{devel:main }default:latest# the newest line is served at /url:'/v{label}/'# other versions: /v3.6/…archived:['< 3.0']
The Chinese PostgreSQL manual: two version-number styles, 560 versions.
Alias of the highest-numbered line, served in place
/docs/devel/sql-select.html
Head of master, noindex
Content per version, current appearance
When the Hugo renderer builds a version, it takes content/ (and any other path listed in
versions.content) from the version commit and everything else from the skin commit:
hugo.yaml, layouts/, assets/, i18n/, data/, static/, go.mod and the theme release. The
worktree’s HEAD is the version commit, so each page’s last-modified date and author belong to that
version and not to the skin.
There are four reasons:
An old theme may not build on a new Hugo (v1.4.0 already fails on 0.170.1).
Navigation, the version menu and search look the same in every version, so switching versions never
lands the reader on a different site.
One deployment has one theme release, so fixes and improvements reach every version at once.
Templates come only from the skin; old tags and preview branches contribute content and never run
templates of their own.
The cost: configuration differences of old versions (menu entries, parameters) no longer apply, and old
content that uses a removed shortcode warns and degrades safely under the theme’s rules.
oink check --versions reports these warnings per version. A version that really needs its own
configuration can set skin: self and build with its own configuration, layouts and theme release; if
that fails on the embedded Hugo, the version is unavailable and its status says why. Docusaurus works the
same way: documentation content is versioned, the theme is always current.
When a skin commit changes only content paths, only its own version (usually devel) rebuilds. When it
changes configuration, layouts or assets, the other versions rebuild in the background while their old
snapshots keep serving.
URLs, canonical links and indexing
The default version is served without a version number. Adopting versions changes no existing URL.
/v{default}/x answers 301 to /x.
Other versions live under the prefix of the url template, /{label}/ by default. The Hugo
renderer’s prefix must start at the site root because the whole build is relocated; an HTML corpus can
be mounted under any prefix, such as /docs/{label}/.
Aliases are served in place when the output is location-independent (HTML corpora are now; Hugo
output will be after the theme delivers T10), and redirect with 302 otherwise.
Canonical links: a page in a non-default version points canonical at the same page in the
canonical version (by default default; current in the PG example), or at itself when that page
does not exist. The PostgreSQL and Python documentation both do this (pages of docs/16 and 3.11
checked on 2026-11-28). The server rewrites the link while serving, which needs theme item
T5; until then the canonical link points at the page itself.
Indexing: exact releases and prerelease versions carry noindex (through the build-level parameter
of T4); the sitemap lists the default version only.
Version-aware 404: when a path does not exist in a version, that version’s own 404 page is
returned, and the theme runtime calls /_oink/where to list the versions that have the path, such as
“since 9.4” or “removed in 12” (this needs T3 and T8).
Architecture
Pipeline
┌──────────────────────── oink serve ─────────────────────────────┐
Git refs ───▶ │ resolve ──▶ materialize ──▶ render ──▶ ingest ──▶ publish │ ───▶ HTTP
fetch/webhook/ │ versions skin+content Hugo child dedup, atomic │ splice slots
local push │ worktree or corpus index pointer │ cache
└──────────────┬───────────────────────────────────┬──────────────┘
▼ ▼
store.oink (rebuildable) state.db (back it up)
Resolve: read the oink.yaml committed on the skin ref and map refs to versions and aliases. Each
version’s snapshot key is H(version commit, skin commit, engine identity, URL base); an existing key
means there is nothing to do.
Materialize: the Hugo renderer creates a git worktree at the version commit and overlays the
skin’s files; an HTML corpus is not materialized and its pages are read straight from Git objects.
Render: run the embedded Hugo in a child process into a temporary directory; transform HTML corpus
pages one at a time.
Ingest: hash every output file and write only new objects into clusters; record the byte offsets of
slots in HTML; extract search records; write the manifest.
Publish: once the snapshot is complete and its checks pass, switch the version pointer in one SQLite
transaction; optionally ask the CDN to purge by prefix.
Serve: find the version and snapshot from the URL prefix, read the object, splice version slots and
answer with the cache policy.
Rendering engine
Embed Hugo’s command line.oink links Hugo’s commands package, and oink hugo … is stock Hugo.
Builds re-execute the binary as a child process (oink hugo --source … --destination …). The coupling
to Hugo is its command-line flags and output directory only, never the unstable hugolib internals.
Why a child process. One PG 18 build peaks at 4.2 GB; inside the long-running server, one OOM or hang
would take the service down. A child process has a timeout, a memory limit, a concurrency limit and a
lower scheduling priority, and returns all of its memory when it exits.
Theme injection. The embedded theme is extracted into a cache directory keyed by release and
checksum, and the child runs with HUGO_MODULE_REPLACEMENTS="github.com/pgsty/oink -> <dir>",
GOWORK=off and HUGO_MODULE_WORKSPACE=off. This is verified to need no Go.
The theme release follows the skin’s go.mod, as with plain Hugo. It is sourced, in order, from the
embedded theme when the release matches, the site’s _vendor/, a local cache, or a download from the
Go module proxy verified against go.sum (forbidden with --offline). Other Hugo modules likewise come
from _vendor/ or the cache; otherwise oink reports a clear error.
Build security. Published refs build under the site’s own Hugo security configuration; preview
refs always build under a tightened one: no exec, no getenv, no remote HTTP, and no inline
shortcodes. Child processes receive only the environment variables a build needs, and never a secret.
Incremental work. The first version is incremental at the store level: only changed versions
rebuild and only changed objects are stored. Hugo-level incremental rebuilds (a warm Hugo fed Git diffs
as file-change events) wait for measurements.
Two renderers
hugo (default)
html (HTML corpus)
Input
One ref of an OINK or Hugo site
A rendered HTML tree, such as the DocBook output in pgdoc-cn
Granularity
One build per version
Per page, on first request or during background warm-up
Page chrome
Complete pages built by Hugo
A theme-rendered shell template plus the transformed body
Measured cost
38 s and 4.2 GB for one bilingual PG 18 version
0.38 ms per page (p99 2.7 ms); about one CPU minute for 98k bodies
Aliases
302; in place once the theme delivers T10
In place
The HTML corpus renderer follows a built-in profile: how to find the body and title, which of the original
chrome to drop, how to rewrite internal links to the version prefix, how to map admonitions and tables to
the markup of theme components, and how to derive the navigation tree from the table of contents. The
first version allows no user scripts, and profiles start with pgweb. Transformed bodies are
location-independent and can sit unchanged under any alias.
Content store and the .oink format
The store is one SQLite file, and the production cache, distribution packages and Crib’s reading source
all use this one format:
meta(key, value) format version, generator, site, signature
clusters(id, codec, raw_size, data) about 1 MiB of raw data per cluster, zstd by default
objects(id, hash, cluster, offset, size, type)
paths(id, path)
snapshots(id, version, commit, skin, engine, base, created, state)
entries(snapshot, path, object) WITHOUT ROWID
versions(label, snapshot, line, kind, status, sort_key)
aliases(name, target)
docs(object, lang, title, …) + fts5 one search record per unique body
The writer carries the complexity; a reader only fetches bytes by path. The read path is path →
entry → object → cluster (decoded clusters stay in an in-memory LRU) → bytes.
Append while serving, compact before distributing. A running server appends new objects to new
clusters; oink build -o x.oink reorders them so that the versions of one path sit together, packs them,
and can add an Ed25519 signature.
Measured size: 31 MB for every unique pgdoc-cn body, and only 73 MB even for whole pages with
headers and footers; decoding a 1 MiB cluster takes 0.3–0.43 ms at p99.
The codec is recorded per cluster. Apple’s Compression framework has no zstd and Crib has no
third-party dependencies. Either Crib adds a decode-only libzstd, or packages built for Crib use a codec
Apple ships; measure first, see open decisions.
State never enters the store.store.oink can be deleted and rebuilt at any time; state.db lives
and is backed up on its own.
Serving and caching
A request goes through: dispatch of /_oink/ endpoints → longest-prefix match of a version or alias (no
prefix means the default version) → access check → pinning the snapshot this request uses → entry lookup.
A hit is answered; a miss goes to the version-aware 404; a version not built yet returns a theme-rendered
503 “building” page with Retry-After.
Slots come in two kinds:
Version slots are spliced by the server and cacheable: the version menu, archived or prerelease
banners, canonical and robots. They depend only on which version this is and which versions exist,
so every anonymous reader gets the same bytes and a CDN can cache them.
Reader slots are filled in the browser and never cached: sign-in state, comments, page views, and
the versions that contain this page. The theme runtime renders them from /_oink/ JSON endpoints;
cached HTML never carries anything personal to a reader.
Version slots arrive in two stages:
Stage one changes nothing in the theme. Each Hugo version is built with existing parameters
injected: params.version, params.versions, archived_version and url_latest_version. When the
set of versions or the skin changes, every Hugo version rebuilds in the background. For a site with a
few dozen versions that is minutes of background CPU.
Stage two takes slots from the theme (T5). Pages carry empty
<template data-td-slot="…"> markers. When the set of versions changes, oink runs a small fragment
build of the skin: no content, plus one page per version generated by a content adapter, reusing the
theme’s existing version-menu and banner partials. It writes each version’s menu and banner, and the
shell template for HTML corpora. The server splices those bytes at the offsets recorded during ingest
and renders no templates. Sites with many versions need this stage; HTML corpora use fragments and
shells from the start.
Response
Cache-Control
Invalidation
Fingerprinted assets (CSS, JS chunks, fonts)
public, max-age=31536000, immutable
The file name changes with the content
HTML of releases and lines
public, max-age=300, s-maxage=86400, with ETag
Purge the CDN on a release or skin change
HTML of moving versions such as devel
public, max-age=60, s-maxage=300, with ETag
Purge on each publish
/_oink/versions.json
public, max-age=60
Expires naturally
Other /_oink/ endpoints and protected pages
private, no-store
Never cached
The ETag combines the object hash and the slot generation. A media mount serves a directory outside Git
under a prefix, unchanged, with Range requests and long caching, and never enters the store; large images
and video can also stay on nginx or R2.
Updates, failures and rollback
Triggers: a periodic git fetch (every 60 s by default); a webhook (POST /_oink/hooks/<provider>,
verified by HMAC); or a bare repository on the server used as a push target, whose refs are watched
directly.
Queue: the default version first, then lines by traffic; concurrency 1 by default; a newer commit of
a version replaces its queued build.
Atomicity: each request pins its snapshot when it starts; the pointer switches only after the new
snapshot is complete and its checks pass.
Failure: a failed, timed-out or rejected build keeps the old snapshot, and the status records the
commit, the log tail and the number of warnings; an outgoing notification is optional.
Retention and rollback: moving versions keep their three latest snapshots, and
oink rollback <version> switches back in about a second; garbage collection removes objects no longer
referenced, then clusters are compacted.
Upgrade: replace the binary and restart; existing snapshots serve immediately, and a changed engine
identity rebuilds in the background, version by version.
Crash safety: both SQLite files use WAL; after kill -9 and a restart, no published snapshot is
lost.
Search
Data: ingest writes one record per unique body (title, headings, text, language) and notes the
versions it belongs to. The Hugo renderer reuses the fields of the theme’s local search index first, so
both backends search the same text.
Engine: SQLite FTS5 with BM25. CJK text is pre-segmented in Go, aligned with the theme’s local engine
and with Crib’s pgdash-han2-v1 analyzer, so FTS5 needs only unicode61 and no custom tokenizer.
Scope: the current line by default; optionally every version, with results merged per page and
labeled with versions. pgdoc-cn indexes 98k bodies, not 529k pages.
Access: results are filtered to what the reader may see.
Interface: the theme’s search interface stays, with /_oink/search as its backend; static hosts keep
the local engine.
Accounts, access, comments and page views
Accounts: OAuth/OIDC sign-in, GitHub first; sessions live in state.db. oink user add --admin
creates the first administrator and prints a one-time sign-in link in the terminal, so no mail service
is needed.
Access: oink.yaml grants roles by path and version. Protected content never enters the CDN, never
appears in other readers’ search results, and oink build refuses to export it.
Previews: previews of branches, pull requests or arbitrary commits are for maintainers only and are
served from a separate host name that has no session cookie of the main site.
Comments: keyed by page identity (mount, language and path within the version, with Hugo aliases
covering renames), shared across versions by default and labeled “written on 3.7”; a Markdown subset is
sanitized on the server; a new user’s first comment waits for review, and the endpoints are
rate-limited. giscus stays the option for static sites.
Page views: each page load sends a sendBeacon to /_oink/hit; no cookie and no IP address are
kept; counts accumulate in memory and are written per day every minute; whether they are shown is a
theme parameter.
Configuration
Two files, one job each:
hugo.yaml decides how pages look and behave, including the comment provider, the search backend and
whether page views are shown.
oink.yaml decides what is published where, plus server policy: versions, skin, renderers, access,
moderation and media directories. It must not set params.ui.*; oink reads the effective configuration
through the embedded Hugo to decide which services to run.
Production reads the oink.yaml committed on the skin ref, so a change of publishing policy is also
reviewed and committed. Secrets come only from environment variables; deployment settings such as the
listen address and data directory can be overridden on the command line.
Output: HTML stays semantic-first and progressively enhanced. The server splices the version menu
and banners, so they work without JavaScript; reader slots are absent without JavaScript and the page
stays complete. Print, Markdown and LLMS outputs are generated per version, and llms.txt lists the
versions; RSS comes from the default version only.
Accessibility: new interface (the dynamic form of the version menu, banners, sign-in, comments, page
views, error pages) follows the theme’s component rules, has strings in all 32 locales, and passes the
documentation site’s axe checks.
Build isolation: production builds only refs that match the configuration; previews are served from
a separate host name and built under the tightened policy; child processes have timeouts and memory
limits.
Sessions and endpoints: cookies use the __Host- prefix with HttpOnly, Secure and
SameSite=Lax; write endpoints check Origin; comments are sanitized on the server; the server sets the
CSP.
Management: management commands use only the local socket in the data directory; /_oink/metrics is
open to localhost or administrators only.
Privacy: page views collect nothing that identifies a person and use no cookie.
Theme coordination
To give one site the same experience in plain Hugo, oink dev, oink serve and a .oink package, the
theme has to make the changes below. “Today” comes from a read-only survey of the theme’s working tree on
2026-11-28; paths are relative to the theme repository root. Under the theme’s rules, each item ships with
its owning checker, strings in all 32 locales and the bilingual contract. Stage one depends only on
T1–T4; with version slots (T5), a new release no longer rebuilds old versions.
Before stage one (M1–M2)
T1 An embeddable theme module. Today: the root has no Go file, and go.mod declares
module github.com/pgsty/oink with go 1.27.4. Change: add an embed.go of a few lines that exports
the module files as an embed.FS with //go:embed all:layouts all:assets …. The binary takes the theme
from the same module zip Hugo downloads, the binary repository keeps no second copy, and plain Hugo
users see no difference.
T2 The cost of the sidebar and pager. Today: the sidebar is rendered into every shell page; at
sidebar_cache_limit (500 pages) the whole tree is partialCached and its active row is set in the
browser. The sidebar’s share of page bytes measured 31% on oink.pgsty.com (51 KB of 163 KB) and 63% on
pigsty.io (203.5 KB of 313 KB, a build from 2026-11-13). pager-state.html scans the whole reading
sequence for every page. Change: publish the full navigation tree once per version as a fingerprinted
file, inline only the current branch in each page, and compute prev/next from one precomputed index.
Builds get faster and lighter, unchanged pages become byte-identical across versions so store
deduplication actually works, and the roughly 10,000-page pgext depends on it.
T3 Error and status pages. Today: only 404.html exists; in production it says index, follow, and
it carries no archive banner. Change: add 401, 403 and 503 (building) templates, all noindex, and give
the 404 page a reader slot where the runtime lists the versions that have the path. Every page the
server returns is rendered by the theme.
T4 Per-version edit links and indexing control. Today: actions/page-urls.html builds edit and
history links from github_repo and github_branch (default main), and the branch can be set per
site, section or page; the robots meta tag depends only on whether the build is production
(head.html) and has no noindex parameter; shortcut preferences and reading history are partitioned
by the path of baseURL (scripts.html, shell/history-dialog.html). Change: oink injects
github_branch per version (the line branch or the default branch), and the theme offers a switch that
hides edit links for tag-only versions; add a build-level noindex parameter; partition local storage
by site instead of version prefix, so readers keep preferences and history across versions.
Stage two (M3–M4)
T5 Version slots and fragments. Today: the version list is written at build time into the navbar,
drawer and footer (navbar.html, navbar-version-selector.html, shell/footer-line.html) and into the
command-palette JSON of every page, about 9 KB each (actions/context.html); the active entry and the
path appended by version_menu_pagelinks (content/version-url.html) are decided at build time too.
canonical is always .Permalink with no override (seo-alternates.html). At 500 pages,
sidebar-nav.js finds the active sidebar row from link[rel="canonical"], which breaks as soon as the
canonical link points at another version. Change: mark the version menu, banners (404 included) and
canonical with <template data-td-slot> and add fragment layouts that render on their own; have the
palette and the V key read their options from the same fragment data; locate the sidebar’s active
row from the page’s own URL; stop opening a new tab for an archive-banner link within the site. On
static hosts the runtime fills the same slots from versions.json.
T6 A search backend. Today: the local index is the resource offline-search-index.<lang>.json, with
bodies split into a separate file above 2 MiB, and the page gives its base-prefixed path in
data-td-index-src. There is no server backend: initSearch accepts searchApi, but the palette
initializes itself, and registerSearchTail accepts only synchronous rows. Change: add a configured
server backend (/_oink/search) with the local engine’s result shape, version scopes, and CJK
segmentation that matches the server. oink reads each version’s local index files during ingest, so
both backends search the same text.
T7 A comment provider. Today: comments.type supports only giscus and warns on anything else
(comments.html, comments-state.html); giscus maps threads by pathname by default, so one page splits
into separate discussions under different version prefixes. Change: add an oink provider that renders a
reader slot in the theme’s own styles, and give giscus a version-independent page key on multi-version
sites.
T8 The reader-slot runtime. Today: there is no sign-in, user menu or page-view component, and the
only analytics integration is Google Analytics. Change: add one stable js/chunks/ target, loaded only
on pages with oink services enabled, for sign-in state, page views and the versions that contain the
page; every new string goes into the 32 locale files.
T9 Corpus shells and body markup. Today: none. Change: provide a shell layout from which the fragment
build writes whole-page shells with slots, and publish the body-markup contract that the HTML corpus
renderer must emit (admonitions, tables, code blocks), so transformed bodies get theme styles directly.
Until then the M0 prototype cuts its shell from one built OINK page.
Later
T10 Location-independent output. Today: the theme tests subpath deployment (several checkers use
/preview/ as the base), has no hard-coded root-relative paths and uses relative paths in CSS; but
canonical, hreflang, taxonomy-term links and share and copy links use absolute .Permalink, PlantUML
and ReDoc chunks embed URLs at build time, NAVJSON and LLMS emit absolute addresses, and relativeURLs
is unsupported. Change: let one output serve under any prefix, so aliases of Hugo versions can be
served in place. Until then aliases use 302, and stage one is unaffected.
T11 Per-version machine outputs. LLMS, NAVJSON and BookManifest carry absolute addresses and
baseURL, so building them per version is enough; llms.txt gains a version list so that agents can
find the other versions.
T12 Hugo’s native version dimension. The theme uses neither site.Version, .Rotate nor a
versioned sites.matrix today. Whether small static multi-version sites get the native dimension is
theme roadmap R2’s decision; this proposal’s slot contract should stay compatible with it.
Process coordination
Release order: the theme is tagged → an oink release embedding it ships → sites update go.mod →
deployments upgrade oink. The post-release adoption flow (update-consumers.py) gains a step: sites that
use oink serve upgrade the binary too.
Contract ownership: slots, fragments, versions.json and the corpus body markup are public theme
contracts, written into the bilingual Design contracts with a version; oink detects the skin’s theme
release and falls back to stage one when slots are unsupported.
Configuration boundary: the binary repository generates the schema of oink.yaml from its own types,
outside the theme’s schema/site-params.schema.json; params.ui.* stays in hugo.yaml only.
Checkers: check-shell.py verifies slot markup and fragment layouts, check-goldens.py records the
new HTML structure, check-i18n.py keeps the 32 locales identical, and the documentation site runs its
browser suites through oink serve.
Compatibility and migration
Sites that do not use oink are unaffected. The theme repository stays a pure Hugo module with no
server code, and plain Hugo builds produce the same output.
Multi-site deployments that use params.versions can stay as they are. After moving to
oink serve, stage one has oink inject params.versions; a hand-written list in the repository is
overridden with a warning.
Existing URLs stay. The default version is served at the root; old versions that lived on
subdomains can answer 301 to their new prefixes.
The oink-cli candidate retires. Its still-useful checks (links, translations) move to
oink check; the oink.result/v1 result format, which has no users, is not kept. If this proposal is
accepted, the CLI contract is marked superseded, and the version-lifecycle
and platform stages of the CLI roadmap retire with it.
Revising an accepted decision. The CLI contract requires calling an external Hugo, importing no
private Hugo runtime, and creating no second route or navigation authority. The new design embeds Hugo’s
public command line, and routing and rendering inside one version still belong to Hugo; oink adds only
two authorities: the version dimension and the import of external corpora.
Crib: the .crib format does not change; Crib gains a reading mode for .oink, see milestone M5.
Implementation and checker plan
Binary repository: the new oink lives in its own repository (reuse pgsty/oink-cli or create one;
see open decisions). A rough package split: engine (embedded Hugo, theme injection, child processes),
gitsrc (ref resolution, worktrees, object reads), render/hugo, render/html, store (.oink),
serve (routing, slots, caching), search, state (accounts, comments, counters) and admin.
Theme repository: implement the items of theme coordination in priority
order, each delivered with its owning checker and bilingual contract.
Documentation site: once this proposal is accepted, add an oink user guide and contract page;
make browser gains a Playwright suite whose pages are served by oink serve.
Checkers: Go tests in the binary repository cover parity with plain Hugo output, a pgdoc subset
benchmark, recovery after kill -9, ETags and cache headers, and access that does not leak; on the theme
side check-shell.py, check-goldens.py and check-i18n.py cover the new markup and strings.
Milestones
Milestone
Scope
Exit evidence
M0 prototype (about 2–3 weeks)
oink serve --git pgdoc-cn: HTML renderer, versions and aliases, store, FTS; the shell temporarily taken from one OINK page
All 560 versions reachable; store under 100 MB; latency targets met; no theme change
M1 single binary
oink dev, build, check, hugo; embedded theme (T1)
A machine with only oink and git previews and builds this documentation site, matching a build with the same Hugo release
M2 versioned serving
Hugo renderer, oink.yaml, atomic publishing, last good snapshot, rollback, status, webhooks; stage-one version interface; theme T2–T4
A site with five or more tags goes live; bad commits stay out; recovery after kill -9; the version menu matches the static build
M3 search and slots
FTS5, page views, version slots, corpus shells; theme T5, T6, T8, T9
A new release needs no rebuild of old versions; server search agrees with the local engine at the agreed rate
Byte-identical round trip; Crib opens every pgdoc version
Acceptance criteria
On a machine with only oink and git, oink dev previews this documentation site and oink build
produces the same output as plain Hugo with the same Hugo release and theme release (build timestamps
aside).
oink serve serves pgdoc-cn: all 560 versions resolve; the store stays under 100 MB; serving starts
within 2 s of a cold start; origin p99 latency stays under 5 ms on a hit and 10 ms on a cluster miss,
and under 20 ms for the first transformation of a corpus page; the server’s resident memory stays under
512 MB, build children excluded.
After a new tag is pushed, its build starts within 90 s when polling and within 10 s with a webhook, and
the pointer switches atomically after success; no page mixes old and new content around the switch.
On a Hugo site, a bad commit, a build timeout and kill -9 neither replace nor lose a published
snapshot; oink rollback takes effect within 1 s.
The same version menu renders identically from a static params.versions build and from oink serve
(golden comparison); the documentation site served by oink serve passes the EN/ZH, desktop/mobile,
light/dark and axe checks.
On a fixed corpus, the top ten results of server search agree with the theme’s local engine at the
agreed threshold, Chinese queries included.
Protected paths are invisible to anonymous readers and absent from the CDN cache, search results and
oink build output; the preview host name carries no session cookie of the main site.
After oink build -o x.oink and oink serve x.oink, every URL returns the same bytes as the original
server.
Risks
Risk
Mitigation
Hugo’s command line or output changes across releases
Pin the embedded Hugo; CI also runs the latest Hugo; the coupling is only flags and the output directory
Binary size (about 87 MB for Hugo, 36 MB of theme files)
Ship compressed archives; if needed, a slim build that downloads the theme on first use
Stage-one full rebuilds are too slow
Concurrency and priority control; an external sidebar (T2) shortens builds; stage-two slots (T5) remove these rebuilds
Old content warns a lot under the current appearance
oink check --versions reports per version; skin: self for an individual version when needed
The slot contract and the theme release disagree
Version the slot contract; oink detects the skin’s theme release and falls back to stage one when unsupported
Online features expand the scope
No accounts or comments before M2; each feature is off by default and enabled on its own
Previews of untrusted branches
A separate host name, the tightened build policy, content only and never templates
Alternatives
Alternative
Conclusion
Static builds per version (the mike and Read the Docs approach)
Storage explodes (6.15 GB raw for pgdoc-cn; 808 MB per OINK version); old themes fail on new Hugo; the version menu forces full rebuilds
Hugo’s native version dimension with every version in one build
Build cost and memory grow with versions times pages, 560 versions are not feasible, and every new tag rebuilds all versions; it suits small static sites and belongs to theme roadmap R2
Forking Hugo, or calling hugolib in-process
A fork is costly to maintain; hugolib is not a stable API; in-process builds bring memory peaks and crashes into the server
A CMS that keeps everything in a database
Loses Git and Markdown as the authority, and the review workflow with them
Running Hugo per request to render one page
Hugo needs the whole site graph to render a page and cannot work page by page
Cloudflare Pages with Functions and D1 or Hyperdrive
Multi-version static trees hit per-deployment file limits; build time is limited; online features scatter across Workers. Keep Pages as a static target of oink build and Cloudflare as the CDN in front of oink serve
.oink as tar.zst, ZIP, a Git pack, or a custom ZIM-style binary
tar has no random access; ZIP compresses per file and is 12 times larger than clusters; a Git pack makes every reader implement Git and rendering; a custom binary needs its own parser and remains a second-stage option for remote Range reads
Open decisions
The default recommendation is in parentheses. Without an answer from the owner, the prototype proceeds on
the recommendation, which does not count as acceptance.
On acceptance, formally supersede the CLI contract and the related CLI roadmap stages, and retire the
oink-cli candidate? (Yes)
Put the binary in the existing pgsty/oink-cli repository or a new one? (Reuse and rename it, keeping
history)
Is the default skin the head of the default branch or the newest release tag? (The default branch)
Canonical links: do old pages point at the same page in the default version (this proposal) or at
themselves (the CLI roadmap draft)? (The default version)
Is the default version served without a version number, or does every version carry a prefix? (Without)
Does line content default to the newest tag or to the head of the line’s branch? (The newest tag;
translation projects can switch to the branch)
Are comments shared across versions or kept per version? (Shared and labeled with the version)
Does the theme release strictly follow go.mod, or may the embedded theme override it? (Strictly)
The .oink codec: zstd with a decoder in Crib, or a codec Apple ships for packages built for Crib?
(Measure first)
Does the first version support only a SQLite state store? (Yes; a PostgreSQL backend waits until
pg.center needs several instances)
Does oink without a subcommand mean oink dev in a site directory? (Yes)
Should the theme support Hugo’s native version dimension for static users? (Outside this proposal;
theme roadmap R2 decides)
Decision log
Date
Record
2026-11-27
The owner sets requirements for an online form: comments, users, access control, full-text search, page views and versions, covering pg.center, pgext and 500+ PG documentation versions, with Cloudflare preferred
2026-11-28
The owner proposes the oink binary, a Git-aware production mode, SQLite, .oink packages and Crib; deduplication, packing and rendering are measured on pgdoc-cn and the PG 18 site
2026-11-28
The owner says the existing oink-cli need not constrain the design and the requirements may be improved; this proposal is drafted
7.9.14 - OINK CLI maintenance roadmap
Historical R1–R8 requirements for documentation maintenance and Oink Studio, distinct from acceptance evidence and the current reduced CLI contract.
Implemented requirements record
This dated requirements record preserves the original R1–R8 planning scope
and anchors. Current CLI behavior belongs to the
CLI contract and CLI introduction,
and historical acceptance evidence belongs to the
2026-10-04 supplement.
Conditional extensions E1–E4 remain inactive.
The proposed product should complete documentation maintenance before adding a
local visual interface. It should help maintainers check changes, understand
their effects, review safe modifications, and publish the exact artifact that
passed checks. Studio should expose those same capabilities.
Record
Value
Status
Implemented locally for R1–R8 and A18
Owner
OINK maintainers
Date
2026-10-03
Baseline
Local CLI 0.1.0-dev, commit e623d93. Hugo Extended 0.166.0 and Go 1.27.1 on macOS arm64
Completion scope
R1–R8 and the acceptance cases below. Conditional extensions have separate entry criteria
One full-time developer with scheduled documentation and review support
Background and evidence
The original CLI roadmap accepted
an independent Go executable and narrowed the first implementation to
doctor, check, init, single-site upgrade, dev, and build.
This proposal adds a maintenance program with a defined scope. Docsy migration, version
lifecycle, OpenAPI generation, and theme 1.2 retain their own scopes.
The 2026-10-03 local audit reran the Go suite and actual Hugo integration tests.
A bilingual initialized site passed checks over 223 files and 4,461 references.
The PIG consumer site passed over 1,392 files and 64,440 references, with 858
source files and its Git state unchanged.
The audit also reproduced four limits. A missing rendered link failed check
while build succeeded. Ordinary HTML references outside the configured base
path were marked untested. doctor --release accepted a Starter still using
https://example.org/. Both embedded deployment workflows called Hugo without
the CLI’s additional checks. Translation completeness and readable upgrade
diffs were absent. These findings define the first changes.
Product goal and users
Prioritize maintainers of multilingual engineering documentation and small
teams maintaining several Hugo sites. Their recurring jobs are reviewing
translations, preventing broken publications, updating dependencies, and
reorganizing content without losing references or public URLs.
The product succeeds when an ordinary consumer repository can use one quality
entry point locally and in CI. Maintainers must be able to inspect affected
pages and apply reviewed changes while preserving unrelated work. CLI, Studio, and Agent callers must
receive the same findings and change plans.
Feature selection
Capability from the supplied design
Decision
Delivery
Links, anchors, attachments and machine outputs
Strengthen existing checks and explain uncovered cases
R1–R3
Environment diagnosis, preview and strict builds
Complete release diagnosis and add opt-in verified builds
R1, R3
Translation completeness and protected structure
Build as a primary product capability
R2
Initialization and CI configuration
Extend the fixed Starter and manage reviewed CI changes
R3–R4
Native content rules and project style
Implement a small deterministic core. Optional general tools
R2, R6
New content, snippets and editor setup
Implement ordinary Hugo inputs with overwrite protection
R4
Safe upgrades and migration preflight
Add diffs and candidate comparisons. Framework migration remains separate
R4
Page moves, renaming and impact analysis
Implement after page relationships and change plans are dependable
R5
Issue panels and translation comparison
Build a read-only local Studio first
R7
Multiple sites
Add an explicit site registry over the same single-site engine
R6
EPUB, PDF and offline packaging
Conditional adapter to distributed publication tools
E1
Executable documentation examples
Conditional, explicit execution profiles
E2
Agent inspection, impact and context
Implement deterministic local operations
R5
AI translation and semantic review
Conditional proposals after deterministic maintenance works
E4
Sources, evidence and knowledge dependencies
Limit this program to build/review provenance and observed page relationships
Wider knowledge management deferred
Rich editing, live collaboration and native desktop apps
Deliver safe Markdown editing only. Defer the broader platform
R8. Remainder deferred
Scope and non-goals
R1–R8 define this PRD’s finite completion scope. Each stage can deliver value
and be accepted separately. Suggested CLI versions 0.2, 0.3, and 0.4
identify release candidates. They do not require public tags or theme versions.
The program does not include a renderer, universal migration engine, hosting
account manager, deployment API, built-in LLM, vector database, remote editor,
real-time collaboration, native desktop shell, or full WYSIWYG editor.
Existing provider workflows perform deployment. Publication permissions and
credentials remain consumer-owned.
Shared project facts and check policy
This scope is accepted locally. The original requirements below are retained
as proposal history. Current behavior and flags belong to the
CLI contract.
Extend the existing isolated Hugo analysis. Do not introduce a second
configuration parser or navigation authority. Proposed internal facts include
page identity, language, publication state, actual output URLs, known source
files, translation relationships, and observed rendered references.
Use Hugo’s public Page.Translations
and Page.OutputFormats for
relationships and outputs. Page.File can
provide provenance, but some pages have no backing file. Such findings must
retain an output location and unknown source state. Any temporary probe must
leave ordinary published outputs unchanged after its removal.
Use oink.yaml only for check selection, severity, translation policy,
reviewed exclusions, and tool/workflow options. Hugo continues to own languages,
titles, menus, URLs, and site configuration. Module files own theme versions.
Initially provide check links, check translations, and check style over
one shared analysis. Keep --json. --format json may be an additive alias.
Report blocking errors, warnings, and suggestions through the existing
error, warning, and info severities. Unsupported required tools or input
shapes remain exit 2. Policy cannot turn failed builds, unreadable inputs,
or incomplete required checks into success. Source locations need reliable
mapping. Otherwise report the actual output and pointer.
Translation maintenance
This scope is accepted locally. The original requirements below are retained
as proposal history. Current behavior and flags belong to the
CLI contract.
Support filename languages, language-specific content directories, and
translationKey relationships as resolved by Hugo. Coverage policies select
required languages for an explicit content scope. Disabled languages and
intentional localizations must not become missing-translation errors.
Check duplicate identities and configured draft/publication requirements.
If a production build omits a source needed to assess policy, use an explicit
analysis view. Do not confuse that view with publishable output.
Provide two policies: strict correspondence for manuals, and localized content
for blogs or product pages. Strict policy can require explicit IDs, declared
placeholders, selected code blocks, and necessary fields to agree. Localized
policy checks only declared shared constraints. Heading counts and all code
blocks must not become universal requirements.
Propose translations status, translations diff <page>, and an explicit
review-record operation. A versioned review record binds the translation to a
source content hash or Git revision, plus the translation hash and declared
source language. A missing record means unknown. A changed hash means changed
since review, not automatically a bad translation. Recording review requires
a user-requested write and must never happen just because a checker ran.
Native content rules and baselines
This scope is accepted locally. The original requirements below are retained
as proposal history. Current behavior and flags belong to the
CLI contract.
Start with a small catalog of high-confidence rules drawn from actual
consumer failures: malformed supported component/attribute usage, conflicting
explicit IDs, known deprecated forms, and configured protected content.
Respect the syntax boundaries of code, inline code, shortcode bodies, raw HTML,
and attributes. Do not apply regular expressions without regard to these boundaries.
Use the effective theme version’s contracts. An editor schema that omits
types is not a complete strict validator. Missing compatible metadata must
produce explicit limited coverage rather than validate against the latest
theme. Do not require a future theme release to finish basic checks.
A visible versioned baseline can acknowledge existing findings with stable
fingerprints, reasons, and review metadata. Reports show acknowledged and new
findings separately. Baseline updates are explicit and reviewable. They cannot
hide required incomplete work. Formatting and prose suggestions are optional.
Automatic fixes first produce a diff, then validate a candidate before applying
a narrow set of files.
Verified publication and CI
This scope is accepted locally. The original requirements below are retained
as proposal history. Current behavior and flags belong to the
CLI contract.
Preserve the current transparent build default. Add an explicit managed
build --check workflow. Run one strict Hugo build. Run selected checks on the
same output. Export only that verified artifact to a new or empty destination.
Do not delete arbitrary directories or mix stale files into a verified tree.
Default build must continue to report when extra checks did not run.
A local versioned manifest records the source revision and dirty state when
known. It also records the source-input hash, effective theme identity, Hugo/CLI
versions, build settings, base URL, check coverage, and file digests. Secrets and machine paths must not
be copied into public metadata. If a public build marker is enabled, it contains
only the minimum identity needed for verification. Artifact changes after
validation invalidate the recorded result.
Propose ci init github-pages and ci init cloudflare-pages --mode direct-upload.
Generate local configuration only, explain variables and permissions, and
record template provenance. Detect existing workflows, preview diffs, preserve
unknown modifications, and require explicit application. Both use the same
quality engine and upload the verified output without another Hugo build.
Before a public CLI release, templates must accept a documented immutable
source/archival input rather than assume a nonexistent download tag.
Extend release diagnosis with an example-address warning, a release-policy
error when publication checks require a real address, effective local source
commit/dirty state when available, and comparisons with supported generated CI
settings. Unknown custom CI is reported as unknown. A local checkout’s commit
does not attest to a published module. Vendor byte identity remains separate.
Propose verify --site URL --manifest FILE with explicit network permission.
Check representative pages, languages, resources, search/Markdown outputs,
canonical addresses, and artifact identity. A generic fallback with HTTP 200
must fail identity checks. Timeout, authentication, rate limiting, or an absent
required identity produce unknown/incomplete results, not invented success.
Local HTTP fixtures test this without deploying to a provider.
Authoring and upgrade assistance
Add new, a small snippet catalog, and explicit editor-schema setup. Create
page bundles, selected translation drafts, and ordinary front matter while
refusing existing files. Translation drafts are not completed translations.
Editor hints follow the effective theme and preserve existing editor settings.
Extend init with docs, blog, book, and project profiles by composing one
licensed Starter source. Do not maintain four copied template trees. For existing
projects, provide diagnosis and reviewed proposals. Do not replace their configuration.
Keep the explicit-tag, single-site upgrade protections. Add readable unified
diffs and baseline/candidate route and capability comparisons. Report removed
URLs, changed aliases and missing previously enabled outputs. A clean candidate
build alone does not prove compatibility. Proposed configuration migrations
need a documented transform and tests. Otherwise return a manual action.
Conflicting replacements and vendor refresh remain explicit owner operations.
Impact analysis and safe content changes
This supported scope is accepted locally. The original proposal requirements
below remain as history. Current behavior, limits and flags belong to the
captured-facts contract and
move contract.
Provide inspect <page>, impact --since <ref>, and context <task> over the
shared facts. Inspect shows provenance, publication state, references,
translations, and outputs. Context packages relevant local material with
versions, paths, selection reasons, and size limits. No vector service or LLM
is required. Document content is data. It cannot authorize command execution.
Initially check --since may still perform a full check and say so. Later
optimization must include changed targets, their inbound references, translations,
and derived outputs. Deleting B must still inspect unchanged A that links to B.
Configuration, templates, navigation, or uncertain dependency changes expand
the scope to a full check. Cache data is disposable evidence. It is not an authority.
Propose move <source> <target> as preview by default. A plan contains touched
files, readable diffs, base hashes, translations, attachments, route changes,
and an alias recommendation. Rewrite only links whose meaning and ownership are known. Ambiguous template/shortcode references require review. Apply verifies bases,
validates an isolated candidate, protects concurrent edits, and retains recovery
information. A failed or stale plan must not partially overwrite user work.
Workspaces and optional tools
An explicit workspace registry names selected site directories. It reuses the
single-site engine, reports per-site results and aggregate completion, and
allows writes only to explicitly selected sites. It must not discover and
upgrade every sibling repository automatically or duplicate Hugo settings.
Optional markdownlint, Vale, and lychee adapters use explicitly configured,
already provisioned tools and normalize their findings. Required missing tools
return 2. Optional omissions remain visible. If the adapter cannot understand syntax, exclude it. Do not rewrite it. Ambiguous external-link failures require a
network-status distinction. Tool installation and network access are separate
actions, and generic formatters never overwrite content by default.
R6 accepted local boundary
The explicit registry and optional adapters are accepted locally in supported R6
scope. Stable fields and limits are documented in the
registry contract and
tool contract. The accepted R7/R8
boundaries below retain their own evidence and limits.
oink.workspace/v1 names 1–64 literal directories in one regular YAML file
bounded to 256 KiB, without duplicating Hugo settings or discovering siblings.
Exact names, canonical root identity, registry-order selection, per-site
0/1/2 parity and explicit-name saved-plan application are the supported
workspace boundary. Already provisioned markdownlint-cli 0.49.1, Vale
3.24.0 and lychee 0.24.2 extend each site’s policy, with captured
configuration and typed protocol/source/network coverage. They do not install
or format tools/content. Lychee needs explicit network consent. Ambiguous
external failures remain unknown rather than definite broken links.
Frozen Go/vet, actual Hugo/pinned-tool, and owning race gates have passed. The
exact binary also passed four-site direct/aggregate diagnostic/coverage/exit
parity and all source byte, full-mode, Git, ignored-input, and directory guards. Initial
preparation failures remain excluded, and the receipt-driver-only command
metadata correction is recorded without a CLI runtime correction or rerun.
Guarded canonical EN/ZH source/rendered checks passed, and supported R6/A07/A15
scope is accepted locally in the
R6 record.
Current A18 runtime/archive qualification passed. Darwin amd64 remains
experimental/unverified.
Read-only Oink Studio
Build a local web interface with project overview, issue panel, translation
comparison, page relationships, and publication panel. These views use the same
core results as CLI/CI. Support filters, known-source navigation, actual Hugo
preview, change comparisons, and copying proposed actions. A large graph or
embedded editor is not needed for this acceptance.
Default to loopback and an explicit site allowlist. Separate untrusted rendered
content from the management origin. Handle Host/Origin checks and session
authorization before adding write APIs. Ship prebuilt UI assets with the CLI. Node is a contributor build dependency, not a consumer runtime requirement.
Cover keyboard operation, screen-reader labels, mobile layouts, light/dark
themes, and readable long diagnostic lists.
R7 candidate boundary
The read-only Studio candidate now serves an embedded five-view browser and
an authenticated literal-loopback API over the same native checks and captured
Hugo facts. Stable candidate boundaries are in the
contract. Explicit existing-site/registry selection,
typed paginated findings, source/diff/hash states, actual production preview and
separate optional analysis coverage preserve the CLI authority.
Frozen native/browser/core-case and exact-binary four-consumer receipts now
qualify the supported read-only scope, including explicit partial-preview
incompletion. They exercise native 0/1/2 parity, keyboard/mobile/light/dark
flows, literal source data and separate-origin preview attacks. R7/A16
passed guarded canonical promotion/rendered gates and is accepted locally.
R1–R8 supported scope and current A18 runtime/archive qualification passed.
Safe Markdown editing
After the read-only interface is accepted, add Markdown editing, front matter
forms, selected component insertion, and attachments. Reuse the CLI change-plan
engine and actual Hugo preview. There is no second save/validation mechanism.
An unchanged open/save cycle must preserve bytes. Updating one field preserves
unknown fields, comments, order, encoding, and unrelated whitespace. Detect
external-editor changes and refuse stale saves. If a front matter form cannot
preserve a construct, keep it editable as text and explain the form limitation.
Do not round-trip the whole document through a generic serializer.
Writes need an authorized local session, an allowed directory, base verification,
and a visible diff. Reject path traversal, symlink escapes, and requests from
untrusted preview content. Attachments must not overwrite existing files.
Publishing a static site never adds these management APIs to it.
R8 accepted editing boundary
R8 now has one source-preserving proposal engine for CLI edit text, field,
snippet and attachment, and the explicit studio --edit flow. Default Studio
remains read-only. Known site-owned Markdown, exact source hashes, supported
top-level YAML scalars with text fallback, original catalog byte-boundary
insertion and new-only leaf-bundle attachments share the same saved plans and
guarded writer. The complete visible review binds plan, file, and full-mode identities. Candidate HTML comes from actual selected nonpublishable Hugo analysis, with
native findings and required view incompletion kept distinct.
The accepted local interface is documented in the
contract.
Corrected frozen public/Go/race/vet, actual/ordinary Hugo, Editor browser
accessibility/mobile and exact-binary four-consumer preservation gates passed.
R8/A17 supported local scope also passed guarded canonical source/render gates
and is accepted in the
R8 record.
R1–R8 supported scope and current A18 runtime/archive qualification passed.
Darwin amd64 stays experimental/unverified.
Delivery sequence and schedule
The following estimate assumes one developer. T0 is the implementation start after scope
approval. Dependencies are sequential
acceptance gates, which additional staff can support through independent tests
and UI work.
Three language layouts. Strict/localized cases. Reviewed fixes preserve files
R3
6–8
Verified build artifacts, CI init, release diagnosis, deployed-site verification
One checked artifact is uploaded. Stale bytes and HTTP 200 fallback are detected
R4
9–11
New content, profiles, snippets/editor setup, upgrade diffs/comparisons
Ordinary Hugo build. Dirty/replaced/vendor and route-regression cases remain safe
R5
12–15
Inspect, impact, context, move and shared change plans
Unchanged inbound links and translations are included. Stale plans cannot write
R6
16–17
Explicit workspaces and optional check adapters
Per-site parity. Required unavailable tools are incomplete. No implicit installs
R7
18–20
Read-only Studio and its security boundary
Five useful views. CLI/UI findings agree. Accessibility and preview isolation pass
R8
21–24
Safe Markdown/forms/attachments with conflict review
No-op save has zero diff. Comments/unknown fields survive. Concurrent saves fail safely
Allow another 4–6 weeks for integration, false-positive review, cross-platform
execution, and repairs, distributed across the gates. The total planning range is
28–30 effective weeks (or roughly twice that elapsed calendar time at half-time availability).
R1–R3 yield a proposed 0.2 quality/publication candidate around weeks 9–10
including early reserve. R4–R6 yield a proposed 0.3 maintenance candidate
around weeks 19–20 cumulatively. R7–R8 yield a proposed 0.4 local Studio
candidate around weeks 28–30 cumulatively.
Conditional extensions
Extension
Entry criterion
Proposed boundary
Separate estimate
E1 Publication exports
At least two maintained books need a recurring export workflow
Reuse distributable EPUB/PDF tools and package local artifacts. Declare external dependencies
1–2 weeks after R3/R4
E2 Executable examples
Explicit owners identify runnable examples and disposable test environments
Thin adapter over inspect/check/impact/context/plans. Same permissions and diagnostics
1–2 weeks after R5
E4 AI review and translation
Deterministic translation maintenance works and a reviewed evaluation corpus exists
User-selected provider, explicit network/cost settings, proposals bound to source hashes. No automatic source writes
3–6 weeks for a limited experiment after R5
The R1–R8 total excludes these estimates. Activate an extension only for its
stated use case. A future need is not an unfinished core milestone. Remote
Studio, live collaboration, native shells, general knowledge provenance, vector
retrieval, and universal framework migration require separate PRDs and evidence.
Architecture and compatibility
Use Go for core operations. Use subprocesses for Hugo and optional tools.
Extend existing packages when they own the behavior. Add a package only with
its capability. Do not create a generic plugin platform, public SDK, or shared
service layer before an actual consumer needs it.
Preserve oink.result/v1, exit meanings, and the default thin wrappers. New
diagnostic details and command data may be additive. Changed field semantics
need a new result version. Version review records, baselines, plans, build
manifests, and workspace registries independently. Detect supported capabilities
from the actual theme. Do not require all users to install the latest release.
Read/check/preview, local file application, networking, example execution, and
deployment have separate side effects. No telemetry, background updater,
credential discovery, arbitrary directory cleanup, global configuration change,
commit, push, or deployment happens as a maintenance side effect. Read-only
consumer trials preserve sources, replacements, workspaces, and vendor bytes.
Acceptance cases and owning checks
Case
Required outcome
Primary owner
A01 JSON and completion
One JSON result on stdout. Clean stderr separation. Findings 1, required incompletion 2
internal/report, internal/app, Schema
A02 Hugo truth
Slug/url/permalinks/aliases, custom mounts, unlisted pages and language roots follow actual Hugo results
internal/site, internal/outputcheck, actual Hugo fixtures
Readable diff, old/new routes, dirty files, both workspaces, replacement/vendor, failure recovery and concurrent edits
internal/upgrade, public-command/Hugo tests
A13 Impact
Deleted B finds unchanged A. Translations/attachments/derived outputs included. Global changes expand scope
Impact and Git-baseline fixtures
A14 Change application
Candidate validation before apply. Hash conflicts and failed writes preserve subsequent edits. Ambiguous references are not rewritten
Shared plan/apply and move tests
A15 Workspace and context
Per-site results match direct invocation. Selected writes only. Bounded context gives paths/versions/reasons without executing content
Workspace/context tests
A16 Studio parity
Five views show the same results as CLI. Usable keyboard/mobile/light/dark flows and source/preview separation
Studio browser/accessibility tests
A17 Editor preservation
No-op save is byte-identical. YAML comments/unknown values/order survive. Stale saves and attachment collisions are rejected
Editor/browser and shared apply tests
A18 Runtime and recovery
Test actual declared macOS/Linux targets. Signals stop child processes. Cached operations work offline. Unsupported inputs remain explicit
Process/integration/installation tests
Run the smallest owning tests before broader integration. Keep Go unit fixtures
offline. Repeat actual Hugo tests after parser, snapshot, probe, initialization,
or upgrade changes. Keep focused checks. Do not require consumers to run theme internals or a
browser suite for every document change.
For each candidate, record tool versions and source identities. Then test the
Starter and three distinct maintained sites without writes. Compare source bytes,
modes, and Git state before and after. Tests for new native rules need a reviewed
valid/invalid corpus. Fix false positives before enabling a blocking default.
Before promising incremental speed, measure full-build time against the same
current-site baseline. Functional correctness takes priority over check counts.
Completion and release evidence
For each stage, record implemented behavior, known limits, focused tests, and
actual integration results. Provide updated EN/ZH contracts/guides and a
reviewable diff. Track individual requirement/case statuses. This PRD is complete only when
R1–R8 and their required acceptance cases are satisfied.
After supported behavior is accepted, move it into the owning CLI contract,
usage guides, and durable decisions. Retire the corresponding proposal sections
through the existing lifecycle.
Decisions and stop conditions
Confirm staffing and start date before turning relative weeks into calendar
dates. Decide supported runtime targets, review-record storage details, initial
native-rule catalog, and precise additive command flags in R1. These are bounded
implementation choices within this scope, not reasons to reopen the product
boundary or wait for an entire theme release.
If preservation or correctness work exceeds a stage estimate, move its optional
convenience work later. Never remove stale-write protection, truthful completion,
or ordinary-Hugo compatibility. If repeated corpus review shows that a rule is unreliable, keep it advisory
or remove it. If a form cannot preserve source
bytes, keep that syntax in text mode. Interest in implementing a conditional extension does not add it to the
critical path.
Decision log
Date
Record
2026-10-03
Created from the current CLI audit and the supplied feature goals. Proposed R1–R8, optional extension gates, resource assumptions and executable acceptance cases.
2026-10-03
R1 shared Hugo facts and check policy passed local owning/actual-Hugo checks. Stable behavior moved into the CLI contract. The acceptance record tracks final refreshed reports and rendered EN/ZH evidence separately. R2–R8 and conditional extensions remain open.
2026-10-03
R2 translation scopes/hash reviews, syntax-bounded native rules and visible baselines now use shared guarded file plans. Local owning, actual-Hugo and focused race gates passed. Final refreshed consumer and EN/ZH documentation acceptance remains pending in the record. Implemented behavior is in the contract. R3–R8 remain open.
2026-10-03
R2 final corpus and bilingual documentation gates passed. R3 one-render checked export, exact file identity, guarded CI plans for both providers, release diagnosis and explicit-network HTTP verification passed their scoped local gates, including custom-workflow discovery. Stable behavior moved to the contract. Exact evidence and A08–A10 outcomes belong to the maintenance record. R4–R8, final A18 runtime/archive refresh and Darwin amd64 remain open.
2026-10-03
R4 supported local scope passed frozen Go/vet, actual Hugo/race and exact-binary read-only Starter/docs/PIG/repository gates. One unchanged licensed Starter composes all profiles/languages. Ordinary new/editor/snippet flows and source/external-input guards passed, as did readable bounded upgrade views and alias/output regression protection. Stable behavior belongs to the contract. Exact A11/A12 evidence and remaining limits belong to the record. R5–R8, final A18 runtime/archive refresh and Darwin amd64 stay open.
2026-10-03
R5 corrected frozen Go/vet, actual Hugo/race and exact-binary four-consumer read-only gates completed. Inspect/context complete for all sites. Historical impact and move blockers remain explicit. Guarded canonical source/rendered gates and stage acceptance are pending. Stable behavior belongs to the contract. The record identifies A13/A14/context evidence, the cached-module correction and exact preservation receipt. R6–R8, workspace A15 and final A18 remain open.
2026-10-03
R5 supported inspection/impact/bounded-context and guarded move scope is accepted locally after corrected frozen owning gates, exact-binary four-consumer preservation and first-promotion canonical source/rendered gates. The production translation owner retains only its known draft-release omission. Separate nonpublishable analysis passes all owners. Stable behavior belongs to the contract and command reference. The record retains exact outcomes and the separate post-render evidence boundary. A13/A14 supported CLI scope passed. A15 context passed while workspace/direct parity remains R6. R6–R8 and final A18 remain open.
2026-10-03
R6 explicit registry and bounded optional-tool candidate implemented. Focused workspace and corrected actual-protocol trials passed, with preparation failures kept separate. Final runtime/corpus/canonical gates and A07/A15 stage acceptance remain pending in the R6 record. R7/R8 and final A18 remain open.
2026-10-03
R6 frozen Go/vet, actual Hugo/pinned tools, owning race and exact-binary four-consumer direct/aggregate parity/preservation qualified. The completed receipt records six original operations, existing repository duplicate-ID findings and a driver-only command-summary correction over unchanged raw outputs. No CLI/Hugo rerun or runtime fix was needed. Canonical source/render checks and explicit R6/A07/A15 stage acceptance remain pending in the record. R7/R8/final A18 remain open.
2026-10-03
R6 supported explicit-registry and optional-tool scope is accepted locally after frozen Go/vet, actual Hugo/pinned tools, race, exact-binary four-consumer parity/preservation and guarded canonical source/render gates. A07 adapters and A15 workspace/direct/context supported scope passed. The R6 record separates first-promotion rendered bytes from this post-render status/evidence amendment. R7/R8 and final A18 remain open.
2026-10-03
R7 read-only embedded Studio candidate and authenticated loopback views implemented. Frozen core/browser and exact-binary four-consumer qualification completed within the declared scope. Guarded canonical promotion/render and explicit R7/A16 acceptance remain pending. R1–R6 remain accepted. R8/final A18 open.
2026-10-03
R7/A16 supported read-only Studio is accepted locally after frozen cumulative executed-case/browser proof, exact-binary four-consumer parity/preservation and guarded canonical source/render gates. First-promotion rendered bytes remain distinct from this post-render status amendment. Whole invocation failure and explicit partial-preview incompletion stay visible. R1–R7 accepted. R8/final A18 open.
2026-10-03
R8 CLI/opt-in Editor source-editing candidate implemented. Default Studio remains read-only. Pure-core/streaming-output focused evidence is recorded and failed browser trials retained. Final frozen public/browser/consumer/canonical gates and A17 stage acceptance remain pending in the R8 record. R1–R7 remain accepted. R8/final A18 open.
2026-10-03
R8/A17 reviewed CLI/opt-in Editor supported local scope is accepted after corrected frozen whole owning/browser gates, exact-binary four-consumer proposal parity/source preservation and guarded first canonical promotion/actual rendering. R1–R8 are accepted locally. The R8 record separately binds first-rendered and current status bytes, retaining every failed trial, native finding and required partial-preview incompletion. Final A18 current Linux/archive qualification remains open.
2026-10-04
Current backend integrity correction, refreshed owning/Hugo/race, carried unchanged-runtime four-consumer preservation and three declared runtime/archive qualifications passed. See the dated completion supplement. Finite R1–R8 implementation is complete locally. Retain this requirements record and anchors, retire it from active navigation, and keep stable behavior in the contract/guide. E1–E4 have not been invoked.
7.9.15 - Visual presets and appearance switching
Paper and Slate ship in 1.2.0; Ink and Terminal are explicitly enabled experiments awaiting design acceptance.
Phase 1 released in 1.2.0; refined in 1.7.0; Ink/Terminal opt-ins available
Paper, Slate and the Appearance menu ship with OINK 1.2.0; OINK 1.7.0 further refined all four presets, added per-preset CJK system typography, and finalized the t/y shortcuts. The architecture contract,
accepted decision and
acceptance record
own current behavior and evidence. A subsequent Ink/Terminal experiment
provides actual selectable output; this proposal remains active for their design acceptance. The October 4 injected screenshots are research prototypes; they
are distinct from the October 5 screenshots of actual theme output.
Status and surface
Field
Value
Status
Phase 1 released in 1.2.0; Ink/Terminal explicit opt-ins
Owner
OINK maintainers
Date
2026-10-04
Baseline
OINK v1.4.0 theme and documentation site; this row preserves the proposal’s October 4 research starting point
Paper preset, Slate preset, default changed to Paper, reader switching between Paper and Slate
Later phases
Ink/Terminal design acceptance; Folio and Canvas names reserved only
Context and evidence
The baseline and limitations below record the October 4 research input, before phase 1.
OINK ships one visual identity, referred to here as Slate: a cool blue-grey
canvas (#f1f4f8 / #0b1119), navy text, steel-blue links (#245f94), copper
accents, Inter for interface and prose, Chakra Petch for display and wordmark,
IBM Plex Mono for code and technical labels, a blueprint grid and glow on the
Landing hero, and a crimson inline-code pair. It is defined by Bootstrap
custom properties in assets/css/td/brand.css, shell tokens in
assets/css/td/shell/tokens.css, and font roles in
assets/css/td/tokens-typography.css. In releases up to 1.5.1 these are the
SCSS partials _brand.scss, shell/_tokens.scss and _tokens-typography.scss
under assets/scss/td/.
PG.CENTER, an independent site, has a warm editorial reading style that
maintainers want as the future OINK default. Its presentation tokens live in
media/css/pgsql.css of that project. Measured on its local preview
(2026-10-04, light and dark, home, Docs index, long manual page, component
manual):
Role
Light
Dark
Note
Canvas
#f7f6f3
#161513
warm white / warm black
Raised surface
#ffffff
#1d1c19
cards, code blocks
Secondary surface
#efede8
#262420
table header, hover
Ink
#21201c
#ece9e3
body text
Secondary text
#56534c
#b6b1a7
Lines and washes
ink at 4.5–22 % alpha
light ink at similar alpha
no tinted greys
Radius
12 px / 8 px
same
Shadow
0 2px 10px rgba(33,32,28,.07)
black-based
warm, soft
Motion
160 ms cubic-bezier(.2,.7,.2,1)
same
Typography is IBM Plex Sans (variable, 400–600) for interface and prose, IBM
Plex Mono for code, dates and versions, and Chakra Petch for the wordmark
only. The component-manual pages are the best long-form model: lead paragraph
17 px capped at 70ch, h2 followed by a hairline that runs to the edge, framed
tables with a header band and no zebra, monochrome callouts with a 3 px rule.
The following PG.CENTER elements are site identity, not reusable reading
rules: the PostgreSQL brand blue #336791 family, wine content links,
version-state colours, release strips, search-kind badges, wiki tones, the
duotone hero, and the 144-character measure of the imported PostgreSQL manual.
Two values fail WCAG AA (muted text 3.67:1, link hover 4.22:1) and are
corrected below rather than copied.
Colours are tied to data-bs-theme only. No attribute selects a second
palette, and several surfaces bypass tokens: the Landing primary button
(#2f6793 with navy glows), the grid, scrims (rgba(4,10,18,.45)), print
colours, asciinema surfaces, and the giscus stylesheets.
About 85 literal border radii and several literal shadows make a flat preset
impossible without a radius and shadow scale.
The light/dark control expands on hover or focus. Touch readers cannot reach
“follow system”; the trigger mixes aria-pressed and aria-expanded; Esc
does not close it. The Landing mobile drawer has no theme control.
contrast-on-canvas.html hard-codes Slate canvas luminance for the
theme_color warning.
dark_mode is opt-in (false by default), so the palette and its menu are
absent unless a site enables them.
Goals and non-goals
Goals:
one site key selects the default visual preset; Paper becomes the default;
Slate remains available and reproduces current output for sites that choose it;
readers can switch Paper and Slate instantly, without reload, independent of light/dark/system mode;
the configured default renders without JavaScript and with storage unavailable;
presets share templates, components, and layout geometry; they change paint and type;
local fonts only, ordinary Hugo build, no new runtime framework or required build tool.
Non-goals:
implementing Ink, Terminal, Folio, or Canvas in phase 1;
copying PG.CENTER brand colours, version UI, or page structures;
per-page or per-section presets (section colour remains theme_color);
changing layout geometry, density, or navigation structure per preset in phase 1;
theming Swagger UI, ReDoc, or third-party embeds beyond their existing light/dark handling.
Preset model
This table and the phase-one configuration below retain the original scope.
The later experiment adds explicit ink/terminal configuration and menu-list
entries; true still offers the stable set plus the site default. The
architecture contract owns current behavior.
Preset
Direction
Phase 1
Reader menu
paper
Warm editorial minimalism
Implemented, default
Yes
slate
Technical minimalism (current OINK)
Implemented
Yes
ink
Typographic minimalism, Swiss-inspired
Spec + research prototype
No
terminal
Terminal-inspired utilitarian
Spec + research prototype
No
folio
Academic / book publishing
Name reserved
No
canvas
Playful geometric / creator
Name reserved
No
Reserved names are rejected by validation until implemented, with a warning
that names the stable presets.
preset selects the site default. Invalid or reserved values warn through
the existing validation path and fall back to paper. Publishing gates turn
the warning into a failure.
preset_menu controls the reader choice. false renders no style group and
emits no preset-init script; true offers every stable preset; a list offers
a subset that must contain preset. Following the dark_mode precedent, the
default is false; the documentation site enables it; starter adoption is outside this change.
preset is site-level only. Page and section overrides are not supported:
switching identity per page would break reader expectation and the stored
choice.
The Appearance menu exists when either dark_mode.show_menu or a style
choice is enabled. A site with dark_mode: false and preset_menu: true
shows only the Style group.
Relationship to existing keys
Precedence, lowest to highest:
Slate base tokens on :root / [data-bs-theme] (unchanged selectors).
Preset tokens on [data-td-preset=X].
params.ui.typography: system — collapses font roles to system faces after
the preset blocks, so it still requests no brand font in any preset.
params.ui.fonts — emitted inline after the stylesheet at :root; equal
specificity and later source order beat preset font roles. Explicit fonts
always win.
theme_color / theme_color_dark — page and section accent backgrounds
only. They override the preset accent; they never touch links or inline code.
The site’s project stylesheet, assets/css/project.css — loaded after the
theme’s stylesheet. In releases up to 1.5.1 it is _styles_project.scss,
last in the compiled bundle.
typography: technical remains the name for “use the preset’s bundled faces”.
The preset decides which bundled faces those are (Paper: Plex Sans; Slate:
Inter + Chakra Petch).
Server renders data-td-preset="<site preset>" and data-td-site-preset; no script needed
Reader chooses a preset
Applied at once, stored, td-preset-change dispatched
Reader chooses the preset marked “Default”
Storage key removed; future site default changes reach this reader
Next page, refresh, other language
Inline head script applies the stored value before first paint
Stored value no longer offered
Removed; site default used
Storage unavailable
Choice applies to the current page; the menu states that it will not persist
JavaScript disabled
Site default preset renders in its light palette, as the current theme does without script; no style or mode control is usable
Style change
Never writes td-color-theme; mode change never writes td-preset
Other tab changes the value
storage event applies it
The inline script runs before the stylesheet, beside the existing dark-mode
script. It validates the stored value against the allowed list embedded at
build time, sets the attribute, and updates the theme-color meta and the
pre-paint canvas colour for the preset and mode. It is emitted only when the
menu offers more than one preset. Independently of the menu, the static
pre-paint <style> and the resolved theme-color meta in head.html are rendered
from the site default preset’s canvases instead of the current hard-coded
#0b0d12, #ffffff, and #000000.
On switch the runtime sets data-td-preset-switching for one frame to suppress
colour transitions, records the first visible heading or block as a scroll
anchor, applies the attribute, and restores the anchor offset, again after
document.fonts.ready because Plex Sans and Inter have different metrics.
Focus, open menus, and form state stay untouched. Phase 1 uses no cross-fade
or View Transition.
Appearance menu
Three options were compared:
Option
Assessment
Keep the hover menu, add a style row
Keeps the touch and keyboard gaps; hover-only discovery
Separate style and mode buttons
Two icons in a crowded navbar; mobile drawer gets longer
One Appearance disclosure with two radio groups
Chosen: one entry point, works with touch and keyboard, scales to more presets
Behaviour:
Trigger: one icon button (aria-expanded, aria-controls, label
“Appearance”). It replaces the current theme button in the navbar and in the
shell footer line. Sun means the current light state; moon means dark.
The t shortcut keeps toggling light/dark.
Panel: a non-modal popover containing two native fieldset radio
groups. The October 5 revision uses Style: icon-and-name buttons in two
columns, with a preset-colored icon and no preview letters or experiment
badges. The site default is identified by its tooltip and accessible name.
Light: a segmented Light / Dark / System control. Selection applies
immediately and the panel stays open so readers can compare.
Keyboard: Enter/Space or ArrowDown opens and focuses the checked radio;
arrow keys move within a group (native radio behaviour); Tab moves between
groups; Esc closes and returns focus to the trigger; focus leaving the panel
or an outside click closes it.
Feedback: the selected option has a tinted background and accent border;
keyboard focus has a separate outline. Changes are announced through native
radio semantics; no extra live region.
Restore default: selecting the site’s default preset clears the stored choice.
No separate reset button is needed.
Mobile (< 768 px): the trigger stays in the compact header and is also
offered in the docs drawer footer and in a new row of the Landing mobile
drawer. The panel opens as a bottom sheet with 44 px targets, the same two
groups, and a close button. The sheet is a modal <dialog> opened with
showModal(), so it lives in the top layer: the prototype showed that the
sticky header’s backdrop-filter otherwise becomes the containing block of a
position: fixed sheet and the drawer’s stacking context hides it.
Command palette: a switch_preset action next to switch_theme.
dark-mode.js keeps its storage key and attributes. It must sync the
checked state of the Light radios and listen to their change events instead
of the current aria-pressed buttons.
Token architecture
All presets are part of the single existing main.css. Fonts are declared
with @font-face and are downloaded only when a rule uses them, so offering a
preset costs CSS bytes but no font bytes until it is selected.
// Slate: existing selectors and values, unchanged
:root,[data-bs-theme='light']{…}[data-bs-theme='dark']{…}// Every other preset
[data-td-preset='paper']{/* light tokens + font roles */}// (0,1,0)
[data-td-preset='paper'][data-bs-theme='dark'],[data-td-preset='paper'][data-bs-theme='dark']{/* dark tokens */}// (0,2,0)
//Then:[data-td-typography='system']fontblock(movedafterpresets)
Rules:
Token parity. Each dark block redeclares every token of its light block,
so Slate dark never leaks into another preset. A checker enforces it.
Dark islands. The descendant form covers nested data-bs-theme="dark"
islands (Landing code plate, previews).
Font roles only at (0,1,0), so params.ui.fonts keeps winning.
Accent indirection. Presets set --td-preset-accent (and -rgb,
-hover); --td-accent defaults to it. theme_color keeps writing
--td-accent and therefore overrides the preset in both modes.
Slate stays attribute-free.data-td-preset="slate" matches no override
block, so current site overrides of brand tokens behave exactly as today.
Geometry is shared. Presets do not change grid columns, sidebar width,
or breakpoints in phase 1.
Preset-specific rules are few and scoped to [data-td-preset=X] in one
partial per preset. Anything two presets need becomes a token.
New shared tokens required before Paper (phase 1): --td-shell-scrim, Landing
--td-grid / --td-glow / primary-button tokens, --td-callout-tint,
--td-code-inline-bg, --td-hairline, and a brand font role
(--td-brand-font-family, default var(--td-display-font-family)) so the
wordmark can keep Chakra Petch while Paper’s display headings use Plex Sans.
The original phase-two plan proposed global radius, shadow and density scales.
The October 5 experiment instead scopes those changes to owned components;
a wider token refactor is not a prerequisite for trying the designs.
Contract change: the architecture contract currently fixes inline code to a
crimson pair. This proposal makes --bs-code-color a preset token (Slate
keeps crimson, Paper uses an ink chip). theme_color still never touches it.
Fonts
Preset
UI / body / heading
Display
Brand (wordmark)
Meta
Code
New bytes
Paper
IBM Plex Sans
IBM Plex Sans
Chakra Petch
IBM Plex Sans
IBM Plex Mono
Plex Sans
Slate
Inter
Chakra Petch
Chakra Petch
IBM Plex Mono
IBM Plex Mono
none
Ink
Inter
Inter
Inter
Inter (tabular)
IBM Plex Mono
none
Terminal
Plex Mono chrome, Plex Sans prose
IBM Plex Mono
IBM Plex Mono
IBM Plex Mono
IBM Plex Mono
none after Paper
Paper vendors @fontsource-variable/ibm-plex-sans (OFL-1.1) into
third_party/ with a VENDOR.json entry: Latin, Latin Extended, Cyrillic, Cyrillic Extended, Greek and Vietnamese
subsets, normal and italic, weights 100–700. PG.CENTER’s normal-only 400–600 subset is
40,240 B (latin) + 25,868 B (latin-ext); exact sizes are recorded at vendor
time. Italic is required because OINK prose uses emphasis and PG.CENTER’s
synthesized italic is not acceptable. The full small subsets preserve the existing locale coverage; the browser
loads only the ranges actually used. All 12 font files are recorded in VENDOR.json.
Chinese, Japanese and Korean use system stacks placed after the Latin face:
-apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif. IBM Plex Sans SC was rejected
because its files are megabyte-scale. Monospace stacks insert CJK sans
families before the generic monospace keyword so mixed code keeps a
predictable CJK face.
typography: system continues to request no brand font: the system block
follows every preset block and resets all roles, including brand.
Serif. Phase 1 uses no serif. Latin serif headings beside CJK sans
headings look inconsistent, Windows’ default CJK serif renders poorly at
heading sizes, and a serif costs another font. A later opt-in display-only
serif can be reviewed with the side-by-side mockup produced for this proposal.
WCAG AA: 4.5:1 body, 3:1 large text and UI boundaries, in both modes.
Paper
Warm editorial minimalism. Warm paper, ink text, quiet hairlines, soft
shadows, and generous but not loose reading rhythm. It serves long-form
reading: lower blue light on large canvases, less chrome contrast, and a
typeface (Plex Sans) with open counters that reads well at 16 px.
Token
Light
Dark
Canvas --bs-body-bg
#f7f6f3
#161513
Raised --td-brand-elev, --td-pre-bg
#ffffff
#1f1e1a / #121110
Secondary surface
#efede8
#1f1e1a
Body
#21201c (15.09:1)
#ece9e3
Secondary text
#56534c (7.10:1)
#b6b1a7
Tertiary text
#6b665d (5.27:1)
#958f84 (5.68:1)
Border
ink 12 %
light ink 13 %
Link / hover
#2b5f8c (6.23:1) / #1d68a5 (5.43:1)
#7db5e6 (8.36:1) / #a3cdf3
Accent (copper)
#9c5530 (5.17:1)
#d99a6c
Inline code
ink on ink-6 % chip
light ink on 8 % chip
Shadow sm / md
0 2px 10px / 0 14px 38px ink 7 % / 13 %
black 35 % / 50 %
Radius
code 12 px, cards 12 px, controls 8 px
same
Rules specific to Paper: headings Plex Sans 600 with −0.006em (h1 −0.012em);
h2 followed by an edge hairline; framed tables (radius 10, header band, no
zebra); callouts with a 4 % (dark 6 %) semantic wash and a single 3 px rule;
hairline blockquote; Landing without grid or glow, primary button from tokens
with a warm shadow, hero title 600 / −0.025em; selected navigation rows on a
warm neutral ground with 9 % (dark 12 %) accent mixed in. Links remain blue: a
reading convention, not decoration. Motion 160 ms ease-out for hover and
popovers; no movement on scroll.
Slate
Technical minimalism. The current OINK appearance, unchanged: cool blue-grey
canvas, navy ink, steel blue and copper, Inter body, Chakra Petch display,
Plex Mono labels and metadata, blueprint grid and hero glow, crimson inline
code, 8–12 px radii. Selecting preset: slate must reproduce v1.1 token
values; a checker compares them. Grid, glow, Chakra display headings, mono
metadata and crimson inline code are Slate identity. Layout, focus, status
colours, and the shell structure are shared foundation.
Ink
Typographic minimalism, Swiss-inspired information design. Black, white and
neutral grey; one red accent; hierarchy carried by size, weight and alignment
rather than colour, shadow or rounded surfaces.
Token
Light
Dark
Canvas
#ffffff
#0b0b0b
Body
#141414
#ededed
Secondary / tertiary
#474747 / #636363
#b5b5b5 / #8f8f8f
Surface
#f4f4f4
#161616
Link
ink, underlined; hover red
light ink, underlined; hover red
Accent
#c8102e (5.88:1)
#ff5c4d
Radius / shadow
0 / none
0 / none
Differences from Slate: no tinted canvas, no blue, no grid texture, no
shadows, no rounded corners; links are identified by underline, not hue;
headings use Inter 700–800 with tight tracking instead of Chakra Petch.
Differences from Paper: neutral not warm, flat not soft, ruled not hairline,
underline links not blue. Distinctive rules: 2 px black rule above h2; h1 800 /
−0.035em; uppercase tracked h4, table headers and callout titles; selected
navigation row marked by a 3 px red bar, not a fill; tabular numerals.
Terminal
Terminal-inspired utilitarian design. Structure and information expression,
not CRT effects: monospaced chrome, command and path notation, compact
controls, strong panel borders, amber or teal accents.
Token
Light
Dark
Canvas
#f4f5f2
#0c0f0e
Body
#1d211f
#d3dbd6
Secondary
#4a514d
#9aa59f
Surface
#e9ebe6
#141a18
Link (teal)
#0a6560 (6.31:1)
#4cc9bd
Accent (amber)
#935400 (5.47:1)
#f0a73a
Radius
2 px
2 px
Mono scope: navigation, headings, labels, metadata, breadcrumbs, buttons and
code use IBM Plex Mono. Prose paragraphs, lists and table bodies use Plex Sans
with platform CJK fallbacks, because long monospaced paragraphs and mixed CJK/Latin mono lines
read poorly. Distinctive rules: ## prefix before headings rendered with
content: '## ' / '' so assistive technology ignores it; bracketed callout
labels ([NOTE]); the selected navigation row is inverted with a ▸ marker;
1 px strong panel borders; static ▍ caret in the hero. No scanlines, glow,
blinking, or typing animation.
Difference matrix
Paper
Slate
Ink
Terminal
Temperature
warm
cool
neutral
neutral-green
Canvas light
#f7f6f3
#f1f4f8
#ffffff
#f4f5f2
Canvas dark
#161513
#0b1119
#0b0b0b
#0c0f0e
Prose face
Plex Sans
Inter
Inter
Plex Sans
Heading face
Plex Sans 600
Inter 600–700
Inter 700–800
Plex Mono
Display / wordmark
Plex Sans / Chakra
Chakra / Chakra
Inter / Inter
Plex Mono
Link signal
blue
steel blue
underline + red hover
teal
Accent
copper
copper
red
amber
Radius
8–12
8–12
0
2
Shadow
soft warm
navy-tinted
none
none
Section rule
h2 trailing hairline
none
2 px top rule
## marker
Selected row
warm tint
accent tint
red bar
inverted + ▸
Inline code
ink chip
crimson
ink chip
ink chip, bordered
Landing texture
none
grid + glow
none
none
Chrome density
standard
standard
standard
compact
Page density
Density follows the task, not the preset: the Landing hero allows the largest
display type and brand expression; Docs prose keeps 1rem / 1.7 and ≈ 76ch;
sidebar, TOC, parameter tables, search results and the command palette keep
compact rows (0.875rem, 1.4–1.5 line height). Presets may change paint inside
these zones but not their spacing in phase 1. Terminal’s compact chrome is a
phase 2 density token.
Colours baked at init on data-bs-theme. Add a data-td-preset observer only if charts take preset colours; phase 1 keeps mode-only chart palettes
asciinema
Surface tokens; re-mount only if the code face changes (not in phase 1)
giscus
Needs one stylesheet per preset and mode, re-posted on td-preset-change
Swagger UI, ReDoc
Keep vendor styling and current light/dark handling
Print
Tokenize navy and cool greys; print always uses a light palette from the active preset
404
Its own <html> must carry the new attributes
Accessibility, security, and output
Every preset palette passes WCAG AA for body, secondary and tertiary text,
links, and accents in both modes (values above). theme_color contrast
warnings compute against the active site default preset’s canvases.
The menu uses native radios; no role="menu". Focus is never trapped
except in the mobile bottom sheet, which is modal and restores focus.
prefers-reduced-motion and forced colors keep current behaviour.
The init script is inline, static, and derived from validated configuration;
the stored value is matched against a build-time allowlist before use.
No external font or script request is added. Output adds two <html>
attributes, one inline script, and CSS.
Compatibility and migration
Changing the default to Paper changes every site that does not set preset.
Sites that want the current look add params.ui.preset: slate; the upgrade
note leads with this one line. Slate output must equal v1.1 tokens.
Sites with custom brand overrides in their own styles (_styles_project.scss
up to 1.5.1, assets/css/project.css after it): light overrides
on :root keep working under Paper by source order; dark overrides on
[data-bs-theme='dark'] are outranked by Paper’s dark block. Such sites
should choose Slate or move overrides to [data-td-preset='paper'][data-bs-theme='dark'].
The upgrade note and brand guide document this.
theme_color, typography, and fonts keep their meaning and precedence.
Sites with dark_mode: false still get one light palette, now Paper.
The release that changes the default must state it as a visible change.
Whether that release is a minor (1.x) or major version is an open decision.
A consumer inventory should report sites with brand overrides before the
default change is published.
Implementation plan
Phase 1, in dependency order. Each step names its owning checker.
Tokenize Slate leaks. Landing primary button, grid, glow, scrims, print
colours, asciinema surfaces; add --td-preset-accent, brand font role,
and per-preset canvas luminance in contrast-on-canvas.html. Slate output
must stay byte-for-byte equivalent in computed colour.
Checkers: check-landing.py, check-output.py, check-font-tokens.py.
Vendor IBM Plex Sans.third_party/, VENDOR.json, licence file.
Checker: check-vendor.py.
Preset tokens. New assets/scss/td/_presets.scss (imported after
_brand.scss); the implementation keeps Paper in that file instead of a
separate presets/_paper.scss. After v1.5.1 the file is the plain CSS layer
assets/css/td/presets.css, listed after brand.css. Place preset font roles before the system
typography reset. Checkers: extend check-font-tokens.py (Plex Sans family,
system block order, token parity between light and dark blocks).
Configuration.hugo.yaml defaults (preset: paper,
preset_menu: false); a resolver partial used by validate.html,
document-attrs.html, layouts/404.html, and head.html (init script,
theme-color, pre-paint canvas). Regenerate the schema. Checkers:
check-params.py (accepted, invalid, reserved), generate-config-schema.py --check,
check-namespace.py.
Appearance menu. Shared partial used by navbar.html,
shell/footer-line.html, and the Landing mobile drawer; preset.js runtime
(or a section of dark-mode.js); dark-mode.js radio sync; palette action
switch_preset; i18n strings in all 32 catalogs. Checkers: check-shell.py,
check-actions.py, i18n checker, tests/js/preset.test.js,
tests/js/dark-mode.test.js.
Third-party surfaces. Per-preset giscus stylesheets and re-post.
Documentation. EN/ZH architecture, shell and landing contracts; brand
guide (presets, migration, fonts); configuration reference; changelog and
upgrade note.
Site validation.make -C ../oink.pgsty.com check, browser (add
preset switching, persistence, storage failure, no-JS, EN/ZH,
desktop/mobile, light/dark cases), and dev for visual review.
Acceptance criteria
The following are the original acceptance targets. Executed checks and remaining
limits are recorded separately in the October 5 acceptance record:
With no preset key, output carries data-td-preset="paper" and renders
Paper with JavaScript disabled.
preset: slate produces computed colours and font roles equal to v1.1
across the checker fixtures.
Switching style never changes td-color-theme; switching mode never changes
td-preset; both survive navigation, reload, and language switch.
Invalid stored values are removed; storage failure leaves the page usable
and shows the non-persistence note.
No first-paint flash between presets in Chromium, Firefox and WebKit at
normal and throttled CPU.
Scroll position after a switch stays within one line of the anchor.
typography: system triggers no font request in any preset;
params.ui.fonts overrides preset faces.
theme_color overrides the accent in both modes under Paper and Slate.
The menu is fully operable with keyboard, touch, and screen readers; axe
reports no new violations.
All palettes meet the contrast table in both modes.
Presets add no external font or script dependency; explicitly configured
services such as Giscus remain separate.
Open decisions
Resolved for phase 1: preset_menu: false; the docs site enables it.
Target resolved for release preparation: 1.2.0, with a prominent Paper-default notice and the preset: slate compatibility setting. Published in 1.2.0.
Resolved for phase 1: the wordmark role is brand.
Whether a display-only serif becomes a Paper option after phase 1.
Whether charts (Mermaid, ECharts) should take preset colours in phase 2.
Ink and Terminal backlog
Implemented experimentally: both palettes, existing font roles, prose link and
selection signals, heading treatments, scoped geometry, compact Terminal
navigation, Giscus palettes, print and the existing switching mechanism. No new
font file, animation or runtime is added. See the
experiment record
for actual output and verification.
Before stable promotion, review long-page red accent density and CJK underline
weight in Ink; numbered headings, mono wrapping and dense parameter tables in
Terminal; Windows/Android fallback faces and manual screen-reader speech.
Mermaid/ECharts and API vendors remain mode-only for this experiment. Wider
geometry/density tokens and preset-colored charts require a separate decision.
Decision log
Date
Change
2026-10-04
Draft created with Paper/Slate phase-1 scope, Ink/Terminal research specs, Appearance menu choice, and token architecture
2026-10-05
Phase 1 implemented locally; defaults, brand role and mode-only chart scope accepted
2026-10-05
Subsequent explicit Ink/Terminal experiments implemented; stable menu policy retained; design acceptance remains open
2026-10-05
Release preparation targets 1.2.0; simplified Style/Light controls and current-state icons replace the earlier swatch proposal
7.9.16 - Stabilizing Ink and Terminal for reading
A conditional stabilization plan for two distinct reading styles, with a shared footer blocker and explicit bilingual accessibility gates.
Draft — dated October 26 snapshot; superseded in typography by v1.7.0
Enlarged text overflows the shared footer in the October 26 probe: at 320px with a 32px root/default font, English Ink reached 424px document width and Terminal 408px. OINK v1.7.0 later revised the typography of Ink (system serif / Song prose) and Terminal (all-mono screen, IBM Plex Sans print) — see the architecture contract and accepted decision for current behavior. Neither preset is yet promoted from explicit opt-in to the default pair.
Status, ownership and scope
Status and date: Draft, 2026-10-26; proposed design direction, not an implementation contract
Accountable owner: OINK maintainers; separate recorded acceptance for each preset
Delivery owners: Theme maintainers own CSS, resolvers and focused checkers; documentation maintainers own bilingual contracts, real-site fixtures and browser review; accessibility reviewers own manual task evidence
Baseline: OINK v1.4.0; local source identity and dirty-snapshot limits are recorded in the research
Release intent: A later release, subject to refinement and independent acceptance; no new preset recommended
Context and evidence
Ink and Terminal already exist as explicit experiments. Their shared shell is an advantage: readers retain navigation, search, appearance controls and content semantics when changing style. Their remaining problems are repeated decoration, typography outside ordinary prose, inconsistent owned geometry, and incomplete acceptance. Ink is already neutral sans editorial; making it serif would consume Folio’s separate territory. Terminal should become a readable engineering handbook, retaining mono technical roles alongside proportional explanations.
The dated research distinguishes source facts, measurements, design judgments and a limited CSS overlay. Normal-size measurements, spacing probes and focused checks are encouraging, but the whole-document footer failure survives them. Manual 200% text-resize and 400% browser-zoom checks remain separate from the 32px font-preference probe.
Goals and explicit exclusions
Preset
Audience and primary task
Distinct identity within the same shell
Paper
Broad documentation readers; guides and sustained reading
Warm Plex Sans reading surfaces and restrained rounded components; remains the default
Slate
Existing technical/product sites; reference navigation and product presentation
Established cool palette, Inter/Chakra/Plex roles and richer Landing presentation; compatibility choice
Ink
Editors, authors and readers of essays, design rationale and long documentation
Neutral Inter/CJK sans, square flat surfaces, visible prose underlines and sparse red or authored accents
Terminal
Engineers and operators; procedures, configuration lookup and code explanation
Plex Sans explanations, mono headings/controls/identifiers, teal/mint links, amber emphasis and flat 2px geometry
Both candidates must work across Docs, Book, Blog, galleries, Expo and Landing in EN/ZH, light/dark and narrow/wide views. Neither is a separate shell, accessibility mode or table-density mode. Exclude new renderers, global spacing changes, font downloads, runtime dependencies, terminal effects, moving selection tracks, raised Tabs, boxed Field names and Paper heading tails.
Two optional concepts remain outside 1.4 scope:
Concept
Distinct future purpose
Cost and disposition
Folio
Academic/book publishing: serif reading roles and scholarly captions/notes, sans navigation/search, mono code
Requires a matched EN/ZH serif strategy, licensing, local font payload and fallback/print/device acceptance. Keep the shared shell; no imported margin-note column. Credible future study, not an Ink replacement.
Canvas
Playful geometric presentation for creators: existing sans faces, controlled lilac/ochre accents and a few geometric markers
No inherent font cost, but added palette/state/shape rules, asset guidance, menu and full regression coverage. Evidence is weaker and overlap with Slate is substantial. Defer until creator tasks justify it.
Proposed behavior and boundaries
Preserve the palette, assign each role
Retain these source colors initially. Values below are light/dark pairs, not a new configuration authority; the preset stylesheet remains the implementation owner: _experimental-presets.scss in v1.4.0, and assets/css/td/experimental-presets.css after v1.5.1. Refine repetition before changing hue.
Role
Ink light / dark
Terminal light / dark
Canvas
#ffffff / #0b0b0b
#f4f5f2 / #0c0f0e
Body
#141414 / #ededed
#1d211f / #d3dbd6
Emphasis
#000000 / #ffffff
#111713 / #edf4ef
Secondary text
#474747 / #b5b5b5
#4a514d / #9aa59f
Tertiary text
#636363 / #8f8f8f
#606b63 / #8b9990
Secondary surface / code header
#f4f4f4 / #161616
#e9ebe6 / #141a18
Tertiary surface
#ffffff / #161616
#f8f9f6 / #18201c
Code block
#fafafa / #111111
#ffffff / #0a0d0b
Link
#141414 / #ededed
#0a6560 / #4cc9bd
Hover link
#c8102e / #ff5c4d
#084f4b / #7de0d7
Default accent
#c8102e / #ff5c4d
#935400 / #f0a73a
On-link foreground
#ffffff / #0b0b0b
#ffffff / #0c0f0e
Ordinary border
Body RGB at 24% / 24%
Body RGB at 32% / 32%
Strong line
Body RGB at 55% / 50%
Body RGB at 55% / 55%
Inline code
Body foreground; body RGB fill 5% / 6%
Body foreground; body RGB fill 5% / 7%
Success, warning, error and information retain their semantic tones, icons and labels. Red is not every Ink status; mint is not every Terminal status. Keep neutral badges distinguishable from success. Decorative separators may remain subtle; required control boundaries need independent contrast measurements.
Authored theme_color remains authoritative for accent surfaces. Actual documentation uses blue #245f94/#5da2dd, Book orange #9a3412/#fb923c, and Blog violet #6d28d9/#a78bfa. These do not replace the link/code text roles. Review both authored accents and preset defaults.
Keep reading roles and verify actual fallback
Role
Ink default
Terminal default
body
Inter + platform sans
IBM Plex Sans + platform sans
ui
Inter + platform sans
Code role: IBM Plex Mono + mono fallbacks
heading
Body role
UI role
code
IBM Plex Mono + mono fallbacks
IBM Plex Mono + mono fallbacks
display
Heading role
Heading role
meta
UI role
UI role
brand
UI role
UI role
print
Body role
Body role
Book captions, table descriptions and human-readable search titles/excerpts use the body role. Authored chapter numbers retain their meaning and follow their heading’s role. Technical paths, command controls and identifiers remain mono in Terminal. Field names stay unboxed, at weight 600. Descriptive Terminal table headers move to body 0.875rem/600; ordinary prose retains 1rem/1.7 and the shared reading measure. Display titles retain page-specific scale and wrap; do not shrink mobile prose to accommodate mono chrome.
The existing sans fallback order is -apple-system, BlinkMacSystemFont, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans SC, generic sans-serif and emoji. The mono list follows IBM Plex Mono with SFMono-Regular, Cascadia Code, Roboto Mono, Menlo, Consolas, Liberation Mono, Sarasa Mono SC, Noto Sans Mono CJK SC and generic monospace. Listed names do not install fonts. YaHei precedes Segoe and can supply Latin too. Chinese glyphs need not occupy Latin mono cells. Preserve language metadata, typography: system, explicit roles and, in releases up to 1.5.1, legacy Sass precedence; inspect loaded, blocked, system and overridden font conditions on actual Windows/Android. (Font matching)
Establish hierarchy and language-sensitive links
Compare Ink article h1 at weight 750/tracking -.025em, h2/h3 at 700/-.012em, and a 1px strong-token top rule instead of the current heavier rule. Chinese headings use zero tracking. Remove enforced uppercase/tracking from minor headings, table headings and callout titles. Terminal headings use 600/zero tracking; remove generated ##/### and callout brackets while preserving authored Book numbers, semantic labels and heading anchors. No fake prompts, blinking cursor effects or decorative heading tails.
Ink prose links remain natively underlined at rest, including lists, notes and citations. Terminal retains a persistent non-color link distinction; verify its existing semibold cue in real prose and use native underlines where that cue is insufficient. Navigation relies on its location and persistent current-state marks. Hover must not change layout, weight or hit area. (GOV.UK links)
Underline geometry remains a review decision. The overlay uses max(1px, .06em) thickness, .22em offset, with a Chinese .25em/skip-ink: none comparison. A blanket .25em rule is not accepted. Compare English .12–.18em and Chinese text-underline-position: under with only 0–.06em extra offset, starting with skip-ink: auto. Scope by actual language, including Chinese blocks inside English pages. Test mixed glyphs, punctuation, descenders, inline code and wrapped links; no line may collide with glyphs or adjacent lines. (CSS Text Decoration draft)
Make component states coherent
Owned component corner radii: Ink 0px, Terminal 2px, no elevation shadows; include FileTree’s currently hard-coded 0.6rem corner radius. Preserve image, avatar, status-dot and vendor geometry.
Current/selected: Ink keeps a static accent rail; Terminal keeps neutral inverse rows/marker. Programmatic state remains. Hover, selection and keyboard focus stay distinct; no traveling pill.
Focus: Immediate static indicator, independently measured on every adjacent surface, visible in forced colors; no global outline reset.
Text selection: Start from current authored-accent fill at 22% light/35% dark; measure composited text/inline-code pairs. Change through the owning role if needed; do not assume the opacity passes.
Tabs: Flat labels, static bottom selection rule, separate focus; no raised active tab. Preserve keyboard, hash/storage behavior, long labels and touch hit areas.
Fields and inputs: Unboxed technical Field names; descriptions remain prose. Actual input controls retain persistent labels, identifiable boundaries and associated error text; placeholder alone is insufficient.
Code and tables: Quiet single frame; preserve syntax semantics, comments, copying, captions, header associations and numeric alignment. Descriptive headers can wrap; no whole-table uppercase. Preserve authored width/overflow policy and local scroll access.
Notes, quotes, footnotes: Keep essential text visible; restrained semantic marker/rule, close attribution and usable reference/backlinks. No oversized quote ornaments, blanket Chinese italics or added margin column.
Cards, steps, badges, disclosures: Stable labels and geometry; distinguish clickable from static content, keep real step numbers, native disclosure semantics and labeled states.
Search and appearance: Body-role result titles/excerpts, mono technical paths; readable matching/selected/muted text. Preserve dialog focus/return, IME editing, loading/error/no-results feedback and reachability with a mobile keyboard.
Landing, Blog/gallery, Book, Expo: Preserve existing composition and media behavior; fit display titles, captions, bylines and utilities into each reading task. Do not turn image surfaces into squared global resets.
Preserve output, vendor and security boundaries
Mermaid/ECharts remain mode-only; API widgets retain vendor palettes and their existing mode behavior. Do not add preset recoloring inside vendor DOM. Giscus automatic palettes follow preset and mode; explicit overrides remain authoritative, but blocked remote frames are not accepted by this review. Print keeps the light preset on white paper; no-JavaScript output keeps the site-default light palette and readable content. Markdown/RSS preserve semantic content without decorative prefixes or control leakage. Keep existing escaping, validated font/color inputs, local assets and appearance storage behavior; no new network permission or script dependency.
Compatibility and migration
Keep preset names, independent mode/style state, shell columns, breakpoints, content syntax and author overrides. Retain Paper as default and maintained consumers’ explicit [paper, slate, ink, terminal] menu. A refinement can ship while a preset remains experimental.
Promotion changes the meaning of preset_menu: true: it offers stable presets plus the site default, so promoting either experiment expands that automatic set. Make that change explicit in layouts/_partials/preset-config.html, its checker and bilingual configuration/release guidance. Explicit lists retain their chosen membership. Promotion requires per-preset maintainer acceptance, not a status-label edit. Preserve reserved Folio/Canvas warning/fallback behavior.
Implementation and owning-checker plan
Stage / owner
Work and evidence
Shared repair / shell maintainer
Fix footer shrink/wrap behavior at its owner; add whole-document scroll-width and visible-content assertions through the footer for all four presets. Avoid clipping or hiding overflow as a remedy.
Refinement / theme maintainer
Implement reviewed changes in existing preset, typography and component owners. Start with bin/check-presets.py, bin/check-font-tokens.py and affected component/output checks; preserve frozen Slate.
Integration / documentation maintainer
Extend appearance, font, component and text-reflow suites on real EN/ZH pages; include full-page checks and annotated visual review. Run sibling-source make check, make browser, and make dev review.
Promotion / maintainers and reviewers
Close the gates below; update owning implementation/checker and affected EN/ZH contracts together, then record durable rationale and user-facing migration guidance.
Distinguish accessibility requirements from project targets
WCAG 2.2 A/AA is the baseline (references accessed on 2026-10-26).
Gate
Required assessment
Text and controls
Normal text 4.5:1; qualifying large text 3:1 (24px regular or 18⅔px bold, equivalent CJK sizing). Required control/state cues 3:1 against adjacent colors; decorative dividers are different. Include code comments, placeholders and every selected/hover state. (1.4.3, 1.4.11)
Reflow and resizing
Independently test 320 CSS px reflow, manual 200% text enlargement and 400% browser zoom from a 1280px viewport. Necessary two-dimensional regions require individual justification; code/tables are not blanket exemptions. Also close the separate 320px/32px-font stress blocker. (1.4.10, 1.4.4)
Spacing
Tolerate simultaneous line-height 1.5, paragraph-after spacing 2em, letter spacing .12em and word spacing .16em without loss. These are user overrides, not default typography; assess applicable Chinese/mixed-script properties. (1.4.12)
Keyboard and meaning
Visible focus; focused controls not entirely obscured by authored content; non-color state cues; correct language, headings, labels and table relationships. Character shortcuts need disable/remap/focus-only handling, not merely suppression in text inputs. Announce applicable search statuses without moving focus. (2.4.11, 2.1.4, 4.1.3)
Target minimum
AA uses 24×24 CSS px or a qualifying exception. For its spacing exception, a 24px-diameter circle centered on each undersized target must intersect neither another target nor another undersized target’s circle; inline, equivalent, user-agent and essential exceptions also exist. (2.5.8)
Proposed stronger targets
Routine touch controls 44×44px; main text 7:1; whole focused control/ring visible; static indicator at least a 2px-perimeter area with 3:1 change at the same pixels, plus adjacent-color contrast. These go beyond AA and need explicit adoption; they do not imply whole-page AAA. (2.5.5, 1.4.6, 2.4.13)
Record complete tasks before promotion
Require both languages and modes at 320/390/768/1440px, with normal, enlarged and overridden text. Review long pages at top/middle/footer, heading/Book numbering, URLs, Fields, tables, code, search, appearance, media and Landing. Inspect rest/hover/current/selected/focus/text-selection, forced colors, reduced motion and no-JavaScript/print/Markdown/RSS. Record actual color pairs and human review of axe incompletes.
Actual Windows Chrome/Edge and Android Chrome font/rendering work remains pending, as do branded macOS/iOS Safari checks. Record device/OS/browser/font conditions. Pending manual tasks use NVDA on Windows, VoiceOver with actual Safari, and TalkBack on Android: traverse headings and meaningful numbers, read tables/field errors, search with Chinese input, hear concise status feedback, open/close dialogs and regain focus.
Open decisions are the Chinese underline treatment, stronger project targets, any state-specific color repair, and the promotion of each preset. If gates remain incomplete, retain experimental status or defer refinement; unrelated 1.4 work need not wait for new styles.
Decision log
Date
Proposed decision and status
2026-10-26
Keep Ink neutral sans editorial and Terminal a readable engineering handbook; preserve current palettes and author accents. Direction recommended; no stability acceptance.
2026-10-26
Prioritize shared enlarged-font footer repair; keep flat Tabs, unboxed Fields and no Paper tails. Remove decorative Terminal punctuation through existing owners.
2026-10-26
Chinese underline alternatives and stronger accessibility targets remain review decisions; exploratory probes do not close promotion gates.
2026-10-26
No new preset for 1.4; Folio/Canvas remain distinct future concepts. Per-preset promotion and automatic-menu expansion require explicit acceptance.
7.9.17 - Ink and News: the written page and the printed page
A partly implemented proposal that makes Ink the written style and News the printed style, with font coverage, light and dark palettes, detail specifications and acceptance gates.
Status and date: drafted 2026-11-28 and partly implemented in OINK v1.8.0
Owner: OINK maintainer
Baseline: OINK v1.7.0 plus the v1.8.0 preset pass: newsprint is renamed
news; the menu puts Paper, Slate and GitHub above Ink, News and Terminal; dark Terminal
becomes a phosphor screen; Ink takes Kai headings, Song text and Palatino for Latin. The
visual presets decision records these changes.
Release intent: OINK v1.8.0; both presets stay explicitly selected
Context and evidence
Four of the six presets have settled roles. Paper is the default warm paper surface, Slate is
the technical look OINK has had since 1.1, GitHub reproduces how GitHub renders a README, and
Terminal is a terminal: an engineering handbook in light mode and a phosphor screen in dark
mode. The remaining two, Ink and News, both draw on paper and serif type, and they blur
together.
Ink in 1.7.0 is a sans-serif editorial style: white ground, black text, a red accent. It
reads like Hextra and other modern documentation themes, and it is hard to tell apart from
Paper and GitHub. The working-tree draft turns it into brush writing.
News is the ivory Paper of 1.7.0, after Typora’s Newsprint theme. Its serif text, Song,
Kai quotations and ivory sheet overlap heavily with a brush-written Ink. The draft dark News
is an evening paper by candlelight: a warm brown ground, parchment-colored text and gold
links, which uses the parchment and gold that Ink wants.
This proposal draws one line between them: Ink is written, News is printed.
Font coverage
The theme ships no font files and can only name fonts the reader already has. What each
platform preinstalls decides how many readers see the design as drawn. The table follows the
official font lists of Microsoft, Apple, AOSP, Ubuntu and Fedora as of 2026-11-28. “With
Chinese” means the Chinese (Simplified) Supplemental Fonts that Windows installs when Chinese
is added; “on demand” means a download, which macOS may make by itself when the system
language is Chinese, though Apple does not document it.
Font class
Windows, Chinese
Windows, English
macOS
iOS / iPadOS
Android
Linux desktop
Hei (sans)
Microsoft YaHei
Microsoft YaHei
Hiragino Sans GB, STHeiti (PingFang on demand since macOS 15)
PingFang (on demand)
Noto Sans CJK
Noto Sans CJK
Song (serif)
SimSun
SimSun
Songti SC (preinstalled)
Songti SC (on demand)
Noto Serif CJK, only as the serif fallback
Noto Serif CJK
Fangsong
FangSong
none (with Chinese)
STFangsong (on demand)
on demand
none
none
Kai
KaiTi
none (with Chinese)
Kaiti SC (on demand)
on demand
none
AR PL UKai on Ubuntu installed in Chinese
Palatino
Palatino Linotype
Palatino Linotype
Palatino
Palatino
none
URW P052
Calligraphic
Gabriola, Segoe Script
same
Apple Chancery, Zapfino, Snell Roundhand
Zapfino, Snell Roundhand (Apple Chancery on demand)
Dancing Script, only as cursive
URW Z003
Newspaper serif
Times New Roman, Georgia
same
Times New Roman, Georgia, Charter, Didot
Times New Roman, Georgia, Charter, Didot
Noto Serif
Liberation Serif
Three conclusions follow:
No Chinese face exists on every platform. By class, only Hei is everywhere; Song is
nearly everywhere except iOS, where Chinese serif text probably falls back to PingFang;
that is unverified.
Fangsong and Kai have identical reach. Chinese Windows has both, macOS readers must
download them, and phones and most Linux systems have neither. “Fangsong first, Song as the
fallback” therefore works, but only readers on Chinese Windows or a Mac with the font
downloaded see Fangsong. Everyone else sees Song.
Lookup by name and local() give different results. On 2026-11-28, on a Mac where Kai
had been downloaded, WebKit did not match font-family: "Kaiti SC" while Chromium did.
Through an @font-face alias with local("Kaiti SC"), both engines matched it. The
theme’s OINK Kai already uses an alias; Fangsong should do the same.
Goals and non-goals
Goals
Ink and News are distinguishable at a glance in light and dark mode, on Chinese and Latin
pages.
Each has its own dark mode. Dark mode changes colors and a few details, never fonts.
The six dark modes do not collide: Slate and GitHub already hold blue-black, Paper holds warm
grey, and Terminal holds phosphor green.
When Kai and Fangsong are missing, the two presets stay distinguishable; the style must not
rest on fonts alone.
Non-goals
No font files, image assets or runtime scripts.
No vertical text, ink-wash backgrounds, cloud ornaments, images of brush lettering or seal
images.
No changes to Paper, Slate, GitHub or Terminal.
No configuration renames: ink and news stay as they are.
The dividing line
Aspect
Ink · written
News · printed
Metaphor
A scroll written by one hand: xuan paper or parchment
A page set in columns by machine: newsprint and press ink
Rhythm
Open: one column, a deep top margin
Dense: masthead, kicker, deck, column rules
Hierarchy by
Changing the letterform: Kai, italic, a red initial; no bold
Changing weight: heavy headlines, light decks, thick-and-thin rules
Chinese
Kai headings, Fangsong text (Song when missing), red emphasis dots
Bold Song headlines (heavy Hei on Windows), Song text, bold emphasis
Latin
Palatino text and italic headings; calligraphic faces only for titles, initials and the wordmark
Charter / Georgia text, Times New Roman Bold headlines, a Didot masthead
Color
Paper with two inks: black and vermilion
Grey newsprint, press black and one spot blue
Where the reader is
A vermilion dot
A black column rule and bold
Dark mode
Gold on indigo paper
Darkroom
When Kai and Fangsong are both missing, Ink’s Chinese falls back to Song, the same class
News uses. Four differences remain: Ink headings stay at regular weight with open spacing
while News headlines take the heaviest weight with tight spacing; Ink marks emphasis with
vermilion dots while News uses bold; Ink has a paper color with a radial shade while News is
flat grey newsprint; Ink has no rules while News has them everywhere.
Ink: the written page
Type
Role
Chinese
Latin
Note
Display (page title, Landing hero)
OINK Kai
Apple Chancery → Gabriola → URW Z003 → Palatino Italic
Calligraphic faces at large sizes only; never the generic cursive, which Chrome on Windows resolves to Comic Sans
Headings (h2–h4)
OINK Kai
Palatino Italic
Zapf drew this italic from Renaissance chancery hands
Add an OINK Fangsong alias. It follows OINK Kai: local() names STFangsong, then
Windows FangSong; unicode-range covers only Han and full-width punctuation; and
size-adjust: 108% makes up for Fangsong’s light, small design. Both Fangsong faces have only
a regular weight, so emphasis does not use bold (see the emphasis dots below).
Kai headings stay at regular weight. Only macOS Kaiti SC has a true bold; Windows KaiTi
does not, and synthesized bold looks poor. Headings rank by size and space.
No Papyrus. It is the best-known overused “ancient” typeface, and Windows, Android and
Linux do not have it. For a rougher look, Luminari and Trattatello on macOS can serve as
display alternatives, outside the default stack.
Color
The light palette, “xuan paper and vermilion”, uses a manuscript’s two inks: black for writing
and vermilion for marking.
Token
Value
Contrast on the darkest edge #e8dabd
Paper (canvas)
#f3ead7
—
Paper edge (end of the radial shade)
#e8dabd
—
Code ground
#e9dcc1
—
Ink (text)
#241a10
12.35:1
Light ink (secondary)
#574634
6.52:1
Pale ink (tertiary)
#6e5c47
4.63:1
Vermilion (accent)
#a8321b
4.84:1
Seal (wordmark ground)
#b8371d, paper-colored text
4.88:1
Links keep the text ink with a vermilion underline and turn vermilion on hover.
Details
Vermilion dot: the current navigation item gets a vermilion dot instead of a tinted row.
Emphasis dots: Chinese strong is not bold. It takes text-emphasis: filled dot in
vermilion under each character, the traditional Chinese mark of emphasis, scoped to
:lang(zh). The cost is that Latin letters inside the same strong get dots too.
Initial: the first letter of the first paragraph is set three lines tall in a
calligraphic face and vermilion, in Blog and Book text only, not Docs. Its float uses logical
properties, so RTL pages mirror it.
Seal: the wordmark may sit in a vermilion box like a seal impression. This is the detail
most likely to look kitsch; whether it is on by default is open.
Paper: a radial shade lies over the canvas, paper-colored at the center and slightly
darker at the edges. No noise image; print drops it.
Top margin: more space above the page title.
Red stays small: dots, emphasis marks, the initial, the seal and underlines. Headings are
never red; Fangsong text under a red title reads as a Chinese government circular.
The brush details already in the working-tree draft (a tapered stroke opening each section, a
short dash for hr, quotations hung on a fading vermilion stroke) fit this direction and can
stay.
Dark: gold on indigo paper
This palette follows sutras written in gold and silver on deep indigo-violet paper. East Asia
wrote sutras in gold on indigo paper and Europe wrote gold on purple parchment, two traditions
that arrived at the same practice, so the palette suits Chinese and Latin pages alike.
Token
Value
Contrast on the darkest edge #120f22
Indigo paper (canvas)
#1b1730
—
Paper edge
#120f22
—
Code ground
#241f3d
—
Silver (text)
#e3ddd0
13.89:1
Gold (headings and accent)
#dcb766
9.85:1
Secondary
#b4ad9f
8.43:1
Tertiary
#958e82
5.79:1
Seal, lifted
#e06a4c, text in the paper color
5.23:1
The initial, emphasis dots and the current-position dot turn gold. The seal stays red, as
collectors’ seals on such sutras are.
The draft dark Ink is a stone rubbing: a blue-black ground, paper-colored text and a vermilion
seal. It ties more directly to calligraphy, since calligraphers learn from rubbings, but its
palette is close to a generic dark theme and hard to tell from Paper’s warm grey dark
(#161513). This proposal recommends gold on indigo and keeps the rubbing as the alternative.
News: the printed page
Type
Role
Chinese
Latin
Note
Masthead (wordmark)
Bold Song
Didot → Bodoni 72 → Times New Roman
Only macOS has Didot
Headlines
Songti SC Black / Bold → Microsoft YaHei Bold
Times New Roman Bold
Times was drawn for The Times
Text
Song
Charter → Iowan Old Style → Georgia → Cambria
The current stack
Kicker, byline, table heads, interface
Platform Hei
Platform sans, uppercase and spaced
Papers set section labels and datelines in a sans
Quotation
OINK Kai
Serif italic
As today
The deck (the page description) is italic in Latin. Han has no true italic, so a Chinese deck
stays upright.
Color
The light palette, “newsprint”, is grey newsprint, press black and a single spot color.
Token
Value
Contrast on the code ground #e6e3da
Newsprint (canvas)
#f0eee8
—
Code ground
#e6e3da
—
Press black (text)
#161616
14.10:1
Secondary
#4a4844
7.11:1
Tertiary
#625f59
4.96:1
Spot blue (links and accent)
#1f4f7a
6.66:1
The current clay accent (#9b4a28) and Ink’s vermilion are both red-brown and hard to tell
apart side by side, so News moves to a single spot blue. The newsprint is greyer and darker
than Paper’s #f7f6f3, and further from Ink’s yellower paper.
Details
Masthead: a double rule under the site header. The specimen’s date and edition between
the lines would need new markup and are not implemented.
Kicker, deck and byline: the section name as a kicker above the headline in spot color
and capitals; the page description as a deck below it; the byline and date between two thin
rules. The current markup has the deck (.lead) and the date line (.td-article-info) but
no kicker, which would need new markup and is not implemented.
Thick-and-thin rule: a heavy rule over a thin rule above each h2, in place of Ink’s brush
stroke.
Pull quote: a heavy rule above and a thin rule below, a step larger, with no left bar.
Quotations in documentation often run to several paragraphs, and centering would hurt
them, so they keep their start alignment.
Column rules: Blog lists and section indexes set in columns with column-rule on wide
screens. Article text stays in one column, because code blocks do not survive columns. Blog
lists switch between cards, a table and a gallery at runtime, so columns are not
implemented.
Tables: a press-black rule above and below, tabular figures, uppercase heads.
Where the reader is: a black column rule and bold on the current navigation item, with no
color.
No drop cap: the initial belongs to Ink.
Dark: the darkroom
The darkroom where a newspaper developed its photographs: true black, the grey of silver
prints and the orange of the safelight.
Token
Value
Contrast on the code ground #1a1a1a
Ground
#0f0f0f
—
Code ground
#1a1a1a
—
Silver (text)
#d8d6d1
11.98:1
Headlines
#f3f1ec
15.42:1
Secondary
#a4a19a
6.75:1
Tertiary
#8a877f
4.85:1
Safelight orange (links and accent)
#f2804a
6.60:1
A faint orange radial glow (7% opacity) sits in the top corner, on screen only. Safelight
orange sits about 20° redder than Ink’s dark gold and is more saturated, so the two stay
distinct side by side.
The draft evening paper by candlelight uses a warm brown ground, parchment text and gold
links, and parchment and gold belong to Ink in this proposal. Its warm brown is also close to
Paper’s dark ground. This proposal recommends the darkroom. If a monochrome mood is preferred,
microfilm is the alternative: a neutral black ground, silver-grey text and the spot blue lifted
for links.
The six dark modes
Preset
Canvas
Text
Accent
Image
Paper
#161513
#ece9e3
#7db5e6
Warm grey
Slate
#0b1119
#e8eef6
#5da2dd
Cool blue-black
GitHub
#0d1117
#f0f6fc
#4493f8
Primer dark
Ink (proposed)
#1b1730
#e3ddd0
#dcb766
Gold on indigo paper
News (proposed)
#0f0f0f
#d8d6d1
#f2804a
Darkroom
Terminal
#020703
#7ee89a
#3dff7a
Phosphor screen
Other scripts
Ink’s principle of writing applies to every script: the display and heading roles use an
installed face from that script’s calligraphic or handwritten tradition, and the text uses
the script’s book face. Where no such face exists, the book face is enough. Japanese and Korean
would need their own :lang(ja) and :lang(ko) stacks, or Han characters take Chinese forms.
Preset font roles may only sit on the bare root selector, so that typography: system and
params.ui.fonts still override them, so those stacks are not implemented and Japanese and
Korean keep the theme’s existing handling. The Arabic and Hebrew calligraphic faces join the
heading stacks by glyph fallback, which gives Persian Thuluth rather than Nastaliq.
Script
Display and headings
Text
Japanese
Kyokasho (Windows UD Digi Kyokasho; macOS on demand)
Mincho
Korean
Gungsuh (Windows; macOS on demand)
Myeongjo / Batang
Arabic
Thuluth (macOS Diwan Thuluth)
Naskh
Persian
Nastaliq (Noto Nastaliq Urdu, preinstalled on macOS)
Naskh
Hebrew
Corsiva Hebrew (macOS)
System Hebrew serif
Cyrillic
Palatino Italic (the calligraphic faces lack Cyrillic)
Palatino
Devanagari, Bengali
No suitable calligraphic face; the text face
System face
News needs no per-script rules: each script uses its book serif and bold headlines.
Output, accessibility and security
Contrast: every text color is checked against the darkest point of the canvas, the end
of the radial shade, not the paper color at the center. check-presets.py must include that
end color in its AA checks.
Print: the paper shade, glow, initial color and seal are dropped; print keeps each
preset’s existing print palette.
Forced colors: shades, emphasis-mark color and rule color yield to system colors; the
emphasis marks themselves stay.
RTL: the initial’s float and the navigation dot use logical properties.
Markdown, LLMS and RSS: unaffected; they carry no preset styling.
Network and assets: no font files, images or external requests; local() aliases take
effect only where the reader has the font.
Compatibility and migration
ink shipped in 1.7.0. Sites that set preset: ink or list ink in the menu will see a
clear change. It is an explicitly selected experiment, so this is acceptable, but
CHANGELOG.md must say so.
news has not shipped, so changing it has no compatibility cost.
The reserved name folio was held for a serif book style, which overlaps Ink and News as
proposed here. Whether to keep the reservation is the maintainer’s decision.
Both presets’ giscus palettes (giscus-ink-*.css, giscus-news-*.css) change with their
palettes.
Implementation and checker plan
Add the OINK Fangsong alias in brand.css, and rewrite Ink’s and News’s font roles in
tokens-typography.css as tabled above.
Rewrite Ink’s and News’s light and dark palettes and details in
experimental-presets.css; update canvases and inks in preset-canvases.html to match.
Drop the paper effects in print.css.
Update the four giscus palettes.
Add the shade-end AA check and token parity for the new palettes to check-presets.py.
Review Ink and News on the documentation site in English and Chinese, desktop and phone,
light and dark, including the fallback on Windows without Kai or Fangsong.
Acceptance criteria
With screenshots of all six presets side by side in the same mode, a reviewer can tell each
one apart without reading a label.
Where Kai and Fangsong are absent (iOS, English Windows), Ink’s and News’s Chinese pages are
still distinguishable.
Every text color meets WCAG AA at the darkest point of the canvas; body text reaches 4.5:1.
Print preview shows no shade, glow or seal.
check-presets.py and check-stylesheets.py pass, and the site’s make check and
make browser pass.
Implementation record
On 2026-11-28 the theme was changed to this proposal, settling the open questions as it
leaned: Fangsong text; the seal on by default, on the site header’s text wordmark only (the
sidebar brand of the Docs, Book and Blog shells is untouched); the initial in Blog and Book
only; gold on indigo paper and the darkroom for the dark modes; News without clay. Where the
implementation departs from the design:
The display stack adds URW Z003 for Linux.
Per-language Japanese and Korean stacks, News’s kicker, the date and edition inside the
masthead rule, and Blog list columns are not implemented, for the reasons given above.
Pull quotes keep their start alignment instead of centering.
The menu icons take each preset’s accent: Ink vermilion, gold in dark; News spot blue,
safelight orange in dark.
A calibration after the maintainer’s review the same night dropped Ink’s calligraphic
display faces and seal: Latin is Palatino everywhere and Han takes Kai in headings and the
interface. News sets its interface, menus and lists in its text serif and squares its
interface parts. The display-face table and the seal detail above no longer apply.
The theme’s check-presets.py, check-font-tokens.py, check-stylesheets.py,
check-goldens.py and other checkers pass. The documentation site build failed at the time
on a parallel change to the Social component, so the site checks run once that change lands.
Open questions
Does folio stay reserved?
Decision log
Date
Change
2026-11-28
Drafted. Separates Ink and News as the written and the printed page; proposes Fangsong text and calligraphic display faces for Ink, and the gold-on-indigo and darkroom dark modes. The design specimen was made outside the repository and is not part of the site
2026-11-28
Font coverage corrected against the official font lists of Microsoft, Apple, AOSP, Ubuntu and Fedora
Calibrated after review: calligraphic display faces and the seal removed; Ink’s and News’s interface fonts unified with their text
8 - OINK CLI
Learn what the optional OINK command-line tool does and how to build its unreleased local candidate.
oink is an optional command-line tool for OINK sites. It checks the links,
anchors and translations in Hugo’s real output, creates a site from the
Starter, and previews a theme upgrade before writing it. Hugo still renders
the site, and a project you manage with oink remains an ordinary Hugo
repository.
Unreleased, and not required
Every OINK site builds and previews with plain hugo and hugo server; you
do not need the CLI. It is developed in its own repository,
pgsty/oink-cli, with its own version and
release cycle, and is currently a local 0.1.0-dev candidate: there is no
published binary or installer yet, and its commands may still change.
What it does
Command
Purpose
oink init
Create a site from a fixed Starter and select its profile and languages.
oink doctor
Inspect tools, configuration, and the resolved theme source.
oink check
Check rendered links, translation relationships, and source/style rules.
oink dev / oink build
Run Hugo’s preview server or production build.
oink new / oink move
Preview page creation or moves before applying a saved plan.
oink translations
Inspect translation status and diffs, and record human reviews.
oink upgrade
Compare a theme upgrade before writing module changes.
Every command can also report in JSON or YAML (--json, --yaml) for
scripts and CI, and the CLI can check several explicitly registered sites
together and produce checked build artifacts. It has no editor of its own:
write in your usual editor, preview with oink dev, and use oink inspect or
oink check for structured diagnostics.
Try the local candidate
Build the binary from a checkout of oink-cli with Go and Make:
cd oink-cli
make deps
make build
./bin/oink --help
./bin/oink doctor --site ../my-docs
./bin/oink check --site ../my-docs
Replace ../my-docs with the path to your site. make deps is the only step
that downloads anything (the Go build dependencies); the CLI itself runs
offline unless you pass --network to a command that needs remote inputs it
has not cached.
The candidate’s site commands still expect an older Hugo Extended build, even
though OINK itself uses plain CSS and is tested on Hugo 0.170+. oink init
copies a Starter snapshot pinned to OINK v1.3.2, so follow the
upgrade guide to bring a generated site to the current
release.
Previews change nothing: new, move and upgrade leave site sources
untouched until you run the explicit apply step (oink plans apply for a
saved plan, oink upgrade --write --expect-plan ID for an upgrade). dev and build write
Hugo’s normal output and caches.
Further reading
CLI contract: every supported command, what it may change, and the maintainer rules.
Maintenance roadmap: the historical development stages and which of them were retired.