Skip to content

Page parameters

Look up every front matter key OINK reads, with its type, default and effect, to change one page or a whole section.

Front matter lets one page, or a whole section through cascade, depart from the site-wide settings in hugo.yml: a wide layout for one reference table, no pager on a landing page, comments on blog posts but not on the docs. The keys below are every page key OINK reads, grouped by what they change. Hugo’s own fields (slug, url, build, sitemap, expiryDate and the rest) work as usual and are documented by Hugo. Site parameters are in Configuration.

How page keys work

A page key is the site key without params. and ui., written at the top level of the front matter. The site’s params.ui.section_index becomes section_index on a page, and params.page_width becomes page_width. Do not nest page keys under a ui: block: the theme does not read one and does not warn about it either, so the setting silently has no effect. When a key seems to do nothing, check its name and placement against these tables first.

content/docs/wide-reference.md
---
title: Compatibility matrix
weight: 40
page_width: wide
footer_style: slim
image_zoom: true
section_index: list
---

A section’s cascade uses the same names one level deeper and applies them to every page beneath it:

content/docs/reference/_index.md
cascade:
  pager: false
  section_index: list

When several places set the same key, the most specific wins:

  1. the page’s own front matter;
  2. the nearest cascade above it;
  3. the site parameter in hugo.yml.

A Default of “site value” means the key falls back to the site parameter of the same name. An invalid value warns and the page uses the default shown here, as described in Configuration; the tables mention a fallback only where it differs. Keys that OINK has renamed or retired are not listed: the build warns when it meets one, and Upgrade has the replacements.

Basics

Every page uses a few of these, and title is the one it cannot do without.

title , string , default—
Page heading, browser title and search result title. Required on every page
linkTitle , string , defaulttitle
Short name in the sidebar, breadcrumbs, pager and cards
description , string , default—
One-sentence summary for section cards, search snippets and meta description. Blog pages also show it as an introduction above the body
weight , integer , default0
Order among siblings; use multiples of 10. 0 (unset) sorts after every page with a weight. See Organizing content
draft , boolean , defaultfalse
A draft never reaches the build output; preview it with hugo server -D. See Writing pages
date , date , default—
Blog date and release-page sort key. A future date keeps the page out of the build by default
lastmod , date , defaultGit commit time
The page-end “last modified” time. With enableGitInfo on, Git supplies it and you need not write it
aliases , string array , default—
Old paths that redirect to this page, for when a page moves
type , string , defaulttop-level directory name
Picks the template and the shell: docs, book, blog, swagger, expo. See Organizing content
layout , string , default—
Picks a layout for one page: landing or releases
cascade , map , default—
Applies the keys below to the whole subtree

Reach for these when a page belongs somewhere else in the sidebar, or nowhere, or when a section index should list its children differently. Organizing content shows how they combine.

icon , Font Awesome class pair , default—
Icon in the sidebar, section cards and search results, such as fa-solid fa-rocket
toc_hide , boolean , defaultfalse
Removes this page and its subtree from the sidebar and the pager sequence, in content-derived and explicit trees alike
hide_summary , boolean , defaultfalse
Leaves the page out of its section index
sidebar_divider , boolean , defaultfalse
Turns the entry into a group heading without a link, which the pager skips; a section marked this way still lists its children. For a group with no page of its own, use build.render: never instead (group without a page)
sidebar_expanded , boolean , defaulttrue for blog sections, false otherwise
Opens this section in the sidebar by default
sidebar_root_for , self / children , default—
Makes this section the root of the sidebar tree. self includes the section index; children covers only its descendants. Any other value warns and is ignored
sidebar_root_menu , boolean , defaulttrue
Offers a top-level section or nested self-root in the sidebar’s root switcher. An excluded root still shows as the current location while you are inside it
toc_root , boolean , defaultfalse
When the sidebar root is the site home, removes this whole top-level section from the tree and the pager sequence
no_list , boolean , defaultfalse
The section index lists no children
simple_list , boolean , defaultfalse
The section index lists children as a compact bulleted list
section_index , list / cards , defaultsite value (list)
Style of the section index
section_index_columns , integer , default2
Column count of the card style
notoc , boolean , defaultfalse
Hides the outline in the right rail
pager , boolean , defaultdecided by params.ui.pager_types
false removes previous / next from this page. A non-boolean warns and the page keeps its type’s setting
navbar_enabled , boolean , defaultsite value (true)
Whether this page renders the navbar
navbar_autohide , boolean , defaultsite value (false)
On desktop screens with a mouse, hides the navbar until the pointer nears the top edge or keyboard focus enters it. The home page ignores the site value and follows only its own front matter
breadcrumb , boolean , defaultshell default
Whether this page renders breadcrumbs. Docs and Book pages default on, Blog pages off
theme_color , string , defaultsite value
#rgb or #rrggbb accent for this page. In a section root’s cascade, it gives the whole section its own color. See Brand and appearance
theme_color_dark , string , defaultderived
The dark-mode accent. A page that overrides only theme_color under a cascade that sets this key inherits the cascade’s dark value, so override both. theme_color: false opts the page out of an inherited section color
page_context_menu , boolean , defaultsite value (true)
The page action menu on the title row: copy Markdown, edit this page, print and so on

Page shell

Change these when one page needs a different frame around its content: a wider column, no sidebar, a slimmer footer. Site defaults and their effects are in Layouts and page types.

page_width , normal / wide / full , defaultnormal
Width of the content column
reading_width , slim / normal / wide , defaultnormal
Line length on Book pages. Applies only to type: book
body_class , string , default—
A class added to <body> for the site’s own CSS
reading_time , boolean , defaultsite value
Whether this page shows a reading time
sidebar_enabled , boolean , defaulttrue
false hides the left sidebar on this page
scroll_spy , boolean , defaultsite value
Accepted and ignored: the outline always highlights the heading you are reading
keyboard_nav , boolean , defaultsite value (true)
Single-key keyboard navigation. See Keyboard navigation
lastmod_commit , subject / hash / none , defaultsubject
What follows “last modified”: the commit subject, its hash, or nothing
sidebar_expand_levels, sidebar_menu_compact, sidebar_menu_foldable, sidebar_item_overflow , as the site parameter , defaultsite value
Per-page sidebar behavior; the values are in Configuration
sidebar_width_min, sidebar_width_max , positive integer , defaultsite value (220 / 480)
Limits for resizing the desktop sidebar on this page. A minimum above its maximum warns and restores the site pair
code_copy , boolean , defaultsite value (true)
Default copy button on this page’s code blocks. A fence’s own copy= wins
rich_copy , boolean , defaultsite value (true)
Typeset HTML copy for prose selections pasted into rich-text editors
toc_style , fixed / flow , defaultsite value (fixed)
A fixed right-rail panel, or a wider rail that starts in the content flow
toc_taxonomies , boolean , defaultsite value (true)
Whether taxonomy clouds join the outline in the right rail
taxonomy_icons , map , defaultsite value
Per-taxonomy icon overrides for this page, or for a section through cascade

Use these to make the right page rank first for a query, or to keep a page out of search entirely. The guide is Search.

search_keywords , string or string array , default—
Extra search terms: synonyms, abbreviations, other languages
search_boost , positive number , default1.0
Ranking multiplier: the final score is the text match score times this value. A non-numeric, infinite, zero or negative value falls back to 1.0
search_exclude , boolean , defaultfalse
Keeps the page out of the local index

Output formats

Set these when a page should not get a Markdown copy or should stay out of the printed chapter. The guides are AI-agent support (.md and llms.txt) and Print.

outputs , string array , defaultsite outputs
The output formats this page generates. [HTML] drops its .md version
no_print , boolean , defaultfalse
Leaves the page out of the whole-chapter and whole-book print view

Page end: comments, feedback and provenance

These decide what follows the article. The order is fixed: share bar, then feedback, then provenance, then the pager, then comments. See Writing pages.

comments , boolean , defaultsite params.comments.enable (false)
Whether this page shows the giscus comment section. See Comments
feedback , boolean or map , defaultsite params.ui.feedback (off)
The “was this page helpful?” widget. The map form takes enable and reasons
annotation , boolean , defaultsite params.ui.annotation (on)
The “last modified” and provenance block at the page end
translation_notice , language code or false , defaultsite params.ui.translation_notice (off)
The language of the authoritative version, so a translation can say so and link back. Write false on a page written natively in this language

Upstream attribution

Declare a source when a page is adapted from someone else’s material. The provenance line at the page end then names the work, the copyright holder and the license, and links to the full notice. Values resolve from the site parameters, then the data/upstreams entry named by upstream_source, then the page’s front matter; the most specific declaration wins.

upstream_link itself is read only from front matter (a cascade counts, a site parameter does not), because a site-wide value would make every page claim the same source.

upstream_name , string , default—
Name of the upstream work, as the credit shows it. Required once upstream_link is set
upstream_license , SPDX identifier , default—
Must appear in data/licenses. Required
upstream_notice , site path or URL , default—
Page carrying the full notice: license text, warranty disclaimer, upstream NOTICE, snapshot pin. Required
upstream_ref , string , default—
Tag or commit of the snapshot, shown in parentheses after the work
upstream_source , string , defaultsite parameter
Entry in data/upstreams that holds upstream facts shared by many pages
upstream_modified , boolean , defaultfalse
Changes the credit to say the work was adapted. When the site has repository information, the same sentence also links to the page’s history. A non-boolean is treated as false

The attribution is all or nothing, because a partial credit misleads readers more than an obvious gap. A companion key without upstream_link, a missing required key, a license not found in data/licenses or an unknown upstream_source entry each warns and omits the whole attribution. The theme ships an SPDX table at data/licenses.yaml; a site adds or overrides entries with a file of the same name.

Image zoom

Turn this on for pages of screenshots or diagrams that readers need to see at full size.

image_zoom , boolean , defaultsite value (false)
Whether images on this page open full size when clicked. See Images

Blog posts

Posts use these for bylines, series and featured images, and blog sections use them to choose the post index. The guide is Blog posts; List layouts compares the four index layouts.

author , string , default—
Post byline; inline Markdown is allowed. Ignored on a page that has authors
authors , string array , default—
Terms of the authors taxonomy, in byline order. Needs author: authors under taxonomies:. See Authors and bylines
series , string array , default—
Terms of the series taxonomy; the strip above the body uses the first one. See Series
series_weight , integer , default—
Place in the series. Weighted members come first in ascending order, the rest follow by ascending date
tags , string array , default—
Tags. See Taxonomies
categories , string array , default—
Categories, likewise
images , string array , default—
The first entry is the post’s featured image and share card. In a section’s cascade, it sets a default for the section. images: [] opts a page out of an inherited value, but does not hide an image the page bundle supplies as featured, cover or thumbnail
byline , string , default—
Credit shown with the featured image wherever that image is rendered
blog_index , list / cards / table / gallery , defaultsite value (list)
Layout of the blog section’s post index. table always lists the whole section without pagination
blog_index_columns , positive integer , defaultsite value (3)
Card columns at wide breakpoints; medium and narrow screens keep their own limits
blog_index_size , positive integer , defaultsite value (12)
Posts per page for list, cards and gallery, and for all four views when switching is on. A standalone table ignores it
blog_index_toggle , boolean , defaultsite value (false)
Publishes all four layouts with a switch that remembers the reader’s choice. When false, only the configured layout is published and saved choices are ignored
share , string array or false , defaultsite params.ui.share (empty)
Share targets at the page end. Replaces any inherited list; false opts the page out; an unknown target warns and is dropped. See Share
summary , string , default—
Excerpt for gallery entries and for post rows on tag and category pages when description is absent

Book

A book sets type: book on its section through cascade; these keys then number chapters and mark drafts. The guide is Books.

book_number , string , default—
Chapter number, shown before the page title and the sidebar entry
book_status , draft , default—
Marks an unfinished chapter: flagged in the sidebar and contents; book-toc with drafts=false leaves it out
sidebar_headings , false / true / integer 2–4 , defaultsite value (false)
Lists the current page’s headings under its sidebar entry, down to the given level; true means h2
book_draft_banner , boolean , defaultsite value (false)
Adds a banner at the top of a draft chapter

Expo albums

An album page (type: expo) reads its images and opening arrangement from this block. The guide is Expo albums.

expo , map , defaultsite params.ui.expo
Replaces the site block; absent fields use the defaults below
expo.images , string , defaultimages/*
Pattern matching the image resources in the page bundle
expo.mode , wall / cards / seamless , defaultwall
Arrangement shown until the reader picks one
expo.size , integer , default240
Target tile size from 160 to 360 CSS pixels; a size the reader saved wins

Titles, captions, credits, weights, explicit IDs and separate originals for individual images use Hugo’s native resources metadata; see Image metadata.

Landing

A page with layout: landing builds its sections from a data file or from its own front matter. The guide is Home and landing pages.

landing , string , default—
Reads the sections from data/landing/<key>/<language>.yaml
sections , array , default—
Section definitions written in the front matter, taking precedence over landing. A value that is not an array warns and renders no sections

Release pages

A release note names its GitHub release with one key, and a section with layout: releases lists those pages newest first by date and then SemVer, ignoring weight. The guide is Releases and downloads.

release_url , string , default—
One GitHub release URL, https://github.com/<owner>/<repo>/releases/tag/<tag>. The theme derives the owner, project, tag and source archive links from it and takes the date from the page’s date; download assets come from a checksums block in the body. Any other value warns and the release block is skipped