mirror of
https://github.com/standardebooks/web.git
synced 2025-07-10 00:30:28 -04:00
Update step-by-step guide
This commit is contained in:
parent
facebb3847
commit
9c05f342da
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ require_once('Core.php');
|
|||
<li>
|
||||
<h2>Split the source text at logical divisions</h2>
|
||||
<p>The file we downloaded contains the entire work. <i>Jekyll</i> is a short work, but for longer work it quickly becomes impractical to have the entire text in one file. Not only is it a pain to edit, but ereaders often have trouble with extremely large files.</p>
|
||||
<p>The next step is to split the file at logical places; that usually means at each chapter break. For works that are contain their chapters in larger “parts,” the part division should also be its own file. For example, see <i><a href="/ebooks/robert-louis-stevenson/treasure-island/milo-winter">Treasure Island</a></i>.</p>
|
||||
<p>The next step is to split the file at logical places; that usually means at each chapter break. For works that are contain their chapters in larger “parts,” the part division should also be its own file. For example, see <i><a href="/ebooks/robert-louis-stevenson/treasure-island">Treasure Island</a></i>.</p>
|
||||
<p>To split the work, we use <code class="program">se split-file</code>. <code class="program">se split-file</code> takes a single file and breaks it in to a new file every time it encounters the markup <code class="html"><!--se:split--></code>. <code class="program">se split-file</code> automatically includes basic header and footer markup in each split file.</p>
|
||||
<p>Notice that in our source file, each chapter is marked with an <code class="html">h2</code> tag. We can use that to our advantage and save ourselves the trouble of adding the <code class="html"><!--se:split--></code> markup by hand:</p><code class="terminal"><span>perl -pi -e "s/<h2/<\!--se:split--><h2/g" src/epub/text/body.xhtml</span></code>
|
||||
<p>(Note the slash before the ! for compatibility with some shells.)</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue