summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--lib/generate/ebook/index.js2
-rw-r--r--lib/utils/string.js2
3 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index d767c82..03fa1c5 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,9 @@ Here are the options that can be stored in this file:
// Add toc at the end of the file
"toc": true,
+ // Add page numbers to the bottom of every page
+ "pageNumbers": false,
+
// Font size for the fiel content
"fontSize": 12,
diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js
index cec0909..2ef70db 100644
--- a/lib/generate/ebook/index.js
+++ b/lib/generate/ebook/index.js
@@ -44,6 +44,7 @@ Generator.prototype.finish = function() {
var pdfOptions = _.defaults(that.options.pdf || {}, {
"fontSize": 12,
"toc": true,
+ "pageNumbers": false,
"paperSize": "a4",
"margin": {
"right": 62,
@@ -61,6 +62,7 @@ Generator.prototype.finish = function() {
"--pdf-add-toc": Boolean(pdfOptions.toc),
"--pdf-default-font-size": String(pdfOptions.fontSize),
"--paper-size": String(pdfOptions.paperSize),
+ "--pdf-page-numbers": Boolean(pdfOptions.pageNumbers)
});
}
diff --git a/lib/utils/string.js b/lib/utils/string.js
index 63c5e91..417d7af 100644
--- a/lib/utils/string.js
+++ b/lib/utils/string.js
@@ -11,7 +11,7 @@ function escapeShellArg(arg) {
function optionsToShellArgs(options) {
return _.chain(options)
.map(function(value, key) {
- if (value == null) return null;
+ if (value == null || value == false) return null;
if (value == true) return key;
return key+"="+escapeShellArg(value);
})