Note configuration¶
The [note]
section from the configuration file is used to set the note creation rules. The following properties are customizable:
language
(string)Two-letters code of the language used when writing notes, e.g.
en
.This is used to generate slugs or with date formats. For now, only English is fully supported.
default-title
(string)The default title used for new notes when no
--title
option is provided.
filename
(string)Template used to generate the note filename, without its file extension.
extension
(string)File extension for the generated note. By default,
md
(Markdown) is used.
template
(string)Path to the template used to generate the note content.
Either an absolute path, or relative to
.zk/templates/
.
exclude
(list of strings)List of path globs excluded during note indexing.
id-charset
(string)Characters set used to generate random IDs.
You can use:
letters
for characters froma
toz
numbers
for characters from0
to9
alphanum
forletters
+numbers
hex
for characters froma
tof
and0
to9
a free string for custom characters
id-length
(integer)Length of the generated random IDs.
id-case
(enum)Letter case for the generated random IDs.
Possible values are
lower
,upper
ormixed
.
Common filename templates¶
Here are some common filename patterns you may want to use:
{{id}}
– e.g.i2hn8.md
{{slug title}}
– e.g.an-interesting-concept.md
A slugified version of the title given with
--title
.Readable and practical for web servers, but fragile in case of renaming.
{{id}}-{{slug title}}
– e.g.i2hn8-an-interesting-concept.md
The best of both worlds? Readable but if you link only with the prefix ID, you can rename without breaking links.
{{format-date now 'timestamp'}}
– e.g.200911172034.md
Verbose, but sortable by creation date and stable.
{{format-date now 'timestamp'}} {{title}}
– e.g.200911172034 An interesting concept.md
The format of The Archive and sirupsen’s zk.
{{format-date now '%Y-%m-%d'}}
– e.g.2009-11-17.md
Sortable, human-friendly format for a daily journal.