diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-15 11:33:24 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-15 11:33:24 +0200 |
commit | 663291c51507837689b7281be5c07802f19c3d0e (patch) | |
tree | 23fcddecc5d01f4d051cd117f3055007a9bc9784 /lib/output/ebook.js | |
parent | 99253eeceaab70a7e85504b7867a9999d34890c4 (diff) | |
download | gitbook-663291c51507837689b7281be5c07802f19c3d0e.zip gitbook-663291c51507837689b7281be5c07802f19c3d0e.tar.gz gitbook-663291c51507837689b7281be5c07802f19c3d0e.tar.bz2 |
Output context as global for themes
Diffstat (limited to 'lib/output/ebook.js')
-rw-r--r-- | lib/output/ebook.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/output/ebook.js b/lib/output/ebook.js index b0b05ca..2b8fac9 100644 --- a/lib/output/ebook.js +++ b/lib/output/ebook.js @@ -44,13 +44,7 @@ EbookOutput.prototype.finish = function() { // Generate SUMMARY.html .then(function() { - return that.render('summary', that.getContext()) - .then(function(html) { - return that.writeFile( - 'SUMMARY.html', - html - ); - }); + return that.render('summary', 'SUMMARY.html', that.getContext()); }) // Start ebook-convert @@ -100,7 +94,7 @@ EbookOutput.prototype.getPDFTemplate = function(tpl) { this.getContext() ); - return this.render('pdf_'+tpl, context) + return this.renderAsString('pdf_'+tpl, context) // Inline css, include css relative to the output folder .then(function(output) { |