Skip to content

FAQ

Frequent questions about frontmatter: why YAML is the default, whether to use TOML, and how to handle special characters.

Why YAML and not TOML?

YAML is more readable for hand editing and has a wider ecosystem. TOML is stricter but less expressive for nested structures.

Can I mix YAML and TOML?

In Hugo, yes, per file. In most other tools, pick one. Mixing within a project is a configuration trap.

How do I handle a value with a colon?

Quote it: title: "Writing: a slug".

What if I need to put code in frontmatter?

Don't. Frontmatter is for metadata. Code goes in the body, or in a fenced block.