diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-03-08 22:53:16 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-03-08 22:53:18 +0100 |
commit | 2c695251482e7365c3e37b20a65da46ae3805b19 (patch) | |
tree | 72ecebe9ce9020c55b84472a23a45725ddc21c32 | |
parent | ee3a0ba8016f33ed04b2016d72eba1bc36c24146 (diff) | |
download | gitbook-2c695251482e7365c3e37b20a65da46ae3805b19.zip gitbook-2c695251482e7365c3e37b20a65da46ae3805b19.tar.gz gitbook-2c695251482e7365c3e37b20a65da46ae3805b19.tar.bz2 |
Add GitBook as book producer in ebook-convert
-rw-r--r-- | lib/generators/ebook.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js index 3063e83..29b1966 100644 --- a/lib/generators/ebook.js +++ b/lib/generators/ebook.js @@ -64,6 +64,8 @@ Generator.prototype.finish = function() { "--comments": that.options.description, "--isbn": that.options.isbn, "--authors": that.options.author, + "--language": that.options.language, + "--book-producer": "GitBook", "--publisher": "GitBook", "--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]", "--chapter-mark": "pagebreak", @@ -91,6 +93,10 @@ Generator.prototype.finish = function() { "--pdf-header-template": String(pdfOptions.headerTemplate) || "<p class='header'><span>"+that.options.title+"</span></p>", "--pdf-footer-template": String(pdfOptions.footerTemplate) || "<p class='footer'><span>_SECTION_</span> <span style='float:right;'>_PAGENUM_</span></p>" }); + } else if (that.ebookFormat == "epub") { + _.extend(_options, { + "--dont-split-on-page-breaks": true + }); } var command = [ |