summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/generate/ebook/index.js3
-rw-r--r--theme/templates/page.html30
2 files changed, 4 insertions, 29 deletions
diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js
index 7416860..574341d 100644
--- a/lib/generate/ebook/index.js
+++ b/lib/generate/ebook/index.js
@@ -34,7 +34,8 @@ Generator.prototype.finish = function() {
}
var _options = {
- "--cover": that.options.cover
+ "--cover": that.options.cover,
+ "--chapter": "\"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]\""
};
var command = [
diff --git a/theme/templates/page.html b/theme/templates/page.html
index 061df6d..9c5e06e 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -39,32 +39,6 @@
{% endif %}
</section>
- {# Summary #}
- <section id="summary">
- <h1>Table of Contents</h1>
- <ol>
- <li>
- <a href="#README.md">
- <h2>Introduction</h2>
- </a>
- </li>
- {% for item in summary.chapters %}
- <li>
- <h2><span>{{ item.level }}.</span> <a href="#{{ item.path }}">{{ item.title }}</a></h2>
- {% if item.articles.length > 0 %}
- <ol>
- {% for article in item.articles %}
- <li>
- <span>{{ article.level }}</span> <a href="#{{ article.path }}">{{ article.title }}</a>
- </li>
- {% endfor %}
- </ol>
- {% endif %}
- </li>
- {% endfor %}
- </ol>
- </section>
-
{# Pages content #}
<section>
<article id="README.md">
@@ -74,7 +48,7 @@
{% for item in summary.chapters %}
<section>
<article id="{{ item.path }}" class="new-chapter">
- <h1>{{ item.title }}</h1>
+ <h1 class="book-chapter">{{ item.title }}</h1>
</article>
{% if pages[item.path] %}
@@ -101,7 +75,7 @@
{% set exercise = 1 %}
<section>
<article class="new-chapter">
- <h1>Exercise Solutions</h1>
+ <h1 class="book-chapter">Exercise Solutions</h1>
</article>
<article>
{% for item in summary.chapters %}