|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
<title>The mkbook Book | Front Matter</title>
|
|
|
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
|
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
|
<meta property="og:title" content="The mkbook Book" />
|
|
|
<meta property="og:site_name" content="The mkbook Book" />
|
|
|
<meta property="og:type" content="book" />
|
|
|
<meta property="og:url" content="https://hamaluik.github.io/mkbook//03-frontmatter.html" />
|
|
|
|
|
|
<meta property="book:author" content="Kenton Hamaluik" />
|
|
|
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+00:00" />
|
|
|
|
|
|
</head>
|
|
|
<body>
|
|
|
<nav class="big">
|
|
|
<header>
|
|
|
<h1><a href="index.html">The mkbook Book</a></h1>
|
|
|
<h2>by Kenton Hamaluik</h2>
|
|
|
</header>
|
|
|
<ol>
|
|
|
|
|
|
<li>
|
|
|
<a href="01-command-line.html">Command-line Interface</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="02-markdown/index.html">Markdown</a>
|
|
|
|
|
|
<ol>
|
|
|
|
|
|
<li><a href="02-markdown/01-commonmark.html">CommonMark</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/03-plantuml-diagrams.html">PlantUML Diagrams</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/04-katex-formulas.html">KaTeX (Math) Formulas</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/05-images.html">Images</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/06-tables.html">Tables</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/07-task-lists.html">Task Lists</a></li>
|
|
|
|
|
|
<li><a href="02-markdown/08-links.html">Links</a></li>
|
|
|
|
|
|
</ol>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="03-frontmatter.html" class = "current">Front Matter</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="04-structure.html">Structure</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="05-customization.html">Customization</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="06-how-it-works.html">How it Works</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="07-latex-output.html">LaTeX Output</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ol>
|
|
|
</nav>
|
|
|
<nav class="small">
|
|
|
<span>
|
|
|
<a href="index.html" alt="Table of Contents">
|
|
|
<span class="icon">
|
|
|
<svg class="icon-list-ol">
|
|
|
<use xlink:href="icons.svg#icon-list-ol">
|
|
|
</svg>
|
|
|
</span>
|
|
|
</a>
|
|
|
|
|
|
|
|
|
<a href="02-markdown/08-links.html" alt="Links">
|
|
|
<span class="icon">
|
|
|
|
|
|
<svg class="icon-arrow-left">
|
|
|
<use xlink:href="icons.svg#icon-arrow-left">
|
|
|
</svg>
|
|
|
|
|
|
</span>
|
|
|
</a>
|
|
|
|
|
|
</span>
|
|
|
<span class="title">Front Matter</span>
|
|
|
<span>
|
|
|
<span class="placeholder"></span>
|
|
|
|
|
|
|
|
|
<a href="04-structure.html" alt="Structure">
|
|
|
<span class="icon">
|
|
|
<svg class="icon-arrow-right">
|
|
|
<use xlink:href="icons.svg#icon-arrow-right">
|
|
|
</svg>
|
|
|
</span>
|
|
|
</a>
|
|
|
|
|
|
</span>
|
|
|
</nav>
|
|
|
<article>
|
|
|
<h1 class="title">Front Matter</h1>
|
|
|
<p>Each <code>.md</code> file can optionally contain a header with metadata describing the document. If the header isn’t present, or if any keys are missing, default values will be used.</p>
|
|
|
<p>To insert a header into a <code>.md</code> file, insert three dashes (<code>---</code>), followed by a new-line, followed by the front matter contents, followed by a newline, then another three dashes and a new-line. The metadata is in the <a href="https://github.com/toml-lang/toml">TOML</a> format, so for example the front-matter (and first line) for a file could look like this:</p>
|
|
|
<pre style="background-color:#2d2d2d;">
|
|
|
<span style="background-color:#515151;color:#d3d0c8;">---
|
|
|
</span><span style="color:#d3d0c8;">title = "Front Matter"
|
|
|
</span><span style="color:#d3d0c8;">author = "Kenton Hamaluik"
|
|
|
</span><span style="color:#d3d0c8;">pubdate = 2019-11-29T15:22:00-07:00
|
|
|
</span><span style="color:#6699cc;">---
|
|
|
</span><span style="color:#d3d0c8;">
|
|
|
</span><span style="color:#d3d0c8;">Each </span><span style="color:#99cc99;">`.md`</span><span style="color:#d3d0c8;"> file can optionally contain a header with metadata describing the document. If the header isn't present, or if any keys are missing, default values will be used.
|
|
|
</span></pre>
|
|
|
<h1><a href="#supported-keys" aria-hidden="true" class="anchor" id="headersupported-keys"></a>Supported Keys</h1>
|
|
|
<p>The list of supported keys is subject to change, but for now it is as follows:</p>
|
|
|
<dl><dt>
|
|
|
<p>title</p>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>A human-readable title for the document (defaults to the filename)</p>
|
|
|
</dd>
|
|
|
<dt>
|
|
|
<p>author</p>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>The author (or authors) who wrote the chapter (defaults to “Anonymous”)</p>
|
|
|
</dd>
|
|
|
<dt>
|
|
|
<p>pubdate</p>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>The <a href="http://tools.ietf.org/html/rfc3339">RFC 3339</a> timestamp of when the chapter was published (defaults to the time at build)</p>
|
|
|
</dd>
|
|
|
<dt>
|
|
|
<p>url</p>
|
|
|
</dt>
|
|
|
<dd>
|
|
|
<p>The relative URL of the file, defaults to the generated route (you probably shouldn’t set this one)</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="next-chapter">
|
|
|
<a href="04-structure.html">
|
|
|
<span>Next chapter: “Structure”</span>
|
|
|
<span class="icon">
|
|
|
<svg class="icon-arrow-right">
|
|
|
<use xlink:href="icons.svg#icon-arrow-right">
|
|
|
</svg>
|
|
|
</span>
|
|
|
</a>
|
|
|
</div>
|
|
|
|
|
|
<footer><p>© 2019 Kenton Hamaluik</p></footer>
|
|
|
</article>
|
|
|
|
|
|
</body>
|
|
|
</html> |