Markdown Frontmatter Generator

Fill in the form and copy the generated frontmatter block.

Format:
Custom key-value pairs (up to 5)
Output

    
About this tool

Markdown Frontmatter Generator

Frontmatter Generator builds the YAML or TOML metadata block that sits at the top of a post in a static site generator, with fields for title, date, slug, author and tags, plus any custom fields you add.

How to use it

  1. Fill in the title, date, author and tags. The slug is generated from the title automatically.
  2. Add any custom fields your site needs.
  3. Switch between YAML and TOML output.
  4. Copy the block to the top of your post file.

YAML or TOML, and where each is used

Frontmatter is a metadata block at the very top of a content file, separated from the body by delimiters. YAML frontmatter is fenced by three hyphens and is the default in Jekyll, Eleventy, Astro and most of the ecosystem. TOML frontmatter is fenced by three plus signs and is common in Hugo.

The format has to match what your generator expects, and the opening delimiter must be the first line of the file. A single blank line above it and the generator will treat the whole block as body text.

Worked example

A minimal YAML block:

  • Opening---
  • Fieldstitle, date, slug, tags
  • Closing---

Result: Three hyphens, the fields, three hyphens, then the post body. The opening delimiter must be line one.

When it helps

  • Starting a new blog post with correctly formed metadata.
  • Adding a custom field consistently across posts.
  • Switching a site between YAML and TOML conventions.
  • Avoiding the YAML quoting errors that break a build.

Common mistakes

  • Leaving a colon unquoted inside a title. YAML reads it as a key separator and the build fails.
  • Putting a blank line before the opening delimiter, which stops it being recognised as frontmatter.
  • Using the wrong date format. Most generators want ISO 8601, and a locale-formatted date will either fail or sort wrongly.
Markdown Frontmatter Generator interface preview
Screenshot of the live Markdown Frontmatter Generator interface.