mdBook/book-example/book/cli/init.html

69 lines
3.3 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="{% block description %}{% endblock %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../book.css" media="screen" title="no title" charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<body>
<div id="sidebar" class="sidebar">
<ul class="chapter"><li><a href="../README.html"><strong>1.</strong> mdBook</a></li><li><a href="../cli/cli-tool.html"><strong>2.</strong> Command Line Tool</a></li><li><ul class="section"><li><a href="../cli/init.html"class="active"><strong>2.1.</strong> init</a></li><li><a href="../cli/build.html"><strong>2.2.</strong> build</a></li></ul><li><strong>3.</strong> Format</li><li><ul class="section"><li><strong>3.1.</strong> SUMMARY.md</li></ul><li><strong>4.</strong> Rust Library</li></ul>
</div>
<div id="page-wrapper" class="page-wrapper">
<div id="menu-bar" class="menu-bar">
<i id="sidebar-toggle" class="fa fa-bars left"></i>
<h1 class="menu-title"></h1>
</div>
<div id="page" class="page">
<h1>The init command</h1>
<p>The init command, used like this:</p>
<pre><code>mdbook init
</code></pre>
<p>Will create a couple of files and directories in the working directory so that you can
spend more time writing your book and less setting it up.</p>
<p>The files set up for you are the following:</p>
<pre><code>book-test/
├── book
└── src
├── chapter_1.md
└── SUMMARY.md
</code></pre>
<p>The <code>src</code> directory is were you write your book in markdown. It contains all the source files,
configuration files, etc.</p>
<p>The <code>book</code> directory is where your book is rendered. All the output is ready to be uploaded
to a serer to be seen by the internet.</p>
<p>The <code>SUMMARY.md</code> file is the most important file, it's the skeleton of your book.
It's so important that it has it's own <a href="">chapter</a>.</p>
<h4>Specify a directory</h4>
<p>When using the init command, you can also specify a directory, instead of using the current directory,
by appending a path to the command:</p>
<pre><code>mdbook init path/to/book
</code></pre>
<h2>Not yet implemented</h2>
<p>In the future I would like <code>mdBook init</code> to be able to:</p>
<ul>
<li>Copy the default theme to the <code>src</code> directory in a <code>theme</code> directory when using a flag like <code>--theme</code>.
The user could then tweak the theme to his needs.</li>
<li>Generate files that are in <code>SUMMARY.md</code>. If the user has already created a <code>SUMMARY.md</code> file and added some entries but did
not create the corresponding files, init command should create the files for him.</li>
</ul>
</div>
</div>
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="../book.js"></script>
</body>
</html>