
If you’ve ever opened a Markdown file in a modern dev project and saw three dashes at the top with some random-looking key-value pairs… You probably thought:
“What the hell is frontmatter and why is it staring at me first thing in the file?”
Let’s fix that in 2 minutes.
Frontmatter is metadata you place at the top of a Markdown file.
Like a tiny JSON/YAML passport that tells your site generator:
It always sits at the top, wrapped in
---Example:
--- title: "WTF is Frontmatter?" date: "2025-12-07" tags: ["dev", "web", "static-sites"] image: "/imgs/frontmatter.png" description: "A no-nonsense guide to frontmatter." ---
That’s it. It looks simple… because it is.
But it’s stupidly powerful.
Because Markdown alone is dumb. It only knows how to format text.
But modern sites need more:
Instead of stuffing these into filenames or code, we keep them in one neat block at the top.
Frontmatter = content + config in one file.
Almost everywhere in modern content systems:
If you’ve built a docs site, portfolio, blog, or design system recently… You’ve touched frontmatter (even if you ignored it like a red flag text).
When your site builds, it:
Example result:
draft: trueimage:All automated.
Because it’s the one place where everyone speaks the same language.
One block. No dev ops. No database. No dashboard.
Just Markdown with a brain.
If you remember nothing:
Frontmatter is the metadata block at the top of a Markdown file that tells your site how to treat the page.
It’s simple. It’s universal. And once you get it, your entire content workflow becomes cleaner.