Skip to content

Commit da4d4ab

Browse files
committed
Add more informations about hooks and add hook "page"
1 parent 25719d8 commit da4d4ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ module.exports = {
99
]
1010
},
1111
hooks: {
12+
// For all the hooks, this represent the current generator
13+
14+
// This is called before the book is generated
1215
init: function() {
1316
console.log("init!");
1417
},
18+
19+
// This is called after the book generation
1520
finish: function() {
1621
console.log("finish!");
22+
},
23+
24+
// This is called for each page of the book
25+
// It can be used for modifing page content
26+
// It should return the new page
27+
page: function(page) {
28+
return page;
1729
}
1830
}
1931
};

0 commit comments

Comments
 (0)