Skip to content

Commit f62c218

Browse files
committed
Fix GitbookIO#278: Add page break between chapters/articles
1 parent 7255100 commit f62c218

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/generate/ebook/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ Generator.prototype.finish = function() {
3535
"--title": that.options.title,
3636
"--comments": that.options.description,
3737
"--authors": that.options.author,
38+
"--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]",
39+
"--chapter-mark": "pagebreak",
3840
"--level1-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-1 ')]",
3941
"--level2-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-2 ')]",
40-
"--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]"
42+
"--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]",
43+
"--no-chapters-in-toc": true
4144
};
4245

4346
if (format == "pdf") {

0 commit comments

Comments
 (0)