summaryrefslogtreecommitdiffstats
path: root/lib/generators
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generators')
-rw-r--r--lib/generators/ebook.js4
-rw-r--r--lib/generators/website.js2
2 files changed, 3 insertions, 3 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),
diff --git a/lib/generators/website.js b/lib/generators/website.js
index de833d3..675092f 100644
--- a/lib/generators/website.js
+++ b/lib/generators/website.js
@@ -50,7 +50,7 @@ Generator.prototype.prepareStyles = function() {
this.styles = _.chain(this.styles)
.map(function(style) {
var stylePath = that.options.styles[style];
- if (stylePath && fs.existsSync(path.resolve(that.book.root, stylePath))) {
+ if (stylePath && fs.existsSync(that.book.resolve(stylePath))) {
return [style, stylePath];
}
return null;