YAML = “front-matter” metadata at the top of a note, wrapped in --- lines. Obsidian (and plugins like Dataview & Templater) read it to power tagging, aliases, queries, etc.
1. Anatomy of Front-Matter
md
---
title: My Great Note
aliases: ["Great Note", "GN"]
tags: [project, writing]
created: 2023-06-05
publish: false
---
• First --- opens the block; second --- closes it.
• Key : value pairs, no tabs, just spaces.
• Must be the very first lines of the file (no blank line before).
2. Common Keys & Patterns
Purpose
Key & Example
Notes
Title override
title: A Better Title
Obsidian shows filename in UI by default; plug-ins use title.
Alternate names
aliases: ["Alt 1", "Alt 2"]
Makes [[Alt 1]] link to this note.
Tags
tags: [book, #idea] or tags: book, idea
Either list or comma-sep string. “#” optional.
Date fields
created: 2023-06-05
ISO dates sort/query well.
Booleans
publish: false
Lowercase true / false.
Lists
languages: - Python - JS
Dash + space for each item.
Multiline string
description: > This note wraps across lines
> folds lines into one. Use `
3. Basic Workflow
Start a new note.
Type ---, press ↵, fill in keys, close with ---.
Save. Obsidian highlights the block in gray (default theme).
• Templater can read/update YAML (<% tp.frontmatter.tags %>).
4. Tips & Gotchas
✔️ Keep spacing consistent (2 spaces per indent works).
✔️ Strings with colons need quotes: "Chapter 1: Intro".
✔️ Arrays can be inline [a, b, c] or dashed list.
✔️ Obsidian ignores keys it doesn’t understand—safe to add anything.
❌ Do not mix tabs & spaces.
❌ Only one front-matter block per note.
5. Power Moves (Optional)
• Dataview inline fields: Status:: ❗ inside body if you prefer.
• Auto-fill YAML with Templater snippets: