A few entry points chosen from the navbar’s top-level menu.
Decided by: params.ui.quick_links.
This is the multi-page printable view of this section.
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.
| I want to change… | Read |
|---|---|
| The site name, logo or favicon | Brand and appearance |
| Colors, light and dark mode, fonts | Brand and appearance |
| The navbar menu and its dropdowns | Navigation and menus |
| Sidebar width, icon density or outline depth | Layouts and page types |
| The home page and landing pages | Home and landing pages |
| Full-text search and what it indexes | Search |
| What the command palette offers | Command palette |
| Keyboard shortcuts | Keyboard navigation |
| The languages the site publishes | Languages |
| Several versions of the docs, or the archive banner | Versions |
| Tags and categories | Taxonomies |
| “Edit this page”, last-modified dates and contributors | Repository links and page info |
| Printing a page or a whole chapter | |
What AI agents read: llms.txt and per-page .md files |
AI-agent support |
| Any parameter’s type and default | Configuration |
| Comments, analytics or the deployment target, which need an outside service | Operations |
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.
Configuration keys come in four layers, and the layer tells you where a key’s behavior is documented:
| Layer | Examples | Who defines it |
|---|---|---|
| Hugo’s own top-level keys | baseURL title languages markup outputs taxonomies module |
Hugo itself. See gohugo.io for behavior |
Top-level params |
logo offline_search github_repo version page_width comments |
Site-level options the theme reads |
params.ui.* |
navbar_enabled sidebar_width_min typography pager_types |
The shell, navigation and reading interface |
params.<runtime> |
mermaid plantuml drawio markmap |
Each content runtime’s own switch and endpoint |
A working site needs only the first two layers, including the Goldmark settings that OINK’s Markdown components depend on:
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.
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:
cascade in an ancestor section’s _index.md (the nearest wins);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.
A cascade sets a whole subtree at once:
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.
Hugo does not merge a theme module’s markup settings into the site, so
these lines belong in your own hugo.yml:
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.
Hugo’s own keys name the site and turn on Git metadata:
title
,
<title> and the footerbaseURL
,
copyright
,
params.copyright is unsetenableGitInfo
,
,
enableRobotsTXT
,
,
robots.txtenableEmoji
,
,
:smile: emoji shortcodesThe theme’s keys add the logo, footer text and accent color:
params.logo
,
,
assets/ resource or a static/ path. See Brand and appearanceparams.wordmark
,
params.description
,
params.copyright
,
authors, from_year and to_year; present means the current yearparams.footer_center_info
,
,
params.author
,
name and emailparams.ui.theme_color
,
#rgb or #rrggbb accent for the shell’s colored backgrounds. Prose links and inline code keep their own colors. See Brand and appearanceparams.ui.theme_color_dark
,
,
theme_color until it meets AA contrast on the dark canvasFavicons 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.
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.
params.ui.shell_types
,
,
params.ui.docs_section
,
,
params.ui.blog_section
,
,
params.ui.docs_sidebar_root
,
,
section at the documentation section, home at the site homeparams.ui.quick_links
,
,
params.ui.sidebar_root_enabled
,
,
sidebar_root_for: selfparams.ui.sidebar_root_menu
,
,
params.ui.section_index
,
,
list or cards. Overridable per sectionparams.ui.section_index_columns
,
,
section_index: cardsSite-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
,
,
params.ui.expo.mode
,
,
wall, cards or seamlessparams.ui.expo.size
,
,
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
,
,
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 nothingparams.ui.blog_index
,
,
list horizontal entries, cards image cards, table compact rows, gallery linked covers. All are newest first; table always lists the whole section on one pageparams.ui.blog_index_columns
,
,
blog_index: cards from the xl breakpoint up. Between md and xl there are always two columns, below md oneparams.ui.blog_index_size
,
,
list, cards and gallery, and for all four layouts when blog_index_toggle is on. A standalone table ignores itparams.ui.blog_index_toggle
,
,
list → cards → table → gallery, remembering their choice. When false, only the configured layout is publishedparams.ui.blog_gallery.mode
,
,
gallery: wall with 6px gaps, seamless with none, cards as a masonry with visible captions. Independent of blog_indexparams.ui.blog_gallery.size
,
,
params.ui.toc_style
,
,
fixed pins a panel to the viewport; flow uses a wider panel that starts level with the article and pins only once you scrollparams.ui.toc_taxonomies
,
,
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.
Authors and series are taxonomies rather than parameters; see Taxonomies and Writing a blog.
The navbar, the footer and the page-action menu at the right end of the breadcrumb row:
params.ui.navbar_enabled
,
,
navbar_enabled. See Navigation and menusparams.ui.navbar_autohide
,
,
params.ui.footer_style
,
,
fat is a multi-column grid plus the copyright line, slim the copyright line only, none nothingparams.ui.dark_mode
,
,
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 controlparams.ui.breadcrumb
,
,
params.ui.page_context_menu.enable
,
,
params.ui.page_context_menu.assistant_links
,
,
params.ui.page_context_menu.links
,
,
url may use the {url}, {title} and {markdown_url} placeholdersparams.ui.github_stars
,
params.ui.alt_site
,
label and an absolute http(s) urlThe fat footer’s columns come from data/footer/<language>.yaml, not from a
parameter; see Navigation and menus.
How the left navigation tree renders. Its structure comes from the content/
folders (Organizing content), and
Layouts and page types shows these keys in
use.
params.ui.sidebar_menu_compact
,
,
params.ui.sidebar_menu_foldable
,
,
params.ui.sidebar_menu_truncate
,
,
params.ui.sidebar_cache_limit
,
,
params.ui.sidebar_width_min
,
,
params.ui.sidebar_width_max
,
,
params.ui.sidebar_item_overflow
,
,
ellipsis or wraps with wrapparams.ui.sidebar_icon_policy
,
,
all everywhere, groups only on the root and on entries with children, none nowhereparams.ui.sidebar_expand_levels
,
,
params.ui.sidebar_headings
,
,
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 2params.ui.sidebar_enabled
,
,
params.ui.taxonomy_icons
,
,
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 iconHugo 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).
markup.tableOfContents.startLevel
,
,
markup.tableOfContents.endLevel
,
,
params.ui.scroll_spy
,
,
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
,
,
x bluesky mastodon facebook linkedin reddit hackernews telegram whatsapp line pinterest weibo chatgpt claude email copy. 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 blogparams.ui.pager_types
,
,
pager: false. An unknown type warns and is droppedparams.ui.annotation
,
,
upstream_link keys; see Page parametersparams.ui.backlinks
,
,
params.ui.compare
,
,
false to opt out. See Duo viewparams.ui.translation_notice
,
,
translation_notice: falseparams.ui.reading_time
,
,
params.ui.book_draft_banner
,
,
Local search is off by default. Turning it on also brings up the command
palette, which opens from the navbar magnifier, Cmd/Ctrl with K, /
and \.
params.offline_search
,
,
params.offline_search_on_serve
,
,
hugo server too, so the preview searches like production. On a very large site, false speeds up local rebuildsparams.offline_search_index
,
,
title, heading, summary, contentparams.offline_search_summary_length
,
,
params.offline_search_max_results
,
,
params.ui.landing_search
,
,
layout: landing pagesparams.ui.command_palette.commands
,
,
url or a built-in action. See Command paletteparams.gcs_engine_id
,
params.search.algolia
,
appId, apiKey and indexName are all requiredA 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.
params.ui.keyboard_nav
,
,
false, the runtime is left out of the page, so nothing is bound, recorded or restored. See Keyboard navigationparams.ui.image_zoom
,
,
image_zoom in front matterImages explains which images can be zoomed.
The visual preset, the fonts and the page widths:
params.ui.preset
,
,
paper or slate, or the explicit experiments github, ink, news and terminalparams.ui.preset_menu
,
,
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_modeparams.ui.typography
,
,
technical uses the selected preset’s bundled fonts (Paper: Plex Sans; Slate: Inter); system uses the platform font stack and requests no brand fontparams.ui.fonts
,
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 familyparams.page_width
,
,
normal, wide, full. Overridable per pageparams.reading_width
,
,
slim, normal, wide. The shell is unaffectedparams.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 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
,
,
comments in front matter. See Commentsparams.comments.type
,
,
giscus renders todayparams.comments.giscus.repo
,
params.comments.giscus.repoId
,
params.comments.giscus.category
,
params.comments.giscus.categoryId
,
params.comments.giscus.mapping
,
,
params.comments.giscus.term
,
mapping is specific or number. Omitted when unsetparams.comments.giscus.strict
,
,
params.comments.giscus.reactionsEnabled
,
,
params.comments.giscus.emitMetadata
,
,
params.comments.giscus.inputPosition
,
,
params.comments.giscus.theme
,
,
auto follows the site’s light/dark stateparams.comments.giscus.lightTheme
,
,
params.comments.giscus.darkTheme
,
,
params.comments.giscus.loading
,
,
lazy requests the giscus script only when the reader nears the comments, except on return from GitHub sign-in; eager requests it at onceparams.comments.giscus.lang
,
,
zh-CN, zh-TW or zh-HK and other languages use their base code; a language giscus does not support falls back to enparams.comments.giscus.ariaLabel
,
,
aria-label. The default is “Comments” in the page’s languageparams.comments.giscus.errorMessage
,
,
params.ui.feedback.enable
,
,
gtag is present, each answer is recorded as a structured eventparams.ui.feedback.reasons
,
,
Without all four required giscus values, the page has no comment section. Comments shows where to find them.
Links from each page back to its source, and the information block at its end:
params.github_repo
,
params.github_project_repo
,
,
params.github_branch
,
,
params.github_subdir
,
params.path_base_for_github_subdir
,
/) 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 linksparams.github_url
,
,
params.github_repoparams.ui.lastmod_commit
,
,
subject the commit subject, hash the short hash, none nothingparams.images
,
,
og:image for pages without their own image. Metadata only; never shown as a list thumbnailparams.upstream_source
,
,
data/upstreams record for pages that declare upstream_link. A page’s front matter can override itparams.upstream_modified
,
,
upstream_linkparams.default_featured
,
,
params.images, or images in a section cascadeMermaid, 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
,
,
params.mermaid
,
mermaid.initialize(). Keys are lowercase. Dark mode overrides theme automaticallyparams.plantuml
,
,
true turns on local rendering; false turns off all PlantUML renderingparams.plantuml.enable
,
,
params.plantuml.svg_image_url
,
params.plantuml.svg
,
,
<img>params.drawio.enable
,
,
.drawio.svg images. See Draw.ioparams.drawio.drawio_server
,
enable is trueparams.video_embeds
,
,
youtube, bilibili, vimeo) whose player loads in place after a reader clicks a video card. Empty: cards only link out. See Videoparams.map
,
,
map place lists. See Mapparams.map.enable
,
,
tiles and attributionparams.map.tiles
,
{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 enabledparams.map.attribution
,
params.map.attribution_url
,
https:// URL turning attribution into a clickable linkparams.map.dark_tiles
,
params.map.subdomains
,
{s} subdomain characters as a quoted string (e.g. abcd, "01234567"); empty uses Leaflet’s abcparams.map.max_zoom
,
,
params.map.loading
,
,
lazy) or wait for a reader click (click)params.highlight_classes
,
,
false returns to Hugo’s inline stylesparams.ui.code_copy
,
,
false removes it site-wide; a fence’s own copy= still winsparams.ui.rich_copy
,
,
Math needs no parameter, only the passthrough setting.
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:
| Format | Output | Description |
|---|---|---|
HTML |
index.html |
The interactive page; required |
markdown |
index.md |
A plain Markdown version of each page. “Copy Markdown” and “View markdown” need it. See AI-agent support |
LLMS |
llms.txt |
A plain-text site index for language models, usually on home only |
LLMSFULL |
llms-full.txt |
Opt-in for a top-level section: its pages’ Markdown joined in sidebar order, one file per language |
NAVJSON |
navigation.json |
Opt-in on home: the sidebar and pager tree as JSON, once per language, validated by schema/nav.v1.schema.json |
print |
_print/index.html |
A whole section as one printable page. See Print |
BookManifest |
book.json |
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
,
,
false leaves it outparams.print.section_break_wordcount
,
,
Languages are defined in Hugo’s own languages block, and the theme reads the
translation links Hugo builds from it:
defaultContentLanguage
,
,
languages.<lang>.label
,
languages.<lang>.locale
,
<html lang> and SEOlanguages.<lang>.weight
,
languages.<lang>.title
,
languages.<lang>.direction
,
,
rtl for a right-to-left languagePaired files, anchor alignment and fallback for untranslated pages are covered in Languages.
Version keys:
params.version
,
params.version_menu
,
,
params.version_menu_pagelinks
,
params.versions
,
version, url and kind; name: '---' is a dividerparams.archived_version
,
params.url_latest_version
,
params.time_format_blog
,
,
params.time_format_default
,
,
taxonomies
,
tag: tags and category: categories. See Taxonomiesparams.taxonomy.page_header
,
services.googleAnalytics.id
,
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.
Build once after each configuration change:
The build is good when it ends with Total in … and prints no ERROR. Then
read each WARN line; these are the common ones:
| Warning fragment | Cause |
|---|---|
invalid params.ui.typography |
The only choices are technical and system |
invalid params.ui.footer_style … (allowed: fat | slim | none) |
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.
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:
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.
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.
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.
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 firststatic/apple-touch-icon.png
rel="apple-touch-icon"static/apple-touch-icon-180x180.png
rel="apple-touch-icon" with sizesfavicon.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.
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.
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:
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="…">.
To change a family without writing CSS, set params.ui.fonts:
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.
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:
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:
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 |
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:
preset_menu |
Readers can choose |
|---|---|
false (default) |
Nothing; every page uses preset |
true |
Paper, Slate and the site’s own preset |
| A list | 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.
Sites are light-only until you turn dark mode on:
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_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.
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.
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.
| Property | Used for |
|---|---|
--td-brand-copper, --td-brand-copper-dim |
A warm secondary accent, used in the footer and Landing sections, and its muted form |
--td-brand-mark-from, --td-brand-mark-to, --td-brand-mark-gradient |
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.
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
landing
chromesearch
compare
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.
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.<html> carries the data-td-typography and data-td-preset values you
set.font-family lists your
family, and the rendered font is the file or system font you expect.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.
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:
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.
The home page’s content file holds only its title and description:
The sections live in one data file per language:
home page data
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.
The hero is the first screen, and the only section with a large title and an illustration:
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.
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 |
cards sets its column count with columns:
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:
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.
The download section reads the same data/download/<key>.yaml records as
Releases and downloads, so a version number is
written once for both.
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:
landing: pricing names the data, which sits beside the home page’s and is
split by language the same way:
landing page data
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.
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.
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:
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.
landing.js, loaded only when needed, for reveal effects, counters, copy buttons and light/dark image switching.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.
hugo --printPathWarnings. Misspelled types, missing data keys and a
page with both landing and sections are reported here.image.light and
image.dark each appear in the right one.download sectionparams.ui.landing_search, github_stars, alt_site and the restThe 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.
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:
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.
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.
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:
params.icon;icon in the target page’s front matter;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.
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).
On long pages you can give the navbar’s space back to the content:
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.
For pages that need the whole viewport, such as a full-screen report or an embedded application, turn the navbar off for the site:
or for one page or section:
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 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.
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:
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 |
| Edit this page | edit_page |
The same |
| Create child page | create_child_page |
The same |
| Create docs issue | create_issue |
params.github_repo is set |
| Create project issue | create_project_issue |
params.github_project_repo is set |
| Print entire section | print_section |
The section has the print output format |
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:
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.
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.
pager_types accepts only docs, book and blog; any other value warns and
is dropped. To remove the pager from one page:
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 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:
A page overrides the setting with backlinks in its front matter, and a
section passes it down with a cascade:
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.
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):
brand.name and brand.logo, the footer uses the site’s own brand name, logo and wordmark. tagline and slogan render Markdown.url resolves against the current language root. external: true opens the link in a new tab with rel="noopener noreferrer".data/footer.yaml.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.
Build, then check the warnings and the rendered navigation:
only one interactive child level is supported; if one does, a menu is nested three levels deep.lg, every top-level entry shows an icon; an entry without one is blank at that width.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.rel="prev" / rel="next".grep td-backlinks public/<a page that is linked to>/index.html finds the block, and a page nothing links to has none.github_project_repo.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:
Where content goes and how the sidebar tree follows the folders is covered in Organizing content; this page covers the shell around it.
type |
Shell |
|---|---|
docs |
The reading shell: left sidebar with section switcher and page tree, the body, and the outline on the right |
book |
The reading shell, plus numbered chapters, figures and tables, the reading_width measure and an optional draft banner |
blog |
The reading shell, with blog sections expanded in the sidebar and the breadcrumb off; on blog index pages the page-action button leads with RSS |
swagger |
The reading shell, with Swagger UI or Redoc rendering the body. See API reference pages |
expo |
The shared sidebar and a full-width image album, without the outline. See Expo albums |
| Any other type | A plain page: navbar, a single-column body and the footer, with no sidebar |
Taxonomy and term pages, such as /tags/, also use the reading shell.
params.ui.shell_types lists the types that get the reading shell’s
behavior; its default is the five types above:
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.
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:
Any other value warns and uses section.
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:
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:
The documentation now shares the URL root with every other section, so build
with --printPathWarnings and resolve any duplicate target before you
publish.
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.
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.
To remove the sidebar from one page:
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:
sections key;docs or book;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.
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:
| 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.
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.
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.
A section with an _index.md lists its child pages automatically, either as a
list or as cards:
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.
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:
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.
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:
What each key does is described in Navigation and menus and Brand and appearance; the full list of keys is in Page parameters.
Total in … and reports no ERROR.type: docs page has the left sidebar. If not, check that the cascade
reaches it and that its type is in shell_types.md the sidebar is a drawer you can close, and below xl the outline
sits in that drawer.page_width: wide is wider than its neighbors.weight and the sidebar treelayout: landingOINK’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.
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:
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:
| Value | What is indexed | When to use it |
|---|---|---|
title |
Title, tags, categories, search_keywords |
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.
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:
On this site, every page under docs/ lists its Chinese phrasing, its English
terms and the configuration keys it documents in search_keywords.
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.
Do not put content that should stay private on the site, and do not use
search_exclude to protect it.
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:
数据库连接池超时 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.shared_buffers,
pg_basebackup, --baseURL, /pg/data, ->>) match literally and are
never spelling-corrected.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.为什么, 如何, 怎么, 怎样, 什么,
请问) 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:
search_boost.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.
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.
Results also need a page of their own:
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.
Build, and confirm there is one index per language:
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.
offline_search* keyssearch_keywords / search_boost / search_excludeThe 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.
| How to open it | What opens |
|---|---|
| Click the search box in the navbar or sidebar | Full search mode |
| ⌘ / Ctrl + K | Full search mode. Press again to close |
| / | Full search mode |
| \ | Command-only mode (equivalent to a prefilled >) |
| f / c | The same two, provided by keyboard navigation |
Typing a query beginning with > in the box |
Command-only mode |
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.
With nothing typed, the palette lists four groups in a fixed order:
A few entry points chosen from the navbar’s top-level menu.
Decided by: params.ui.quick_links.
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.
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.
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.
Select quick links from Hugo’s main menu by identifier. You do not need to define them again:
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.
A site’s own commands go under params.ui.command_palette.commands, after the
built-in ones, in the order written:
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.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.
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:
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:
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:
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.
The dialog uses two independent data sources:
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.
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:
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.
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:
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.
ui.command_palette and ui.page_context_menuYour 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.
| Key | Action |
|---|---|
| W S | Move to the previous / next entry of the sidebar tree |
| A D | Collapse / expand the section |
| Enter Space | Open the focused tree entry |
| Q E | Previous / next page in sidebar order |
| K J | 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 |
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.
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>.
These keys work on every interactive page and do nothing when there is no other choice:
params.versions that has a
URL, wrapping after the last one.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.
| 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 |
/ 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.
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.
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.
| 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 |
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 Q E 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.
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.
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.
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:
page_width and the Book
content measure. Printing ignores it.td-shell-article-w in localStorage), so stepping back always
returns every page to the width its author chose.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.
' 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.
? 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 +.
Every binding is a single key, so each one steps aside when it could collide with typing or an overlay:
<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.Comments load in an iframe, so their keystrokes never reach the page.
forced-colors the focused row and the selected
history entry are outlined in the system highlight color.prefers-reduced-motion, heading jumps and paging
land instantly.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:
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.
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:
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.
ui.keyboard_navOINK 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.
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.
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:
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:
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:
title, description, summaries, menu labels, tag names,
image alt text, callout bodies and reader-facing shortcode parameters.weight, aliases and anything else that affects
routing or order; a different weight puts the page in a different sidebar
position in each language.Three things live outside content/ and need one copy per language.
Menus are written under each 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.
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:
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 compare one translated pair after a build:
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.
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.
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 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:
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:
hooks/head-end.html run again inside each pane unless
you guard them with window.OinkComparePane; see
Analytics.frame-src 'self', and the server
must not send X-Frame-Options: DENY or frame-ancestors 'none'; see
Content Security Policy.Declare the writing direction on the language:
<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.
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:
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.
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.
Compare the heading IDs of a translated pair as shown under Align heading anchors.
data/home/<lang>.yamlhreflang and the sitemapA 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.
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.
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.
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:
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.
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.
baseURL: https://v1-9.docs.example.com/
Versions are fully independent; each needs its own DNS record and certificate.
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.
baseURL must include the path segmentOtherwise 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.
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:
With params.versions empty or unset there is no menu at all.
Check that the current version is marked:
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.
baseURL, subpaths and multi-target publishingparams.versionversion / versions / archived_versionThe 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.
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:
taxonomies:, tags and categories exist only if you list them./tags/, /categories/.disableKinds: [taxonomy, term] turns all taxonomies off.To classify pages by product module as well:
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:
The front matter key is the plural (the value side of taxonomies), and
its value is always a list, even with a single term:
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.
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:
page_header cannot hide the line; see Limits. The key is listed in
Configuration.
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:
authors
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:
data/authors file. The term page is the profile, so there is never a second source to disagree with it.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.Each taxonomy generates two levels of page:
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.
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 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.
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:
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.高可用 on an English page and its chip shows 高可用.Running a multilingual site is covered in Languages.
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:
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.
On a page of your own that has terms assigned, check that:
params.taxonomy.page_header;toc_taxonomies on, the right rail shows term groups with counts, and turning it off hides the clouds but keeps the page’s terms;/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:
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.categories / tags and the other front matter keysparams.taxonomy.* and params.ui.taxonomy_iconsA 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.
With these settings, this page’s action menu points to:
| Menu entry | Target |
|---|---|
| Edit this page | …/edit/main/content/docs/customize/repository.md |
| View edit history | …/commits/main/content/docs/customize/repository.md |
| Create child page | …/new/main/content/docs/customize?filename=change-me.md&value=<template> |
| Create docs issue | …/issues/new?title=Repository links and page info |
| Create project issue | https://github.com/pgsty/oink/issues/new |
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.
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.
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.
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 · …/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_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.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
layouts/_partials/page-meta-lastmod.html
layouts/_partials/page-annotation.html
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 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:
A blog usually keeps just comments, so you may prefer to turn the widget on for the documentation section only, with a cascade:
localStorage per page and language, so a returning reader sees it and can change it.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.This page turns the widget on in its front matter, so you can try it at the end of the page.
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:
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:
In Markdown and RSS output, the grid becomes a list of
- [@handle](url) — role lines.
data/contributors.yamlThe example therefore does not render on this page. Add a data file to
data/ to render it.
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:
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._index.md) gets a correct source path too.annotation / feedback / pager / page_context_menu and the other page switchesgithub_*, ui.lastmod_commit and ui.feedbackDocumentation 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.
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:
| Page | Print view |
|---|---|
/docs/customize/ |
/_print/docs/customize/ |
/docs/ |
/_print/docs/ |
/blog/release/ |
/_print/blog/release/ |
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.
A print view contains, from top to bottom:
1:, 2:, 2.1: by level and linked to anchors in the document.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:
To leave out the table of contents for the whole site:
or for one section, in its index’s front matter:
Some pages add nothing on paper: a page of links, a redirect note, a single
large screenshot. Set no_print to leave one out:
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.
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.
| Component | Print shape |
|---|---|
| Callouts | Static blocks. All collapsible kinds (- / + / DETAILS) expand. Borders turn gray and backgrounds are removed |
| Tabs | The tab bar disappears and every panel is printed in turn, each under its own heading |
| Code Blocks | Copy and fold controls removed, maximum height and scrolling dropped, long lines wrapped |
| Tables | Complete static tables. On screen the print view keeps keyboard scrolling; on paper the table expands and its header repeats on every page |
| Images | Image and caption kept, zoom removed, width limited to the text column |
| Gallery | The grid becomes a vertical stack |
| FileTree | A static panel with every directory expanded. A split layout keeps its build-time width |
| Fields | The complete definition list, the same as on screen |
| Math | Statically rendered KaTeX / MathML |
| Mermaid | The print view keeps the source and loads no engine. A browser-printed page shows the rendered diagram, or the source if it has not rendered |
| Markmap | 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 |
| PlantUML | The print view keeps the source and loads no runtime. A browser-printed page shows the rendered image, or the source if it has not rendered |
| ECharts · Infographic | 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 |
| Asciinema · OpenAPI | A labeled static link to the recording or specification; none of the three runtimes loads |
| Timeline · Updates | Static axis or heading + metadata line on the light paper palette; avoids page breaks inside entries |
| Video · Audio | Static figure with poster (for video), caption and visible file or watch URL; no <video>, <audio> or <iframe> in the print view |
| Social | Static quoted card with author, body, attachments and original-post link on the paper palette |
| Maps | 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.
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.--td-print-font-family typography token; see Brand and appearance.break-after: avoid-page), and paragraphs and list items keep at least three lines together at a page break.<details> always prints open, so collapsed callouts and file tree directories show their content.Put any other print styling in a @media print block in
assets/css/project.css; no template change is needed.
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.
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:
Each editor filters pasted HTML in its own way, so check an important article in the editor you publish to.
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
print/page-heading.html
print/content.html
print/toc-li.html
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.
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:
Then open Print entire section on the running site:
no_print: true.Cmd/Ctrl+P shows no notice, navbar or buttons in the preview.section_break_wordcount.outputs and params.print.*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.
.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 outputs
replaces 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:
| Page | Markdown |
|---|---|
/docs/customize/agents/ |
/docs/customize/agents/index.md |
/docs/customize/ (section index) |
/docs/customize/index.md |
/ (site home) |
/index.md |
Every HTML page also announces its Markdown version in <head>, so a crawler
does not have to guess the URL:
.md contains
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:
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:
A multilingual site gets one per language, /llms.txt and
/zh/llms.txt, each generated from the site’s structure:
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.description.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.
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:
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.
This site’s docs section publishes one: https://oink.pgsty.com/docs/llms-full.txt is the entire English documentation in one file.
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:
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:
| 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.
This site publishes it: https://oink.pgsty.com/navigation.json is the live tree.
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
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.
.md output
Set outputs in the page’s front matter. It replaces the whole list, so name
only the formats you want to keep:
To drop only Markdown and keep a section’s feed and print view, list the rest:
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:
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.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.
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:
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:
Then check four things:
<head> has rel="alternate" type="text/markdown";llms.txt contains no off-site links;llms-full.txt starts with a Source: line, and a page has the same id in every language’s navigation.json..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.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.Accept: text/markdown is content negotiation, which belongs to your web server or host, not the theme..md as its fence source, not as a picture.outputs / assistant_links / page_context_menullms.txt’s site index comes from the main menuoutputs and params.ui.page_context_menu.*