Generate a TOC for your project's README in 2 seconds, maybe 3.
npm i -g readme-toc --save
Usage
First, add this code comment to your README wherever you want the TOC to be generated.
<!-- toc -->
Next, from same directory as your README, run the following in the command line:
toc
Example
After running the first time, the generated TOC will look like this:
<!-- toc -->* [Usage](#usage)* [Author](#author)* [License](#license) <!-- toc stop -->
Which looks like this in the browser:
Note that GitHub Flavored Markdown requires the extra newline for the <!-- toc stop -->
code comment to remain hidden.
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license