var toc = require('marked-toc');

module.exports = {
  book: {
  },
  hooks: {
    "page:before": function(page) {
      var tmpl = '<%= depth %><%= bullet %>[<%= heading %>](#<%= url %>)\n';
      page.content = toc.insert(page.content, {template: tmpl});
      return page;
    }
  }
};

@@ -25,16 +25,93 @@
 d-toc');
+%0Aconst template = require('./node_modules/marked-toc/node_modules/template');
 %0A%0Amodule
@@ -231,16 +231,313 @@
 et %25%3E%5B%3C%25
+ var h=depth.length/2+1; if (typeof(h1) == %22undefined%22) %7Bh1=0;%7D if (typeof(h2) == %22undefined%22) %7Bh2=0;%7D if (typeof(h3) == %22undefined%22) %7Bh3=0;%7D var head; if (h == 1) %7Bh1++;h2=0;h3=0;head=h1;%7D else if (h == 2) %7Bh2++;h3=0;head=h1+%22.%22+h2;%7D else if (h == 3) %7Bh3++;head=h1+%22.%22+h2+%22.%22+h3;%7D %25%3E%3C%25= head%25%3E %3C%25
 = headin
@@ -624,16 +624,50 @@
 tmpl%7D);%0A
+      template('%3C%25 h1=0 %25%3E', %7B%7D);%0A
       re

Modify title number.