Template Walkthrough
To demonstrate the additions made to org-capture templates. Here, we explain the default template, reproduced below. You will find most of the elements of the template are similar to org-capture templates.
emacs-lisp
(("d" "default" plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n")
:unnarrowed t))- The template has short key
"d". If you have only one template, org-roam automatically chooses this template for you. - The template is given a description of
"default". plaintext is inserted. Other options include Org headings viaentry.- Notice that the
targetthat’s usually in Org-capture templates is missing here. "%?"is the template inserted on each call toorg-roam-capture-. This template means don’t insert any content, but place the cursor here.:targetis a compulsory specification in the Org-roam capture template. The first element of the list indicates the type of the target, the second element indicates the location of the captured node (note the target location undergoes Org template expansion like the body elements), and the rest of the elements indicate prefilled template that will be inserted and the position of the point will be adjusted for. The latter behavior varies from type to type of the capture target.:unnarrowed ttells org-capture to show the contents for the whole file, rather than narrowing to just the entry. This is part of the Org-capture templates.
See the org-roam-capture-templates documentation for more details and customization options.