gulp-doctoc
Inject a table of contents into your markdown files.
Install
Install with npm
npm install --save-dev gulp-doctoc
Usage
var toc = marked = ; gulp;
By default, doctoc puts the TOC at the top of the file. To place it somewhere else, add:
<!-- START doctoc -->
<!-- END doctoc -->
Custom title
, depth
, mode
and notitle
options are also accepted
// ...
.pipe(toc({
title: "Table des matières",
depth: 3,
mode: "bitbucket.org",
notitle: true
}))
// ...
Thanks
Thanks to @thlorenz for doctoc. He did all the hard work.
License
MIT (same as doctoc)