YAML Frontmatter
Zettel Notes support YAML frontmatter to define various note properties. It should be the first text in a note and defined by surrounding yaml with ---
and new line. For example following YAML sets note title as Note Title
.
---
title: Note Title
---
This is body of the note.
Following YAML properties are supported
- Title
- Tag(s)
- Author(s)
- Source or Url
- Bookmark or Pin or Star
- Id or uid : should be a number with minimum length of 6
To specify multiple sources for a note, use array format. eg.
---
source:
- https://google.com
- https://gmail.com
---
Tip
YAML frontmatter can also be specified as default text for notes that will be added to new notes in repository settings
YAML Variables
These are static variables, defined by ${yaml-property}$
in content of the note.
---
account: savings
---
We should have atleast ${account} type of account.
This will render as We should have atleast savings type of account
in view mode.
Apart from this following static YAML variables are supported. These variables are populated from the note.
${id}$
${title}$
${filename}$
${mdate}$
(Last modified date)${accessed}$
(Number of times note is opened)${wordcount}$
${$yyyyMM$}$
- In this variable
yyyyMM
will be replaced by the corresponding date time. To learn more about this format read official documentation.
Information
To disable YAML variables, toggle Settings > Editor and Viewer > YAML variables
.