Note formats¶
To keep your notebooks future-proof, zk
uses a simple plain
text format for your notes. Only Markdown is supported at the moment, but more
formats may be added in the future.
Markdown¶
You can set up some features of zk
’s Markdown parser from your
configuration file, under the [format.markdown]
section.
Setting |
Default |
Description |
---|---|---|
|
|
Format used to generate internal links ( |
|
|
Percent-encode paths of generated internal links |
|
|
Remove the path file extension of generated internal links |
|
|
Enable |
|
|
Enable |
|
|
Enable Bear’s |
Paths are not percent-encoded by default, unless the
link-format
ismarkdown
.
Customizing the Markdown links generated by zk
¶
By default, zk
will generate regular Markdown links for internal links. If you
prefer to use [[Wiki Links]]
instead, set the link-format
setting to wiki
.
If you want to override completely the link format, you can also set
link-format
to a custom template. For example, to generate a
wiki link using an ID from the frontmatter and a title:
[format.markdown]
link-format = "[[{{metadata.id}}|{{title}}]]"
The following variables are available in the template:
Variable |
Type |
Description |
---|---|---|
|
string |
Filename of the note |
|
string |
File path to the note, relative to the notebook directory |
|
string |
Absolute file path to the note |
|
string |
File path to the note, relative to the current directory |
|
string |
Note title |
|
map |
YAML frontmatter metadata, e.g. |
YAML keys are normalized to lower case.