summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-10-13 10:48:33 +0200
committerSamy Pessé <samypesse@gmail.com>2014-10-13 10:48:33 +0200
commitf049576575ccb71d50064a92882de4cf23e1c52f (patch)
tree51166182102390e96afd34db5817812964efcf88
parent1da341741b4e5f2cee3bb60fbd3b546708e2ef82 (diff)
parenta7ecbb87e4a75050a7b1fdcfe55cfdec918aedf6 (diff)
downloadgitbook-f049576575ccb71d50064a92882de4cf23e1c52f.zip
gitbook-f049576575ccb71d50064a92882de4cf23e1c52f.tar.gz
gitbook-f049576575ccb71d50064a92882de4cf23e1c52f.tar.bz2
Merge branch 'alexandreaquiles-pdf_header_and_footer'
-rw-r--r--README.md8
-rw-r--r--lib/generate/config.js8
-rw-r--r--lib/generate/ebook/index.js2
3 files changed, 16 insertions, 2 deletions
diff --git a/README.md b/README.md
index f422aaf..47146e0 100644
--- a/README.md
+++ b/README.md
@@ -118,7 +118,13 @@ Here are the options that can be stored in this file:
"left": 62,
"top": 36,
"bottom": 36
- }
+ },
+
+ //Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
+ "headerTemplate": null,
+
+ //Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
+ "footerTemplate": null
}
}
```
diff --git a/lib/generate/config.js b/lib/generate/config.js
index 0b270a3..76b0d79 100644
--- a/lib/generate/config.js
+++ b/lib/generate/config.js
@@ -83,7 +83,13 @@ var CONFIG = {
"left": 62,
"top": 36,
"bottom": 36
- }
+ },
+
+ //Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
+ "headerTemplate": null,
+
+ //Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
+ "footerTemplate": null
}
};
diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js
index b7a4119..d3b2aea 100644
--- a/lib/generate/ebook/index.js
+++ b/lib/generate/ebook/index.js
@@ -58,6 +58,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)
});
}