Files
org-roam/manual/Configuration.html
2020-11-10 13:32:22 +00:00

132 lines
5.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2020-2020 Jethro Kuan <jethrokuan95@gmail.com>
You can redistribute this document and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any
later version.
This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Configuration (Org-roam User Manual)</title>
<meta name="description" content="Configuration (Org-roam User Manual)">
<meta name="keywords" content="Configuration (Org-roam User Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Daily_002dnotes.html#Daily_002dnotes" rel="up" title="Daily-notes">
<link href="Capturing-and-finding-daily_002dnotes.html#Capturing-and-finding-daily_002dnotes" rel="next" title="Capturing and finding daily-notes">
<link href="Daily_002dnotes.html#Daily_002dnotes" rel="prev" title="Daily-notes">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="assets/page.css">
</head>
<body lang="en">
<a name="Configuration"></a>
<div class="header">
<p>
Next: <a href="Capturing-and-finding-daily_002dnotes.html#Capturing-and-finding-daily_002dnotes" accesskey="n" rel="next">Capturing and finding daily-notes</a>, Up: <a href="Daily_002dnotes.html#Daily_002dnotes" accesskey="u" rel="up">Daily-notes</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<a name="Configuration-1"></a>
<h3 class="section">15.1 Configuration</h3>
<p>For <code>org-roam-dailies</code> to work, you need to define two variables:
</p>
<ul>
<li> Variable: <code>org-roam-dailies-directory</code>
<p>Path to daily-notes.
</p>
</li><li> Variable: <code>org-roam-dailies-capture-templates</code>
<p>Capture templates for daily-notes in Org-roam.
</p></li></ul>
<p>Here is a sane default configuration:
</p>
<div class="lisp">
<pre class="lisp">(setq org-roam-dailies-directory &quot;daily/&quot;)
(setq org-roam-dailies-capture-templates
'((&quot;d&quot; &quot;default&quot; entry
#'org-roam-capture--get-point
&quot;* %?&quot;
:file-name &quot;daily/%&lt;%Y-%m-%d&gt;&quot;
:head &quot;#+title: %&lt;%Y-%m-%d&gt;\n\n&quot;)))
</pre></div>
<p>Make sure that <code>org-roam-dailies-directory</code> appears in <code>:file-name</code> for your
notes to be recognized as daily-notes. You can have different templates
placing their notes in different directories, but the one in
<code>org-roam-dailies-directory</code> will be considered as the main one in commands.
</p>
<p>See <a href="The-Templating-System.html#The-Templating-System">The Templating System</a> for creating new
templates. <code>org-roam-dailies</code> provides an extra <code>:olp</code> option which allows
specifying the outline-path to a heading:
</p>
<div class="lisp">
<pre class="lisp">(setq org-roam-dailies-capture-templates
'((&quot;l&quot; &quot;lab&quot; entry
#'org-roam-capture--get-point
&quot;* %?&quot;
:file-name &quot;daily/%&lt;%Y-%m-%d&gt;&quot;
:head &quot;#+title: %&lt;%Y-%m-%d&gt;\n\n* Lab notes\n* Journal&quot;
:olp (&quot;Journal&quot;))
(&quot;j&quot; &quot;journal&quot; entry
#'org-roam-capture--get-point
&quot;* %?&quot;
:file-name &quot;daily/%&lt;%Y-%m-%d&gt;&quot;
:head &quot;#+title: %&lt;%Y-%m-%d&gt;\n\n* Lab notes\n* Journal&quot;
:olp (&quot;Lab notes&quot;))))
</pre></div>
<p>The template <code>l</code> will put its notes under the heading Lab notes, and the
template <code>j</code> will put its notes under the heading Journal. When you use
<code>:olp</code>, make sure that the headings are present in <code>:head</code>.
</p>
</body>
</html>