summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md7
-rw-r--r--lib/generate/ebook/index.js5
-rw-r--r--lib/parse/summary.js2
-rw-r--r--package.json4
4 files changed, 15 insertions, 3 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 7fe382f..d82aae1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,12 @@
# Release notes
+## 0.7.0
+- Add page break in ebook (pdf, epub, mobi) between chapters/articles
+- Start using kramed instead of marked
+- Fix display of inline math
+- Switch to graceful-fs to fix EMFILE errors
+- Add sharing to weibo.com
+
## 0.6.2
- Support generating a plugin's book info dynamically
- Improve navigation on dark theme
diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js
index 3ca53f9..6a9aa70 100644
--- a/lib/generate/ebook/index.js
+++ b/lib/generate/ebook/index.js
@@ -35,9 +35,12 @@ Generator.prototype.finish = function() {
"--title": that.options.title,
"--comments": that.options.description,
"--authors": that.options.author,
+ "--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]",
+ "--chapter-mark": "pagebreak",
"--level1-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-1 ')]",
"--level2-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-2 ')]",
- "--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]"
+ "--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]",
+ "--no-chapters-in-toc": true
};
if (format == "pdf") {
diff --git a/lib/parse/summary.js b/lib/parse/summary.js
index 7a65532..21eadd1 100644
--- a/lib/parse/summary.js
+++ b/lib/parse/summary.js
@@ -102,6 +102,7 @@ function parseChapter(nodes, nums) {
function defaultChapterList(chapterList) {
var first = _.first(chapterList);
+ // Check if introduction node was specified in SUMMARY.md
if (first) {
var chapter = parseChapter(first, [0]);
@@ -111,6 +112,7 @@ function defaultChapterList(chapterList) {
}
}
+ // It wasn't specified, so add in default
return [
[ { type: 'text', text: '[Introduction](README.md)' } ]
].concat(chapterList);
diff --git a/package.json b/package.json
index 76b15df..212c4c2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gitbook",
- "version": "0.6.3",
+ "version": "0.7.0",
"homepage": "http://www.gitbook.io/",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
@@ -8,7 +8,7 @@
"q": "1.0.1",
"lodash": "2.4.1",
"kramed": "0.4.0",
- "marked-text-renderer": "0.0.1",
+ "marked-text-renderer": "0.1.0",
"lunr": "0.5.2",
"swig": "1.3.2",
"send": "0.2.0",