summaryrefslogtreecommitdiffstats
path: root/lib/generators/ebook.js
diff options
context:
space:
mode:
authorMaksim Pecherskiy <max@maksimize.com>2015-06-30 10:03:24 -0700
committerMaksim Pecherskiy <max@maksimize.com>2015-06-30 19:48:51 -0700
commit917a6f70d821e675181cbc1b28e603be2e53a1ea (patch)
tree25051e3074b572aa4b2594faa035efc21b70c17a /lib/generators/ebook.js
parent2f5e53da5581daf01570d422d55dcbc94443fc85 (diff)
downloadgitbook-917a6f70d821e675181cbc1b28e603be2e53a1ea.zip
gitbook-917a6f70d821e675181cbc1b28e603be2e53a1ea.tar.gz
gitbook-917a6f70d821e675181cbc1b28e603be2e53a1ea.tar.bz2
Allowing for custom chapter-mark and page-break in PDF.
Diffstat (limited to 'lib/generators/ebook.js')
-rw-r--r--lib/generators/ebook.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js
index cff9ef6..cdb667c 100644
--- a/lib/generators/ebook.js
+++ b/lib/generators/ebook.js
@@ -68,8 +68,6 @@ Generator.prototype.finish = function() {
"--book-producer": "GitBook",
"--publisher": "GitBook",
"--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]",
- "--chapter-mark": "pagebreak",
- "--page-breaks-before": "/",
"--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 ')]",
@@ -82,6 +80,8 @@ Generator.prototype.finish = function() {
var pdfOptions = that.options.pdf;
_.extend(_options, {
+ "--chapter-mark": String(pdfOptions.chapterMark),
+ "--page-breaks-before": String(pdfOptions.pageBreaksBefore),
"--margin-left": String(pdfOptions.margin.left),
"--margin-right": String(pdfOptions.margin.right),
"--margin-top": String(pdfOptions.margin.top),