summaryrefslogtreecommitdiffstats
path: root/test/node_modules/gitbook-plugin-test-hooks/index.js
blob: cd9d1b0f54df8e45aaa86def0efe1dde891dc806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module.exports = {
    hooks: {
        'init': function() {
            global._hooks = [];
            global._hooks.push('init');
        },
        'finish': function() {
            global._hooks.push('finish');
        },
        'finish:before': function() {
            global._hooks.push('finish:before');
        },
        page: function(page) {
            page.content = 'Hello ' + page.content;
            return page;
        }
    }
};