diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-12 12:47:08 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-12 12:47:08 +0100 |
commit | 843889303e3fd4fca9c0ef9532e68936952bfc6c (patch) | |
tree | eea5f01442f935af8668d81bde46be1c00c0c39a /lib | |
parent | 4ad2b040b462ae2f94922e9ad01d7804eb6d79dc (diff) | |
download | gitbook-843889303e3fd4fca9c0ef9532e68936952bfc6c.zip gitbook-843889303e3fd4fca9c0ef9532e68936952bfc6c.tar.gz gitbook-843889303e3fd4fca9c0ef9532e68936952bfc6c.tar.bz2 |
Improve pdf by adding default header and footer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/configuration.js | 4 | ||||
-rw-r--r-- | lib/generators/ebook.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index bedf266..7316dd8 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -220,8 +220,8 @@ Configuration.DEFAULT = { "margin": { "right": 62, "left": 62, - "top": 36, - "bottom": 36 + "top": 56, + "bottom": 56 }, //Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_. diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js index ebffa79..09215c4 100644 --- a/lib/generators/ebook.js +++ b/lib/generators/ebook.js @@ -87,8 +87,8 @@ Generator.prototype.finish = function() { "--pdf-mono-font-size": String(pdfOptions.fontSize), "--paper-size": String(pdfOptions.paperSize), "--pdf-page-numbers": Boolean(pdfOptions.pageNumbers), - "--pdf-header-template": String(pdfOptions.headerTemplate), - "--pdf-footer-template": String(pdfOptions.footerTemplate) + "--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>" }); } |