Skip to content
uencoder

JSON Frontmatter

JSON frontmatter uses a {...} block as the metadata of a Markdown document, a JSON alternative to YAML/TOML frontmatter.

Purpose

To use standard JSON in Markdown metadata, ensuring strict syntax and types, which suits programmatic generation.

Mechanism

The file starts with { opening a JSON object and ends at the matching }; the Markdown body follows. Some tools (e.g., Assemble) support JSON frontmatter.

Use cases

  • Programmatically generated document metadata
  • Strict JSON frontmatter
  • Markdown headers

Related tools

References