Add option pdf.pageNumber

Fix GitbookIO/editor#38
This commit is contained in:
Samy Pessé
2014-06-03 16:24:35 +02:00
parent 5d51263a58
commit c803270af8
3 changed files with 6 additions and 1 deletions
+3
View File
@@ -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,
+2
View File
@@ -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)
});
}
+1 -1
View File
@@ -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);
})