NeuraCache
Wiki navigation

YAML Headers

YAML headers

πŸ’‘ YAML Headers are only available on iOS at the moment

YAML headers are a convenient way of attaching metadata to a file’s contents (e.g., source, tags, status). This is especially handy in Obsidian, which uses YAML headers for its properties.

Obsidian properties panel backed by a YAML header

How YAML Headers Work

Under the hood, Obsidian properties are stored as a YAML header defined at the top of a markdown file (if you are not using Obsidian, you can just write pure YAML in your editor):

---
tags:
  - tag1
  - tag2
key1:
  - value1
---

NeuraCache looks for the β€œtags” key and, if it finds it, applies the tags to all cards in that file. This is very similar to the tag groups introduced earlier β€” the only difference is that it’s much easier to manage these tags via Obsidian properties.

Comparison Example

Writing the tags on every card:

Question 1 #flashcard #tagA #tagB #tagC
Answer 1

Question 2 #flashcard #tagA #tagB #tagC
Answer 2

Question 3 #flashcard #tagA #tagB #tagC
Answer 3

gives the same result as a YAML header:

---
tags: 
	- tagA
	- tagB
	- tagC
---

Question 1 #flashcard
Answer 1

Question 2 #flashcard
Answer 2

Question 3 #flashcard
Answer 3

That’s it!