|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
<title>Structure</title>
|
|
|
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
|
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
|
</head>
|
|
|
<body>
|
|
|
<nav class="big">
|
|
|
|
|
|
<a href="01-introduction.html">Introduction</a>
|
|
|
|
|
|
<a href="02-markdown.html">Markdown</a>
|
|
|
|
|
|
<a href="03-frontmatter.html">Front Matter</a>
|
|
|
|
|
|
<a href="04-structure.html" class = "current">Structure</a>
|
|
|
|
|
|
</nav>
|
|
|
<nav class="small">
|
|
|
|
|
|
|
|
|
<a href="03-frontmatter.html">
|
|
|
<span class="icon">
|
|
|
<svg class="icon-arrow-left">
|
|
|
<use xlink:href="icons.svg#icon-arrow-left">
|
|
|
</svg>
|
|
|
</span>
|
|
|
</a>
|
|
|
|
|
|
<span class="title">Structure</span>
|
|
|
|
|
|
|
|
|
<span class="placeholder"></span>
|
|
|
|
|
|
</nav>
|
|
|
<article><p><em>mkbook</em> currently only supports two types of assets to use in rendering: assets (images, etc), and documents (markdown files).</p>
|
|
|
<h2><a href="#assets" aria-hidden="true" class="anchor" id="headerassets"></a>Assets</h2>
|
|
|
<pre style="background-color:#2d2d2d;">
|
|
|
<span style="color:#d3d0c8;">unimplemented!()
|
|
|
</span></pre>
|
|
|
<h2><a href="#documents" aria-hidden="true" class="anchor" id="headerdocuments"></a>Documents</h2>
|
|
|
<p>For now, <em>mkbook</em> only works on a flat list of markdown files, with the intent of each markdown file being its own chapter. Subdirectories and files that don’t end in a <code>.md</code> extension are completely ignored. The order of the book is based on the alphabetical order of the file names (actually it’s based on Rust’s <a href="https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html#impl-PartialOrd%3Cstr%3E">implementation of <code>PartialOrd</code> for str</a>). Thus, it is recommended to lay out your book chapters with manual numbering of the file names, as such:</p>
|
|
|
<pre style="background-color:#2d2d2d;">
|
|
|
<span style="color:#d3d0c8;">src/
|
|
|
</span><span style="color:#d3d0c8;">├── 00-foreword.md
|
|
|
</span><span style="color:#d3d0c8;">├── 01-introduction.md
|
|
|
</span><span style="color:#d3d0c8;">├── 02-my-first-chapter.md
|
|
|
</span><span style="color:#d3d0c8;">└── etc...
|
|
|
</span></pre>
|
|
|
<p>An index and navigation will be automatically generated from these files, taking the information for each file from it’s front-matter.</p>
|
|
|
</article>
|
|
|
</body>
|
|
|
</html> |