|
|
<!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/index.html" />
|
|
|
<meta property="og:description" content="<p><em>mkbook</em> is my simpler alternative to <a href="https://crates.io/crates/mdbook">mdbook</a> which is a great tool, but for which I really dislike some of the decisions they took, such as relying on javascript for highlighting and navigation, and including a lot of bells and whistles such as javascript-based search.</p>
|
|
|
<p>This tool aims to work somewhat similarly to <em>mdbook</em>, but is generally intended to be a more minimal alternative that is customized more towards my needs and desires than anything else.</p>
|
|
|
" />
|
|
|
<meta property="book:author" content="Kenton Hamaluik" />
|
|
|
<meta property="book:release_date" content="2019-11-29T21:43:28.060984725+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-introduction/index.html">Introduction</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>
|
|
|
|
|
|
</ol>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="../03-frontmatter/index.html" class = "current">Front Matter</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="../04-structure/index.html">Structure</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="../05-customization/index.html">Customization</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
<a href="../06-how-it-works/index.html">How it Works</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/02-syntax-highlighting.html" alt="Syntax Highlighting">
|
|
|
<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/index.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>
|
|
|
<p>Each <code>.md</code> file can optionally contain a header with metadata describing the document. If the header isn’t present, default values will be used which may look ugly.</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 this file looks like:</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:#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, default values will be used which may look ugly.
|
|
|
</span></pre>
|
|
|
<h2><a href="#supported-keys" aria-hidden="true" class="anchor" id="headersupported-keys"></a>Supported Keys</h2>
|
|
|
<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</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="next-chapter">
|
|
|
<a href="../04-structure/index.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> |