Don't add page header/footer one single page specs.
authorCameron McCormack <cam@mcc.id.au>
Sat, 06 Apr 2013 12:26:03 +1100
changeset 72 59efecca3a36
parent 71 03c2ca802c74
child 73 5e950c7b185a
Don't add page header/footer one single page specs.
publish/processing.js
--- a/publish/processing.js	Fri Apr 05 16:57:36 2013 +1100
+++ b/publish/processing.js	Sat Apr 06 12:26:03 2013 +1100
@@ -116,6 +116,10 @@
 // -- Add header and footer links to next/previous chapter, etc. --------------
 
 exports.addHeaderFooter = function(conf, page, doc) {
+  if (conf.pageOrder.length == 1) {
+    return;
+  }
+
   var index = conf.pageOrder.indexOf(page);
   var previous = conf.pageOrder[index - 1];
   var next = conf.pageOrder[index + 1];