Browse Source

Add more informations about hooks and add hook "page"

Samy Pessé 11 years ago
parent
commit
da4d4ab489
1 changed files with 12 additions and 0 deletions
  1. 12 0
      index.js

+ 12 - 0
index.js

@@ -9,11 +9,23 @@ module.exports = {
         ]
     },
     hooks: {
+        // For all the hooks, this represent the current generator
+
+        // This is called before the book is generated
         init: function() {
             console.log("init!");
         },
+
+        // This is called after the book generation
         finish: function() {
             console.log("finish!");
+        },
+
+        // This is called for each page of the book
+        // It can be used for modifing page content
+        // It should return the new page
+        page: function(page) {
+            return page;
         }
     }
 };