{"route":"/en-US-v0.14.1/reference/model/title/","title":"Title","description":"Documentation for the `title` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-body","name":"body","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"title","title":"Title","keywords":[],"oneliner":"A document title.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A document title.</p>\n<p>This should be used to display the main title of the whole document and\nshould occur only once per document. In contrast, level 1\n<a href=\"/en-US-v0.14.1/reference/model/heading/\">headings</a> are intended to be used for the top-level sections of\nthe document.</p>\n<p>Note that additional frontmatter (like an author list) that should appear\ntogether with the title does not belong in its body.</p>\n<p>In HTML export, this shows as a <code>h1</code> element while level 1 headings show\nas <code>h2</code> elements.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">document</span><span class=\"typ-punct\">(</span>\n  title<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Interstellar Mail Delivery<span class=\"typ-punct\">]</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">title</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-heading\">= Introduction</span>\nIn recent years, <span class=\"typ-escape\">...</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/5158e69981c96c71d0f8157067fd1726.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"body","details":[{"kind":"html","content":"<p>The content of the title.</p>\n<p>When omitted (or <code><span class=\"typ-key\">auto</span></code>), this will default to <a href=\"/en-US-v0.14.1/reference/model/document/#parameters-title\" title=\"`document.title`\"><code>document.title</code></a>. In\nthis case, a document title must have been previously set with\n<code><span class=\"typ-key\">set</span> <span class=\"typ-func\">document</span><span class=\"typ-punct\">(</span>title<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>..<span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span></code>.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">document</span><span class=\"typ-punct\">(</span>title<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Course ABC, Homework 1&quot;</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-func\">#</span><span class=\"typ-func\">title</span><span class=\"typ-punct\">[</span>Homework 1<span class=\"typ-punct\">]</span>\n\n<span class=\"typ-escape\">...</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/898a77a910dde65fbc6149bcca1788f1.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["auto","content"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":true,"named":false,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]}}}