A Markdown filter for generating numbered sections and a table of contents.
Want to see pretty graphs? Log in now!
npm install mdtoc
|1||downloads in the last month|
|Last Published By|
|Version||1.0.0 last updated 2 years ago|
|Keywords||markdown, filter, contents|
$ npm install -g mdtoc
mdtoc, make sure that the headings you want numbered and linked are in this format:
### Title ###
Note that the headings must have an equal number of octothorpes around the title text (in Markdown,
h2, and so on). The table of contents will be inserted before the first such heading.
lib/mdtoc.js exposes the
bin/mdtoc executable is Node-specific, and can be invoked like so:
$ mdtoc source.md $ mdtoc first.md second.md | markdown $ cat source.md | mdtoc $ cat first.md | mdtoc second.md third.md | markdown