Template context when formatting a noteΒΆ
The following variables are available in the templates used when formatting
notes, for example with zk list --format <template>
.
Variable |
Type |
Description |
---|---|---|
|
string |
Filename of the note, including its extension |
|
string |
Filename of the note without the file extension |
|
string |
File path to the note, relative to the current directory |
|
string |
File path to the note, absolute path including the notebook directory |
|
string |
Note title |
|
string |
Markdown link to the note, relative to the current directory1 |
|
string |
First paragraph extracted from the note content |
|
string |
All of the note content, minus the heading |
|
[string] |
List of context-sensitive relevant excerpts from the note |
|
string |
The full raw content of the note file |
|
int |
Number of words in the note |
|
[string] |
List of tags found in the note |
|
map |
YAML frontmatter metadata, e.g. |
|
date |
Date of creation of the note |
|
date |
Last date of modification of the note |
|
string |
SHA-256 checksum of the note file |
The format of the generated Markdown links can be customized in the note format configuration.
YAML keys are normalized to lower case.