Skip to content

Hugo page schema

Built-in id: hugo:page:0.165

Published at https://hawkeyexl.github.io/manni/schemas/hugo/0.165.json. A $schema that names this URL resolves to the bundled copy, with no network call.

hugo:page:0.165 checks the front matter Hugo 0.165 reads from a .md page. It requires nothing, because Hugo builds a page with no front matter at all. That makes it a pure shape check. It catches what Hugo accepts without complaint and then acts on wrongly. It is one of the platform schemas, which say what a generator accepts rather than what your team agreed.

PropertyValue
Idhugo:page:0.165
TitleHugo front matter v0.165
Files it fits.md
DialectDraft 2020-12
Required fieldsNone
Additional propertiesAllowed (additionalProperties: true)
Reference kindbuiltin
On by defaultNo
Upstream referenceFront matter
JSONhugo/0.165.json

Hugo’s content root is content/, and a docs section usually sits under it:

manni.config.yaml
meta:
overrides:
- files: "content/**"
schemas:
- hugo:page:0.165

For a one-off run, pass the id directly:

Terminal window
manni meta validate content/ -s hugo:page:0.165

The 28 fields Hugo itself defines. Everything else you see in a Hugo site is a user-configured taxonomy or a custom parameter rather than something Hugo defines. It passes as an unknown key. That covers tags, categories, series, and whatever your theme reads.

FieldTypeNotes
title, linkTitle, description, summarystringNone required; Hugo derives a title from the file name.
date, lastmod, publishDate, expiryDatestringTyped, not format-checked. See the aside below.
draft, headless, isCJKLanguagebooleanA quoted "false" fails here, which is the point.
weightintegerLower sorts first. A quoted number sorts as a string.
aliases, keywords, outputsstring array
slug, url, layout, markup, type, translationKeystring
menusstring | array | mapOne menu, several, or a map of per-menu options.
cascademap | array of mapsThe array form carries a _target filter per entry.
buildmaplist, render, publishResources.
sitemapmapchangefreq is enumerated; priority is 0–1.
resourcesarrayEach entry needs src.
params, sitesmap

The two checks that pay for this schema are weight and draft. Both are routinely written quoted, both are accepted by Hugo without a word, and both then behave wrongly. A string weight sorts lexically, so "10" lands before "9". And draft: "false" is a non-empty string, which is truthy, so the page does not publish.

Allowed. Taxonomy terms such as tags and categories are configured per site rather than defined by Hugo, so they pass unchecked, as do custom parameters.

A page carrying the common fields, at legal values. This is test/fixtures/platform/hugo-valid.md, and it passes.

content/docs/cache.md
---
title: Configuring the cache
linkTitle: Cache
description: How Hugo's build cache works and when to clear it.
date: 2026-06-25
lastmod: 2026-07-01
draft: false
weight: 30
aliases:
- /old/cache/
keywords: [cache, build]
outputs: [html, json]
menus: main
params:
team: docs
build:
list: always
render: true
sitemap:
changefreq: weekly
priority: 0.5
resources:
- src: diagram.png
title: Cache diagram
---

A quoted weight is a string. Hugo accepts it and sorts it lexically:

test/fixtures/platform/hugo-bad-weight.md
---
title: Configuring the cache
weight: "30"
---
✗ test/fixtures/platform/hugo-bad-weight.md
/weight must be integer (line 3) [hugo:page:0.165]
1 file checked, 0 passed, 1 failed, 1 error

Drop the quotes. A quoted draft: "false" fails the same way, with /draft must be boolean.