mirror of
https://github.com/org-roam/org-roam
synced 2025-08-21 13:53:31 -05:00
111 lines
4.9 KiB
HTML
111 lines
4.9 KiB
HTML
<!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>The Templating System (Org-roam User Manual)</title>
|
|
|
|
<meta name="description" content="The Templating System (Org-roam User Manual)">
|
|
<meta name="keywords" content="The Templating System (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="index.html#Top" rel="up" title="Top">
|
|
<link href="Template-Walkthrough.html#Template-Walkthrough" rel="next" title="Template Walkthrough">
|
|
<link href="File-Refs.html#File-Refs" rel="prev" title="File Refs">
|
|
<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="The-Templating-System"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Concepts-and-Configuration.html#Concepts-and-Configuration" accesskey="n" rel="next">Concepts and Configuration</a>, Previous: <a href="Anatomy-of-an-Org_002droam-File.html#Anatomy-of-an-Org_002droam-File" accesskey="p" rel="prev">Anatomy of an Org-roam File</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="The-Templating-System-1"></a>
|
|
<h2 class="chapter">7 The Templating System</h2>
|
|
|
|
<p>Rather than creating blank files on <code>org-roam-insert</code> and <code>org-roam-find-file</code>,
|
|
it may be desirable to prefill the file with templated content. This may
|
|
include:
|
|
</p>
|
|
<ul>
|
|
<li> Time of creation
|
|
|
|
</li><li> File it was created from
|
|
|
|
</li><li> Clipboard content
|
|
|
|
</li><li> Any other data you may want to input manually
|
|
</li></ul>
|
|
|
|
<p>This requires a complex template insertion system. Fortunately, Org ships with a
|
|
powerful one: <code>org-capture</code> (see <a href="http://www.gnu.org/software/emacs/manual/html_node/org/capture.html#capture">(org)capture</a>). However, org-capture was not
|
|
designed for such use. Org-roam abuses <code>org-capture</code>, extending its syntax and
|
|
capabilities. To first understand how org-roam’s templating system works, it may
|
|
be useful to look into basic usage of <code>org-capture</code>.
|
|
</p>
|
|
<p>For these reasons, Org-roam capture templates are not compatible with regular
|
|
<code>org-capture</code>. Hence, Org-roam’s templates can be customized by instead
|
|
modifying the variable <code>org-roam-capture-templates</code>. Just like
|
|
<code>org-capture-templates</code>, <code>org-roam-capture-templates</code> can contain multiple
|
|
templates. If <code>org-roam-capture-templates</code> only contains one template, there
|
|
will be no prompt for template selection.
|
|
</p>
|
|
<table class="menu" border="0" cellspacing="0">
|
|
<tr><td align="left" valign="top">• <a href="Template-Walkthrough.html#Template-Walkthrough" accesskey="1">Template Walkthrough</a>:</td><td> </td><td align="left" valign="top">
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="Org_002droam-Template-Expansion.html#Org_002droam-Template-Expansion" accesskey="2">Org-roam Template Expansion</a>:</td><td> </td><td align="left" valign="top">
|
|
</td></tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|