In .verb.md where you want to inject the TOC:
<!-- toc -->Done!
Pro-tip
This is already enabled in Verb, but you can customize with a basic middleware like this:
var toc = require('markdown-toc');
verb.postRender(/\.md$/, return function (file, next) {
file.content = toc.insert(file.content);
next();
});If you want to customize how the TOC renders, just:
- add a
verbfile.jsto your project with the code above - customize away!