zk/docs/notebook.md
2021-03-18 19:47:49 +01:00

1.1 KiB

Notebook

A notebook is a directory containing a collection of notes managed by zk. Notebooks cannot be nested, but you are free to organize your notes in subdirectories.

To create a new notebook, simply run zk init [<directory>].

Most zk commands are operating "Git-style" on the notebook containing the current working directory (or one of its parents). However, you can explicitly set which notebook to use with --notebook-dir or the ZK_NOTEBOOK_DIR environment variable. Setting ZK_NOTEBOOK_DIR in your shell configuration (e.g. ~/.profile) can be used to define a default notebook which zk commands will use when the working directory is not in another notebook.

Anatomy of a notebook

Similarly to Git, a notebook is identified by the presence of a .zk directory at its root. This directory contains the only zk-specific files in your notebook: