Check Hugo frontmatter before it breaks
Hugo’s friendly with frontmatter — until it isn’t. A draft: "true" (string instead of bool) gets ignored by --buildDrafts filtering. A missing date knocks a post out of RSS. A malformed YAML escape silently breaks the whole build. Paste a post here, get every issue called out before the build does.
What this checks
This is Hugo-flavored validation, not generic YAML linting. The rules are the ones that bite Hugo writers specifically — required fields Hugo expects, common type-mismatch footguns, and the YAML syntax errors that look fine but parse wrong.
- Required:
titleanddate(Hugo uses these in templates and feeds; missing them quietly degrades output) - Recommended:
sluganddescription(Hugo derives both if absent, but explicit gives you control over URLs and meta tags) - Type-mismatch warnings:
draft: "true"(string when should be bool — breaks--buildDrafts);tags:orcategories:as string instead of array; unparseable dates - Informational: custom fields,
weight,menu— listed for visibility, not flagged
Want this on every save, in your editor?
Textorium is the native Mac markdown app that validates frontmatter as you type. Type-aware widgets — date pickers for dates, toggles for booleans, token chips for tags. Astro Content Collections support with full Zod schema parsing. Hugo, Jekyll, and Eleventy too.
Get Textorium on the Mac App Store — $4.99, one-time purchase, no analytics in the app.
See the Hugo workflow features →
FAQ
Does this upload my content? No. Validation runs entirely in your browser — your post never leaves your Mac. Open Network tab in your browser’s developer tools to verify; you’ll see one request for the validator JavaScript and nothing else.
Why is draft: "true" flagged?
Because Hugo treats string "true" and bool true differently. The --buildDrafts flag matches on the bool; if you’ve quoted it, your draft post will publish to your built site whether you wanted it to or not. One of the more painful debugging stories in the Hugo community — the post looks like a draft until it’s live.
What about Jekyll or Eleventy frontmatter?
Most fields validate fine — title, date, tags mean roughly the same thing across SSGs. But the failure modes flagged here are Hugo-specific. The Mac app handles Jekyll, Eleventy, and Astro frontmatter natively, with SSG-aware rules.
What about Astro Content Collections with Zod schemas?
Out of scope for this lightweight tool — Zod is a TypeScript-only thing and parsing it in a browser without a TS runtime is its own project. The Mac app does it: it reads your src/content/config.ts, extracts the Zod schema, and gives you type-aware editing for every field. That’s the upgrade path if you’ve moved your Hugo or Jekyll content to Astro.
Why doesn’t it catch [seo] block keys, taxonomy fields, or custom Hugo params?
Custom fields are listed informationally — they’re not wrong, just not part of Hugo’s core required set. Validating them properly needs your hugo.toml for archetype rules. The Mac app does that on disk; this tool stays lightweight.
My YAML has anchors / multi-line strings / custom tags — will those parse? Standard YAML 1.2 should parse, including most multi-line forms. Anchors and custom tags are uncommon in Hugo frontmatter; if a file fails to parse, the syntax error gets reported with as much detail as js-yaml provides.