Add <edit:shorttitle/>.
authorCameron McCormack <cam@mcc.id.au>
Sat, 06 Apr 2013 16:49:30 +1100
changeset 77 c442b4de16ac
parent 76 cf60bdf06b8d
child 78 6b530890be51
Add <edit:shorttitle/>.
publish/processing.js
--- a/publish/processing.js	Sat Apr 06 16:37:10 2013 +1100
+++ b/publish/processing.js	Sat Apr 06 16:49:30 2013 +1100
@@ -666,6 +666,10 @@
   }
 }
 
+function doShortTitle(conf, page, n) {
+  return utils.replace(n, n.ownerDocument.createTextNode(conf.shortTitle));
+}
+
 exports.processReplacements = function(conf, page, doc) {
   var replacementFunctions = {
     minitoc: doMiniTOC,
@@ -688,7 +692,8 @@
     elementcategory: doElementCategory,
     attributecategory: doAttributeCategory,
     elementswithattributecategory: doElementsWithAttributeCategory,
-    whenpublished: doWhenPublished
+    whenpublished: doWhenPublished,
+    shorttitle: doShortTitle
   };
 
   utils.forEachNode(doc, function(n) {