mirror of
https://github.com/mickael-menu/zk
synced 2024-11-15 12:12:56 +00:00
2.8 KiB
2.8 KiB
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.
- Two-letters code of the language used when writing notes, e.g.
default-title
(string)- The default title used for new notes when no
--title
option is provided.
- The default title used for new notes when no
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.
- File extension for the generated note. By default,
template
(string)- Path to the template used to generate the note content.
- Either an absolute path, or relative to
.zk/templates/
.
ignore
(list of strings)- List of path globs ignored 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.
- A slugified version of the title given with
{{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.
{{date now 'timestamp'}}
– e.g.200911172034.md
- Verbose, but sortable by creation date and stable.
{{date now 'timestamp'}} {{title}}
– e.g.200911172034 An interesting concept.md
- The format of The Archive and sirupsen's zk.
{{date now '%Y-%m-%d'}}
– e.g.2009-11-17.md
- Sortable, human-friendly format for a daily journal.
- i.e. Maintaining a daily journal.