Roles: audience spaces, role switching and version comparison
The v2 design is accepted. The candidate implementation is available in the
sibling theme checkout. Normative behavior now lives in the
Shell and
Architecture contracts; user setup
is documented in Spaces (roles).
The December 5 prerelease review retained two shortcut fallbacks. Without another space, C opens commands. Without a version counterpart, V cycles the version menu.
| Record | Value |
|---|---|
| Status | Accepted v2 design (2026-12-04), implemented in the local release candidate; all design decisions settled (decision log) |
| Owner | OINK maintainers |
| Owner decisions | C switches roles and \ keeps opening commands; V opens Duo View on another version instead of cycling versions; one reader serves both keys, switching axes in place when the other key is pressed; role-autonomous defaults, transitive peer discovery, automatic sitemap.xml emptying for index: false, and history-scope confinement for unlisted roles |
| Baseline | Hugo 0.171.0 (roles since 0.153.0); theme main |
| New public API | params.ui.roles, params.ui.role_menu; a roles filter on configured menu entries, palette commands, page context links and params.versions entries; actions switch_role and compare_versions; link state role; shortcut rows role and duo-version |
| Changed public behavior | C and V bindings; Duo View targets, axis switching and pane headings; where a prefixed role publishes its search index; robots and sitemap.xml for roles with index: false; history storage scope for unlisted roles |
| Affected contracts | Shell · keyboard, Shell · translation comparison, Shell · version menus, Architecture · outputs, Architecture · version links, the document comparison decision, the configuration reference and generated schemas, all 32 locales |
| Related | Gap review 2026-12-02 lists roles as an unused Hugo capability. The Spec boards draft describes content an internal role could hold. Follow-up needed in oink-cli (internal/app/authoring.go) to accept sites.matrix.roles mounts |
Summary
A Hugo role is a third site dimension beside language and version. It is meant
for audiences: the same project builds a public manual and, under /spec/, an
internal one. Hugo gives a role a name, a weight and an output prefix, nothing
else. It has no access control, no label, no per-role configuration, and it
builds every combination of language, version and role whether or not the
combination has content.
This proposal makes roles usable in OINK without a second configuration authority:
- Content defines each role’s autonomous shape. Every role derives its non-empty sites, versions, languages, default version, default language and entry routes from its mounted content. Combinations without rendered content files are empty sites; OINK excludes them from every switcher and renders their HTML home as a redirect.
- Roles get a reader interface across every breakpoint.
params.ui.rolesgives each role a label, an icon, whether other roles list it, and whether search engines index it. The controls appear in Space, language, version order,Ccycles roles, and non-default spaces retain a compact compass indicator even on mobile or when no other role is listed. - Links and site configuration understand roles. A non-default role falls
back to the default role across version and default-language boundaries;
explicit
/<role>/...links adapt to the target role’s available versions and languages; menus, palette commands, page links and external versions filter byrolesbefore resolving targets. - Protected roles leave zero public footprint. Everything OINK generates
for a prefixed role stays under that role’s directory—including search
indexes,
sitemap.xmlemptying whenindex: false,llms.txtisolation, role-keyed template caches, static JS chunks andlocalStoragebrowsing history—so one server rule protects it, or a Hugo environment omits it. Vopens Duo View on another version. The reader thatBopens on a translation gains a version axis over the page’s full transitive equivalence class of counterparts, with linked version and language menus, independent axis preferences, and directB↔Vaxis switching.
Background and evidence
What Hugo does
The rows below were verified with scratch builds on Hugo 0.171.0:
| Behavior | Observation |
|---|---|
| Configuration | roles takes a weight per role; defaultContentRole and defaultContentRoleInSubdir choose the default and its directory. Site.Role has only Name and IsDefault (roles, Site.Role) |
| Access control | None. Hugo expects authentication outside Hugo, by directory (PR #13679) |
| Output paths | /<role>/<version>/<language>/; default values take no directory unless their …InSubdir option is set |
| Assignment | A mount’s or a page’s sites.matrix chooses roles, versions and languages; _role_<name>_ in a file name since 0.161.0. Content without sites belongs to the default role only |
| Dimensions | Independent. A mount can give a role one language and one version while the default role has several of each |
| Full matrix | Every combination is a site. Two roles, three versions and two languages make twelve sites; a Chinese-only role still gets a home page, 404.html, sitemap.xml and taxonomy pages in every other cell unless suppressed |
| Cascade on home | A blanket cascade setting build: {render: never} on languages: ['**', '! zh'] also suppresses (spec, defaultVersion, en)’s home, removing /spec/index.html and causing /spec/ to 404 unless kind excludes home |
Rotate "role" |
Returns existing peers of a page in other roles with the exact same language and version only |
sites.complements |
Lends pages to another site’s lists only. GetPage returns nil and relref fails with REF_NOT_FOUND in the borrowing site |
| Configured menus | Apply to every role of a language. A sites key on a menu entry is ignored. Front matter menu entries belong to the page’s own role |
static/ |
Published at the root for every build, even through a mount whose sites.matrix names a role, and even in a segment build that excludes that role |
| Global resources | resources.Get and resources.FromString publish relative to the publish root (without baseURL’s subpath); prefixing their target with <role>/... confines them under that role’s directory |
| Segments | --renderSegments writes only the selected sites, but hugo.Sites and Rotate still return the excluded ones. A segment with only excludes renders nothing |
| Environments | Configuration layered with --config a.yaml,b.yaml or config/<environment>/ can add a role and its mounts; the other build never knows the role. Mount lists replace, they do not merge |
| Sitemaps | Each site writes its own; the root sitemap index lists only the default role and version |
| Aliases, 404 | Published inside the role’s directory |
| Templates | single._role_staff_.html applies only to that role |
What OINK does today
Core link and site-index tables include .Site.Role.Name, and
bin/check-version-links.py builds two symmetrical roles. However, building an
asymmetric spec role (Chinese-only, single-version) beside a multilingual,
multi-version public role exposed defects across both UI and isolation:
| Area | Observed |
|---|---|
| Empty sites | spec counted as natively versioned. Its version menu offered v4.1 and v3.2 home pages and external archives; its language menu offered the empty English home |
| Search & chunks | Every spec site published offline-search-index.spec.*.json at the root, outside /spec/, including five empty-site indexes; js/chunks/google-search-<lang>.js baked in absLangURL without role or version isolation |
| Cache collisions | backlinks-index.html, actions/root-order.html, shell/blog-index-pages.html, theme-color-pair.html and images-authored.html omitted role/version from partialCached keys, risking cross-role leakage of unlisted URLs and titles |
| Links | A spec (zh) page linking to public /docs/install/ warned as missing; an English public page linking explicitly to /spec/design/storage/ missed when spec had no en site |
| Configuration & LLMS | Site menus, palette commands and params.versions archives appeared in spec and warned on missing targets; index.llms.txt did not filter role-scoped menus |
| Browser history | history.js stored all visits under td-history:<basePath>, exposing visited /spec/ titles and URLs inside the public H history dialog |
| Interface | No role menu, no shortcut, no palette action, and no space indicator on desktop or mobile |
Meanwhile, Duo View paired only translations of the same version
(.Translations), while V cycled switch_version targets blindly.
Goals and non-goals
Goals:
- a project can hold a versioned, multilingual public manual and an unversioned, single-language internal space in one build;
- each role’s languages, versions, default version, default language and entry routes follow automatically from its content, with no shape declaration;
- readers can see which space they are in across desktop and mobile, and switch
spaces by menu, palette and
C; - pages can link implicitly from a non-default role to the default role (across version and default-language gaps) and explicitly across roles without spurious warnings, while warning once when a listed role links into an unlisted one;
- everything OINK generates or stores for an unlisted role stays confined to its prefix, and a public build can omit a role completely;
- readers compare a page side by side with any published counterpart across versions and languages in one shared Duo View.
Non-goals:
- authentication, authorization or encryption; OINK remains a static theme;
- per-role site titles, logos, presets or parameter files; roles share site
configuration except for scoped configuration and
ordinary Hugo
cascadefront matter overrides; - search across roles, or comparing pages across different roles;
- text diffs, changed-paragraph highlighting or line-by-line locking;
- Hugo
sites.complements; it lends pages to lists only and breaks links; - changing how Hugo assigns content to roles.
Model
- Role: an audience space.
- Site: one cell of the matrix (
role × version × language). - Empty site: a site of a non-default role in which no page comes from a
content file of that site (
.File != niland.Site.Home == $site.Home) that renders output (content/renders-page.html). The default role keeps today’s behavior so a language whose home is built solely from Landing data keeps its place in menus.
content/role-index.html derives a six-part shape for every role that has at
least one non-empty site:
sites: non-empty sites of the role in Hugo’s order, plus a"<version>|<lang>"lookup table;versions/versioned: Hugo-ordered versions with at least one non-empty site;versionedis true whenlen(versions) > 1;languages: ordered languages with at least one non-empty site;defaultVersion: Hugo’s default version if present inversions, elseversions[0];defaultLanguage: Hugo’s default language if present inlanguages, elselanguages[0];entry/entryByLanguage:entryByLanguage[lang]is(defaultVersion, lang)’s published HTML home if present, else the first non-empty site of the role inlangwith an HTML home;entryisentryByLanguage[defaultLanguage](or the role’s first published HTML home).
For the example with English as the project default:
| Role | Non-empty sites | Versioned | Default version / lang | Entry |
|---|---|---|---|---|
public (default) |
v4.2, v4.1, v3.2 × en, zh |
Yes | v4.2 / en |
/ (zh: /zh/) |
spec |
v4.2 × zh |
No | v4.2 / zh |
/spec/zh/ |
A role declared in roles that has zero non-empty sites warns once, never
appears as a target, and redirects its home to the default role’s entry.
Proposed behavior
Configuration
| Key | Type, default | Meaning |
|---|---|---|
params.ui.role_menu |
string, localized ui_role (“Space”, “空间”) |
Role menu name and switch_role palette title. The keyboard help uses ui_shortcut_role. |
params.ui.roles.<role>.label |
string, the role name | Text of the role in menus and the palette |
params.ui.roles.<role>.icon |
Font Awesome class pair, none | Icon beside the role name in the Space menu |
params.ui.roles.<role>.listed |
boolean, true |
Whether other roles offer this role. Its own pages always offer listed roles so a reader can leave |
params.ui.roles.<role>.index |
boolean, true |
false writes noindex, nofollow on the role’s HTML and empties its sitemap.xml |
A language overrides label and role_menu in its own params.ui. An entry
for an undefined role, a non-string label, an invalid icon or a non-boolean
switch warns once and uses the default. A role needs no entry.
Empty sites
- Empty sites are never targets of language, version or role menus, the
palette,
X,C, Duo View,hreflangalternates or LLMS peers, and do not count toward a role’s versions or languages. shell/search-enabled.htmlisfalseon empty sites, andsearch/index-resources.htmlpublishes no search index for them, so residual404.htmlor taxonomy pages in an empty site neither publish empty indexes nor fail looking one up.- In
baseof.htmlandbaseof.landing.html, empty-site home redirection (content/role-home.html) runs beforeversion-home.html, writing a redirect toentryByLanguage[lang](elseentry) with a canonical link andnoindex, nofollow. Typing/spec/lands on/spec/zh/.version_homeapplies only to non-empty sites ofversionedroles whose version differs fromdefaultVersion. - Residual pages rendered in an empty site carry
noindex, nofollowand an emptysitemap.xml.
Role switching
content/role-targets.html returns one ordered list per page, in Hugo’s role
order, shared by the navbar, mobile drawers, compact subnav, footer line,
palette and C. For each role $R$ other than the current one, it picks the
first published HTML page among:
- the exact peer in
(R, currentVersion, currentLang)from.Rotate "role"; - the same logical path or a translated path in the target role, checking the current language, the role default, then remaining languages in Hugo order. Within each language, try the current edition, the role default, then the remaining editions in Hugo order;
- $R$’s home in
(currentVersion, currentLang)when that site is non-empty; R.entryByLanguage[currentLang];R.entry.
Steps 3–5 carry data-td-role-home. A role with listed: false appears only
on its own pages. A role with no non-empty site never appears.
- The desktop navbar, mobile drawers and footer dock order their controls Space, language, version. The navbar and footer use a compass for Space. Hover, focus or tap opens the choices. Entries carry their role’s label and icon.
- Non-default roles keep the compass in the phone bar. Other dimensions are available in the drawer and footer. With no alternate target a non-default role shows a static compass with its space name available to assistive technology.
- Palette and keyboard.
switch_roleis a palette choice action available whenever at least one other target exists.Ccycles to the next non-active target, wrapping.
Links across roles
content/site-link.html and content/site-destination.html gain symmetric
fallback and explicit resolution:
- Fallback to the default role. In a non-default role, a site-root path
that matches nothing in the current role tries non-empty sites of the default
role $D$ in the same language and edition order as the role switcher. A
hit returns state
roleanddata-td-link="role"without warning. The default role never falls back into another role, and non-default roles never fall back into one another. - Explicit role segment. When a site-root path matches no real page, route
or resource in the current role and its first segment names a role $R$, the
remainder resolves in $R$, recognizing optional leading version and language
segments. An explicit dimension is binding. Unspecified dimensions follow the
role switcher’s candidate order. The default role also accepts its logical name
when its published URLs have no role directory.
/spec/design/storage/from an English public page therefore resolves to/spec/zh/design/storage/. Cross-role hits carry stateroleanddata-td-link="role". A real page at that path in the current role always wins. - Cache-safe leak warning. When a listed role resolves an explicit link
into a role with
listed: false,site-destination.htmlreturnsleakedRoleas pure data andsite-link.html(outsidepartialCached, whennot .quiet) warns once per source file or configuration key and authored target URL.
Scoped configuration
Configured lists filter entries by roles before resolving target URLs:
| Entry | Where roles goes |
Default when roles is omitted |
|---|---|---|
| Configured menu entry (and children) | params: {roles: [public]} |
Every role |
params.ui.command_palette.commands[] |
roles: [public] |
Every role |
params.ui.page_context_menu.links[] |
roles: [public] |
Every role |
params.versions[] |
roles: [public] |
versioned roles when the project has > 1 native versions; listed: true roles when the project has 1 native version |
- A shared
content/role-menus.htmlfilters.Site.Menus.main(and child trees, hiding parent panels whose children are all filtered out) acrossnavbar.html,navbar-group-items.html,shell/subnav.html,actions/quick-links.html,actions/root-order.htmlandindex.llms.txt.navbar-entry-link.htmlnever marks an entry.activewhen its link resolved viastate == "role". actions/site-commands.htmlreads default-language base commands from unfilteredhugo.Sitesso localized command overrides in a single-language role still inherit baseurl/action/rolesbefore filtering.content/version-targets.htmltrims leading, trailing and consecutive"---"separators left after filtering, andcontent/archive-directories.htmlapplies the same role filter.- Unknown role names warn once and are ignored. An explicit malformed allowlist skips the entry.
Outputs, caches and confinement
- Search. Whenever a site’s role carries a directory prefix
(
$index.rolePrefix != ""),search/index-resources.htmlpublishes its index and split body files under the site’s directory (strippingbaseURL’s subpath, e.g.spec/zh/offline-search-index.spec.zh.json).assets/js/search.jsreadsdata-td-search-pagefrom.td-searchmarkup rather than bakingabsLangURLintojs/chunks/google-search.js, keeping all root chunks role-invariant. - Robots and sitemaps.
index: falsewritesnoindex, nofollowinhead.htmland emits an empty<urlset>inlayouts/sitemap.xml. Hugo’s root sitemap index already omits non-default roles. - Agent outputs.
index.llms.txtfilters configured menus throughrole-menus.htmland skips entries with statemissingorrole, keepingllms.txt,llms-full.txt, Markdown and NAVJSON strictly within their own role. - Template caches. Every
partialCachedcall whose output depends on site content or routing—includingbacklinks-index.html,actions/root-order.html,shell/blog-index-pages.html,theme-color-pair.html,images-authored.html,language-targets.html,compare/targets.html,actions/context.htmlandshell/history-dialog.html—keys on.Site.Version.Nameand.Site.Role.Name. - Browsing history. On a role with
listed: falseand a role prefix,shell/history-dialog.htmlscopesdata-td-history-scopeto<basePath>/<role>/(e.g./spec/), so internal visits are stored undertd-history:/spec/. For an unlisted default role at the root, the hidden and listed audiences use distinct#unlistedand#listedstorage keys while validating URLs against the same physical base path. - Author files.
static/files and root-targeted globalassetspublish at the root in Hugo; protected assets belong in page bundles of that role.
Duo View by version
The reader keeps one dialog, one runtime and params.ui.compare as its switch.
Its targets become the full transitive equivalence class of published
counterparts within the same role:
compare/targets.htmlcomputes the fixed-point closure of.Rotate "version"and.AllTranslationsfrom the current page within the current role, deduplicating by(Version.Name, Language.Lang). A target must be a same-origin published HTML page of a Docs, Book or blog page (not paginated past page 1, not a draft), in a non-empty site whose language enablescompare, other than the current page. Version home fallbacks andparams.versionsarchives never qualify.- Each target carries
versionandlatest(Version.Name == R.defaultVersion) besideurl,code,directionandlabel, ordered by Hugo’s version order, then language order.
Opening and in-reader keys:
| Trigger | Behavior |
|---|---|
B, compare_translations |
Same version, another language: remembered language, else first available |
V, compare_versions |
Another version, same language: remembered version, else R.defaultVersion when reading an older version, else the version after the current one; if that version lacks the current language, its first available language |
| Entry button | B choice (with ui_shortcut_compare and aria-keyshortcuts="B") when a same-version translation exists, else V choice (with ui_shortcut_compare_versions and aria-keyshortcuts="V") |
B / V while open |
Pressing Escape or the active axis’s key closes the reader; when only one axis differs from the left pane and the other axis is available, pressing the other axis’s key retargets the right pane to that axis in place |
B is available when the current version has a translation; V when another
version has a counterpart. The palette lists each action only when available,
and the shortcut sheet dims unavailable rows.
Headings, menus and state:
- The left heading shows
中文 · v4.2, omitting any dimension that does not vary across[current, ...targets]. - The right heading renders the language menu before the version menu. A dimension with only one value across the available set renders as plain text, never a single-option dropdown: monolingual versioned manuals show only the version menu, and single-version bilingual sites match today’s UI.
- Choosing a version preserves the currently selected right-pane language if that version has it, else the left pane’s language, else that version’s first language.
- Below 900 CSS pixels, variable menus render as compact triggers in the
switcher row (
fa-language,fa-code-branch), and pane switcher tabs match the pane headings. localStorage['td-compare-reader']storeslanguage,versionandsyncindependently (still reading legacytargetentries), whilehistory.state.oinkCompareSessionstores the exact{version, code}pair and scroll bookmarks for reload and Back/Forward restoration.
Keyboard map
| Group | Today | Proposed |
|---|---|---|
| Navigation | … x language, r section, v version, h history, g home |
… x language, c role, r section, h history, g home |
| Actions | / and f search, \ and c commands, … |
/ and f search, \ commands, … |
| View | b Duo View, z Zen Mode, … |
b Duo View (translation), v Duo View (version), z Zen Mode, … |
The sheet grows from twenty-nine to thirty rows (ten, nine and eleven). Row
version becomes role; row duo-version follows duo. X, C and V sit
side by side for language, role and version. Retired bindings (v as version
cycling, c as command-mode palette) join the contract’s retired list.
Accessibility, localization and print
- The role menu reuses the version menu’s disclosure semantics, focus management, Escape handling, forced-colors and RTL rules.
- Duo View’s version and language menus are independent labelled listbox
buttons in reading order
languagethenversion; invariant dimensions render as plain text. - All 32 locale catalogs add
ui_role,ui_shortcut_role,ui_shortcut_compare_versionsandui_compare_version_select. - Print, Markdown, LLMS and RSS render no role or comparison controls.
Publishing an internal role
Roles are not access control. Deployments choose one of two patterns:
Publish behind authentication. Build all roles and protect /spec/ in the
server or CDN (e.g. nginx location /spec/ or Cloudflare Access). With native publication paths, the
outputs for spec—HTML, bundles, aliases, 404.html, empty
sitemap.xml, Markdown, LLMS, NAVJSON, Print and local search indexes—lie
under /spec/, while localStorage history stays under td-history:/spec/.
An authored URL or alias can override these paths. Check the built tree and
pass its Hugo log to bin/check-version-links.py --public DIR --build-log LOG;
any [oink-role-path] diagnostic blocks publication.
Omit from the public build. Layer the internal role and its full mount list
under config/internal/hugo.yaml so hugo --environment internal builds both
roles while the public configuration omits spec. Use a fresh destination for each deployment. For example, build into
hugo --environment production --destination "$(mktemp -d)" and
hugo --environment internal --destination "$(mktemp -d)". Deploy only the
selected tree. Hugo can leave files from a previous build in a reused directory.
Worked example
The companion site’s make spec preview serves one Chinese working copy at
/spec/ alongside bilingual Docs for v1.9, v1.7 and v1.6. See the
working-language configuration.
The following configuration uses English as its project default and publishes
an unlisted Chinese space at /spec/zh/.
The first cascade rule keeps (spec, v4.2, en)’s home and 404 page while
removing empty sections and taxonomies, so /spec/ redirects cleanly to
/spec/zh/ and no v4.1 or v3.2 directories are written under /spec/.
index: false automatically writes noindex, nofollow and empties spec’s
sitemaps. Links from spec to /docs/install/ (whether translated or
English-only) resolve without warnings; public pages contain zero /spec/
references.
Compatibility and migration
- Keys.
Vopens version Duo View instead of cycling versions;Ccycles roles instead of opening the command palette (\remains). - Duo View. Sites with
params.ui.compare: trueand native versions gain version comparison automatically; single-version sites see no UI change. - Existing role sites. Sites defining multiple listed roles gain the Space switcher; prefixed roles publish search indexes under their own directory.
- Site-owned bundles. Custom shells bundling
keyboard-nav.jsalone (such aspgsty.com) update their custom help copy if it listedCfor commands. - Content. No content or front matter migration is needed.
Implementation plan
- Stage 1: Site and role model.
content/site-index.html,content/role-index.html,content/role-config.html,content/role-home.html; empty-site handling acrosssite-peers.html,version-identity.html,version-banner.html,language-targets.html,version-targets.html,archive-directories.html,seo-alternates.html,shell/search-enabled.html,search/index-resources.html,baseof.html,baseof.landing.html,head.htmlandlayouts/sitemap.xml; fullpartialCachedrole/version key audit across nine partials. - Stage 2: Duo View by version. Transitive closure in
compare/targets.html; dynamic shortcut metadata incompare/scripts.htmlandcompare/entry.html;compare_versionsinactions/context.html,actions/site-commands.htmlandassets/js/action-registry.js; pureassets/js/compare-targets.jswith unit tests; linked version/language menus, independent preferences and axis switching inassets/js/document-compare.jsandassets/js/compare-entry.js; styles inassets/css/td/document-compare.css;Vbinding andduo-versionrow inassets/js/keyboard-nav.jsandshell/keyboard-help.html; 32 locales. - Stage 3: Role switching and space indicator.
content/role-targets.html,navbar-role-selector.html,navbar.html(desktop + drawer order fix),shell/sidebar-panel.html,shell/subnav.html,shell/footer-line.html; mobile compass and static single-space indicator inassets/css/td/site-navbar.css;switch_roleaction;Ckey androleshortcut row;bin/check-params.pyand generated schemas. - Stage 4: Cross-role links and scoped configuration. Default-role
ordered sparse fallback, adaptive explicit role resolution and cache-safe
leakedRolewarning incontent/site-destination.htmlandcontent/site-link.html;content/role-menus.htmlacross all six.Site.Menus.mainconsumers plusnavbar-entry-link.htmlactive-state guard; filter-before-resolverolessupport inactions/site-commands.html,actions/title-menu.htmlandcontent/version-targets.html; schema updates. - Stage 5: Output confinement, contracts and guides. Subpath-safe site-dir
search publishing in
search/index-resources.html; staticassets/js/search.jsviadata-td-search-page; unlisted role history scoping inshell/history-dialog.html;index.llms.txtcross-role exclusion; confinement and chunk-invariance checks inbin/check-runtime-isolation.pyandbin/check-version-links.py; bilingual contracts and user guides.
Verification
| Checker | Coverage |
|---|---|
bin/check-version-links.py |
Asymmetric spaces fixture (public en/zh × 3 versions + spec zh × 1 version, with and without cascade, plus subpath baseURL). Empty-site exclusion, /spec/ → /spec/zh/ redirect with cascade, 5-step role targets, 4-step default-role fallback (including English-only fallback), adaptive /spec/... explicit links and leak warning, scoped menus/commands/links/archives, search files under /spec/zh/, noindex and empty sitemap.xml, llms.txt isolation, history scope, zero /spec/ footprint across public files |
bin/check-compare.py |
Role/version fixtures and a six-language, six-edition chain with ten reachable targets; exact transitive target set, compare_versions, dynamic entry shortcut |
bin/check-runtime-isolation.py |
Static google-search.js, empty-site search-enabled gate, role-invariant chunk bytes |
bin/check-keyboard.py, bin/check-shell.py |
Thirty rows, c, v, b bindings, role → language → version order across navbar, drawers and footer |
bin/check-actions.py, bin/check-palette.py |
switch_role, compare_versions, command allowlist and localized command inheritance in single-language roles |
bin/check-params.py, bin/generate-config-schema.py --check |
params.ui.roles, params.ui.role_menu and roles filters: valid shapes, warnings, fallbacks, negative tests and schema parity |
bin/check-search.py, bin/check-backlinks.py |
Per-role index placement, no empty-site indexes, role-isolated backlinks cache |
bin/check-i18n.py, bin/check-goldens.py, tests/js/ |
32-locale parity, updated goldens, unit tests for keyboard-nav, action-registry, compare-targets and document-compare |
| Site suites | make -C ../oink.pgsty.com check and browser suites |
Acceptance criteria
- The English-default example builds with zero warnings. Both with and without the
cascade,/spec/redirects to/spec/zh/, and emptyspecsites appear in no menu,hreflang,llms.txtor search index. In the Chinese-default companion preview,/spec/serves Chinese and old/spec/zh/bookmarks forward to the matching manuscript. - In
spec, the version menu, version banner andVare absent; the language menu,hreflang,XandBoffer no target; mobile and desktop headers show the Space compass. - Links from
spec(zh) to both translated and English-only public pages resolve withdata-td-link="role"and no warning; explicit/spec/...links from English or Chinese public pages resolve tospec’s Chinese pages and emit one leak warning per source and target URL; whenspecis unlisted and unlinked, public HTML,llms.txt,sitemap.xml, JS chunks andtd-history:/contain zero/spec/references. - Every file OINK generates for
speclies under/spec/, withnoindex, nofollowon HTML and an empty/spec/zh/sitemap.xml. hugowith the default environment produces nospecfile and no reference to it.- In Duo View,
Bopens same-version translations,Vopens cross-version counterparts, pressing the opposite key inside the reader switches axes in place, a ten-edge chain reaches its final counterpart, and single-axis sites display a single menu. Ccycles listed roles and returns fromspecto the matching public page (across language/version if needed) or home; with one role and on the default space, theroleshortcut row is dimmed.- Focused theme checkers, JS unit tests, and sibling site checks pass.
Open decisions
None remain open. All original nine decisions (2026-12-03) and the v2 review refinements (2026-12-04) are settled.
Decision log
- 2026-12-03 (owner): Asked how Hugo roles work for a multilingual,
versioned public manual (
endefault) paired with a Chinese-only, unversioned internalspecprotected by prefix auth or omitted from public builds. ChoseCto cycle roles (\opens commands) andVto open Duo View on another version inside one shared reader. - 2026-12-03: Initial draft written and nine open decisions settled by
owner (“Space” / “空间” label,
listed: truedefault, singleparams.ui.compareswitch,Vcross-language fallback, empty-site home redirect, leading role segment with leak warning, default role empty-site compatibility). - 2026-12-04 (owner): Reviewed architectural edge cases and approved the v2
unified design for implementation: role-autonomous
defaultVersionanddefaultLanguage; 5-step role switching and 4-step default-role link fallback plus adaptive explicit-role resolution;kind-scopedcascadepreserving/spec/redirect and automaticlayouts/sitemap.xmlemptying onindex: false;partialCachedrole/version audit, staticgoogle-search.js,llms.txtrole isolation, andtd-history:/<role>/scoping for unlisted roles;params.versionsdefaulting tolisted: trueroles on single-version projects; transitive closure target discovery, independent axis preferences, and in-readerB↔Vaxis switching in Duo View.