Use YAML with three hyphens, keep keys lowercase, use ISO 8601 dates, and validate the schema before generation.
Frontmatter that stays sane
Three hyphens, on their own lines
The delimiter is
---at the beginning of a line. Not---inline. Not---yaml.Lowercase keys
title,date,tags. NotTitleorTITLE. Consistency beats cleverness.ISO 8601 dates
2024-03-15T10:00:00-05:00. Ambiguous dates break on server timezone changes.Validate the schema
A frontmatter with the wrong type (string where array expected) fails at build time, hours after commit. Validate on save.