1.5 KiB
Note group
A group is a named configuration section used to override note creation rules for specific directories. This allows you to use your notebook very differently depending on the type of note created. For a practical example, take a look at maintaining a daily journal.
Declaring a new group
To add a new group to your configuration file, declare a new [group.<name>]
section. It takes a single optional property paths
, which is the list of directories belonging to this group.
[group.journal]
paths = [
"journal/daily",
"journal/weekly"
]
You can also use glob patterns in paths
.
[group.journal]
paths = ["journal/*"]
If you omit paths
, the directory named after the group will be inferred. Note the double quotes when using spaces or slashes for subdirectories.
# This will automatically apply to the `citations/web` directory
[group."citations/web"]
Overriding note configuration and extra variables
You can override the global note configuration and extra user variables for a given group.
[group.journal.note]
filename = "{{date now}}"
template = "journal.md"
[group.journal.extra]
author = "Mickaël"
Choose a group dynamically
If you prefer to keep multiple groups in a single directory, you can specify which group to use when creating a new note explicitly.
$ zk new --group journal