Markdown front matter
Front matter is metadata at the very top of a markdown file, fenced by three dashes above and below. Static site generators, Obsidian and most note tools read it; a plain renderer ignores it or, worse, prints it.
---
title: Opening .md files
date: 2026-08-27
tags:
- markdown
- tools
draft: false
---
# The document starts heretitle: Opening .md files date: 2026-08-27 tags: - markdown - tools draft: false
The document starts here
This viewer lifts front matter out of the document and shows it as a metadata card, which is why a file with front matter does not open here with a stray horizontal rule and an enormous heading.
What usually goes wrong
- It must be the very first thing in the file. One blank line above it and it stops being front matter and becomes a horizontal rule followed by a heading.
- YAML is whitespace-sensitive and cares about tabs. Use spaces.
- A value containing a colon needs quotes:
title: "Markdown: a history". - Different tools expect different keys. Hugo, Jekyll, Astro and Obsidian all read front matter, and none of them agree on what goes in it.