Structured description

Metadata Structures

How YAML frontmatter turns loose notes into described records, how to design a schema that ages well, and the quality rules that keep metadata honest.

Frontmatter anatomy
Schema design choices
Data-quality rules

An educational overview

Describing information so it can be found

Metadata is structured description: short, typed values that say what a record is without repeating its content. In a Markdown note, that description usually lives in a YAML frontmatter block at the top of the file, leaving the body free for prose.

The fictional examples below follow the same 30-record reading collection used across this publication. A good structure answers later questions without forcing you to reread every note.

01 · Purpose

What metadata does

Metadata separates description from content. The body of a note can ramble, quote, and reflect; the metadata block stays compact and predictable so tools can index, filter, and display records consistently.

Jobs metadata performs

JobField that does itExample
IdentifyTitleMaterials and Form
ClassifyCategory, TagsArchitecture; design
Track stateStatus, ReviewedIn Progress; false
MeasurePages Read, Total Pages84 of 240
Place in timeStarted2026-04-10

Description vs. content

---
Title: Materials and Form
Status: In Progress
---

The body below is content.
The block above is metadata.

When a fact needs to be searched, sorted, or counted across notes, record it as metadata once — don’t bury the answer inside prose.

02 · The container

Frontmatter anatomy

YAML frontmatter sits between two lines of three hyphens at the very start of a note. Each line inside is a key, a colon, and a value; indented entries belong to the key above them.

Reading order

LineRole
---Opens the metadata block
Key: valueOne property per line
  - itemList entries under a key
---Closes the block
Everything afterNote body

Frontmatter skeleton

---
Title: Materials and Form
Category:
  - Architecture
  - Design
Status: In Progress
Started: 2026-04-10
Total Pages: 240
Pages Read: 84
Reviewed: false
---

Body text begins here.

Keep both delimiters on their own lines. Text before the opening delimiter or a missing closing delimiter breaks the block for most tools that parse it.

03 · Planning the fields

Designing a schema

A schema is a deliberate list of fields with agreed names and types. Designing it means deciding which questions the collection must answer — and leaving out everything else.

Design prompts

PromptField it produced
Which records are unfinished?Status (Text)
Which subject groups exist?Category (List)
How much progress is made?Pages Read + Total Pages (Number)
Which order did work start?Started (Date)

Keep the schema small

# Eight fields cover the
# reading collection's needs:
Title, Category, Status,
Started, Total Pages,
Pages Read, Reviewed, Tags

Start with fields a view will actually use. A smaller schema gets filled in; an ambitious one gets abandoned halfway through the collection.

04 · How values are written

YAML value forms

YAML has a written form for each kind of value. The written form and the application’s property type are related but distinct: YAML is how the value is stored, the type is how it is interpreted and displayed.

Forms by type

KindYAML formExample
TextPlain scalarStatus: In Progress
NumberUnquoted digitsPages Read: 84
DateYYYY-MM-DDStarted: 2026-04-10
ListIndented dashesCategory: then - item
Checkboxtrue / falseReviewed: false

One list, two entries

---
Category:
  - Architecture
  - Design
---

# Not this single string:
# Category: "Architecture, Design"

A comma-separated text value is still one string. Store entries as separate list items when filters need to match each one independently.

05 · Honest data

Data-quality rules

Metadata is only useful if it stays truthful. Three rules keep a schema from quietly producing wrong answers: one name per meaning, the right type per field, and a clear distinction between missing, false, and zero.

Rules and their failures

RuleFailure it prevents
One name per meaningSplit records and dropped results
Right type per fieldBad sorts and broken comparisons
Absence stays absentUnknowns masquerading as zero
Check before dividingMeaningless progress percentages

Progress checks

Pages Read / Total Pages x 100

if Total Pages is missing:
   show "Not available"
if Total Pages is 0:
   show "Not applicable"
if Status is Completed:
   show "Completed"

These rules matter most at collection scale: one sloppy record is a footnote; thirty of them is a dataset that lies.

06 · Putting it together

A worked frontmatter

The fictional record below combines every rule on this page: consistent names, correct types, a real list, an explicit false, and no invented values.

Complete record metadata

---
Title: Materials and Form
Category:
  - Architecture
  - Design
Status: In Progress
Started: 2026-04-10
Total Pages: 240
Pages Read: 84
Reviewed: false
tags:
  - design
  - materials
---

What this enables

View or filterResult
Status is In ProgressRecord included
Category contains DesignRecord included
Sort by StartedChronological order
Progress display35%

Every field here was chosen to answer a question. That discipline — not the number of fields — is what makes a metadata structure worth keeping.