0.0.1 • Published 10 years ago
markdown-it-contents v0.0.1
markdown-it-contents
markdown-it plugin for generation a table of contents
Installation
npm install markdown-it-contentsUsage
{!toc}The macros {!toc} will generate the table of contents for below headings only.
Example of load the plugin:
var markdown = require('markdown-it')();
markdown.use(require('markdown-it-contents'), {
..options
});Options
var defaults = {
// the max heading level in table of contents
depth: 6,
// a custom slugification function
slugify: function(name) { /* code */},
// a class for the container
className: 'table-of-contents'
}0.0.1
10 years ago