Frontmatter Syntax¶
Frontmatter syntax defines relations in your note's YAML header. This keeps relations organized and separate from your content—ideal for templates and structured note systems.
Three Formats¶
Trail supports three frontmatter formats. All create identical relations.
Property Format¶
The simplest format—use the relation name directly as a property key:
Alias Required
Property format only works if you've configured an alias of type Property for the relation. The default relations (up, down, next, prev) include this alias.
Dot Property Format¶
Namespace relations under relations.:
This avoids conflicts with other frontmatter properties.
Map Format¶
Group all relations under a relations key:
---
relations:
up: "[[Parent Note]]"
down:
- "[[Child 1]]"
- "[[Child 2]]"
next: "[[Following Note]]"
---
This is the most organized format for notes with many relations.
Single vs Multiple Values¶
Single Target¶
All three formats accept a single value:
Multiple Targets¶
Use YAML arrays for multiple targets:
up:
- "[[Parent 1]]"
- "[[Parent 2]]"
relations:
down:
- "[[Child A]]"
- "[[Child B]]"
- "[[Child C]]"
Inline arrays also work:
Link Formats¶
Frontmatter accepts flexible link formats:
Wiki Links¶
Plain Text¶
Trail resolves plain text to the matching note in your vault.
Quotes Required
Always quote your values. Unquoted wiki links cause YAML parsing errors:
Mixing Formats¶
You can use multiple formats in the same note:
---
up: "[[Category]]"
relations.next: "[[Part 2]]"
relations:
down:
- "[[Section A]]"
- "[[Section B]]"
---
Trail processes all formats and combines the relations.
Configuring Aliases¶
Each format requires a corresponding alias in your relation settings.
Default Aliases¶
The default relations include all three alias types:
| Relation | Property | Dot Property | Map |
|---|---|---|---|
up |
up |
relations.up |
relations: { up: } |
down |
down |
relations.down |
relations: { down: } |
next |
next |
relations.next |
relations: { next: } |
prev |
prev |
relations.prev |
relations: { prev: } |
Custom Aliases¶
For custom relations, add aliases in Settings → Trail:
- Create or select a relation
- Expand the Aliases section
- Add an alias with the desired type:
- Property: Direct key like
parent - Dot property: Namespaced like
relations.parent - Map: Key within
relations: { parent: }
You can have multiple aliases per relation:
| Relation | Aliases |
|---|---|
parent |
parent, relations.parent, up (Property type) |
This lets up: "[[Note]]" and parent: "[[Note]]" both create parent relations.
Examples¶
Academic Paper¶
---
relations:
up: "[[Research Projects]]"
cites:
- "[[Smith 2020]]"
- "[[Jones 2019]]"
- "[[Lee 2021]]"
continues: "[[Draft v1]]"
---
Book Chapter¶
Person in Family Tree¶
---
relations:
parent:
- "[[Alice Smith]]"
- "[[Bob Smith]]"
spouse: "[[Carol Smith]]"
child:
- "[[David Smith]]"
- "[[Eve Smith]]"
---
Troubleshooting¶
Relations Not Detected¶
- Check aliases: Ensure your relation has an alias matching the format you're using
- Check quotes: All values must be quoted
- Check YAML validity: Use Obsidian's Properties view to verify frontmatter parses correctly
Property Conflicts¶
If another plugin uses the same property name:
- Use dot property format:
relations.upinstead ofup - Use map format:
relations: { up: }to namespace everything
Case Sensitivity¶
Property names are case-insensitive for Trail: