Page parameters
Front matter lets one page, or a whole section through cascade, depart from
the site-wide settings in hugo.yml: a wide layout for one reference table, no
pager on a landing page, comments on blog posts but not on the docs. The keys
below are every page key OINK reads, grouped by what they change. Hugo’s own
fields (slug, url, build, sitemap, expiryDate and the rest) work as
usual and are documented by
Hugo. Site parameters
are in Configuration.
How page keys work
A page key is the site key without params. and ui., written at the top
level of the front matter. The site’s params.ui.section_index becomes
section_index on a page, and params.page_width becomes page_width. Do not
nest page keys under a ui: block: the theme does not read one and does not
warn about it either, so the setting silently has no effect. When a key seems
to do nothing, check its name and placement against these tables first.
A section’s cascade uses the same names one level deeper and applies them to
every page beneath it:
When several places set the same key, the most specific wins:
- the page’s own front matter;
- the nearest
cascadeabove it; - the site parameter in
hugo.yml.
A Default of “site value” means the key falls back to the site parameter of the same name. An invalid value warns and the page uses the default shown here, as described in Configuration; the tables mention a fallback only where it differs. Keys that OINK has renamed or retired are not listed: the build warns when it meets one, and Upgrade has the replacements.
Basics
Every page uses a few of these, and title is the one it cannot do without.
description, ,- One-sentence summary for section cards, search snippets and
meta description. Blog pages also show it as an introduction above the body weight, ,- Order among siblings; use multiples of 10.
0(unset) sorts after every page with a weight. See Organizing content draft, ,- A draft never reaches the build output; preview it with
hugo server -D. See Writing pages date, ,- Blog date and release-page sort key. A future date keeps the page out of the build by default
lastmod, ,- The page-end “last modified” time. With
enableGitInfoon, Git supplies it and you need not write it type, ,- Picks the template and the shell:
docs,book,blog,swagger,expo. See Organizing content
Sidebar and navigation
Reach for these when a page belongs somewhere else in the sidebar, or nowhere, or when a section index should list its children differently. Organizing content shows how they combine.
toc_hide, ,- Removes this page and its subtree from the sidebar and the pager sequence, in content-derived and explicit trees alike
sidebar_divider, ,- 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: neverinstead (group without a page) sidebar_root_for, ,- Makes this section the root of the sidebar tree.
selfincludes the section index;childrencovers only its descendants. Any other value warns and is ignored sidebar_root_link_self, ,- The root row links to the section itself;
falselinks it to the parent section instead toc_root, ,- When the sidebar root is the site home, removes this whole top-level section from the tree and the pager sequence
pager, ,falseremoves previous / next from this page. A non-boolean warns and the page keeps its type’s settingbreadcrumb, ,- Whether this page renders breadcrumbs. Docs and Book pages default on, Blog pages off
theme_color, ,#rgbor#rrggbbaccent for this page. In a section root’scascade, it gives the whole section its own color. See Brand and appearance
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.
Search
Use these to make the right page rank first for a query, or to keep a page out of search entirely. The guide is Search.
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.
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, ,- Whether this page shows the giscus comment section. See Comments
backlinks, ,- Lists the pages that link here in a “Backlinks” group beside the outline. A section can cascade it. See Navigation and menus
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.
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, ,- 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.
authors, ,- Terms of the
authorstaxonomy, in byline order. Needsauthor: authorsundertaxonomies:. See Authors and bylines series, ,- Terms of the
seriestaxonomy; the strip above the body uses the first one. See Series series_weight, ,- Place in the series. Weighted members come first in ascending order, the rest follow by ascending date
tags, ,- Tags. See Taxonomies
images, ,- 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 asfeatured,coverorthumbnail featured_image, ,- How the post shows its featured image on the article itself;
heromakes a full-width image header blog_index, ,- Layout of the blog section’s post index.
tablealways lists the whole section without pagination blog_index_columns, ,- Card columns at wide breakpoints; medium and narrow screens keep their own limits
blog_index_size, ,- Posts per page for
list,cardsandgallery, and for all four views when switching is on. A standalonetableignores it blog_index_toggle, ,- Publishes all four layouts with a switch that remembers the reader’s choice. When
false, only the configured layout is published and saved choices are ignored blog_gallery, ,- Replaces the site’s whole gallery block; omitted fields use the built-in defaults. A reader’s saved mode and size win
Book
A book sets type: book on its section through cascade; these keys then
number chapters and mark drafts. The guide is Books.
Expo albums
An album page (type: expo) reads its images and opening arrangement from
this block. The guide is Expo albums.
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.
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, ,- 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’sdate; download assets come from achecksumsblock in the body. Any other value warns and the release block is skipped
Related
- Writing pages — the handful of keys every page needs
- Organizing content — what the sidebar and navigation keys do together
- Configuration — every site parameter in
hugo.yml