Front matter generator
Updated
Pick your static site generator, fill in title, date, tags, and slug, and get front matter with the right key names and every value quoted correctly — as YAML, TOML, or JSON. The validate pane explains which strings had to be quoted and why.
Generator
Hugo accepts YAML (---), TOML (+++), or JSON ({ }) front matter — this tool emits all three.
Custom fields
---
title: Why we moved our docs to markdown
description: "Notes on migrating 400 pages: what broke, what got faster."
date: 2026-09-03T05:31:00+00:00
slug: why-we-moved-our-docs-to-markdown
tags:
- markdown
- docs
categories:
- engineering
draft: true
---Which front matter keys does each generator expect?
The same idea has a different name in every tool. Jekyll wants layout and permalink; Hugo uses slug, lastmod, and weight; Astro content collections use pubDate, updatedDate, and heroImage; Docusaurus orders pages with sidebar_position; Obsidian's built-in properties are tags, aliases, and cssclasses. The presets above set the right names and hide fields the generator ignores. Anything else — a series, featured: true, a reading-time override — goes in the custom fields with an explicit type so numbers and booleans are not emitted as strings.
Why does a wrong front matter value break the build?
Because YAML is typed. title: 2026 Roadmap is fine, but title: 2026 is an integer, version: 1.10 becomes 1.1, published: no is the boolean false, and description: Note: read this first is a parse error. Astro and Docusaurus validate front matter against a schema and refuse the page; Hugo and Jekyll silently use the wrong value. Quoting the string, which the generator does automatically, removes the ambiguity. The markdown linter catches the other common mistake — text before the opening ---, which turns the whole block into a horizontal rule.
What else goes at the top of a post?
After the front matter, a level-one heading if your theme does not print the title, then the body. The cheat sheet covers the syntax; the table of contents generator adds a linked outline for long posts; the word counter gives you the reading time some themes expect as a field.
What is front matter in markdown?
A block of metadata at the very top of a markdown file, fenced by --- lines for YAML (or +++ for TOML), holding fields like title, date, tags, and draft. Static site generators such as Jekyll, Hugo, Astro, and Docusaurus read it to build the page; Obsidian shows it as note properties.
When does a YAML value need quotes?
When a bare value would be parsed as something other than text: yes, no, on, off, true, false, and null become booleans or null; 1.10 becomes the number 1.1; 2026-09-03 becomes a date; anything starting with a character like *, &, !, %, @, [, {, or # is a YAML indicator; and a “: ” inside the value starts a nested mapping. This tool quotes exactly those cases.
Which date format should I use?
ISO 8601. A full date-time with timezone offset, 2026-09-03T14:30:00+02:00, is unambiguous everywhere; a bare date like 2026-09-03 is fine when time of day does not matter. Hugo, Astro, and Jekyll all accept both.
Does Hugo use YAML or TOML front matter?
Either, plus JSON. YAML is fenced with ---, TOML with +++, JSON with a bare { } object. Hugo detects the format from the fence, so choose whichever your existing content uses.
How do tags differ from categories?
By convention categories are broad, few, and hierarchical (one or two per post), while tags are many and specific. Jekyll, Hugo, and Gatsby treat both as taxonomies that generate listing pages; Astro and Docusaurus only have tags by default.