Next: Org-roam Template Expansion, Up: The Templating System [Contents]
To demonstrate the additions made to org-capture templates. Here, we walkthrough the default template, reproduced below.
("d" "default" plain (function org-roam--capture-get-point) "%?" :file-name "%<%Y%m%d%H%M%S>-${slug}" :head "#+title: ${title}\n" :unnarrowed t)
"d"
. If you have only one template,
org-roam automatically chooses this template for you.
"default"
.
plain
text is inserted. Other options include Org headings via
entry
.
(function org-roam--capture-get-point)
should not be changed.
"%?"
is the template inserted on each call to org-roam-capture--capture
.
This template means don’t insert any content, but place the cursor
here.
:file-name
is the file-name template for a new note, if it doesn’t yet
exist. This creates a file at path that looks like
/path/to/org-roam-directory/20200213032037-foo.org
. This template also
allows you to specify if you want the note to go into a subdirectory. For
example, the template private/${slug}
will create notes in
/path/to/org-roam-directory/private
.
:head
contains the initial template to be inserted (once only), at
the beginning of the file. Here, the title global attribute is
inserted.
:unnarrowed t
tells org-capture to show the contents for the whole
file, rather than narrowing to just the entry.
Other options you may want to learn about include :immediate-finish
.