readme-toc

0.1.1 • Public • Published

readme-toc NPM version

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

Package Sidebar

Install

npm i readme-toc

Weekly Downloads

75

Version

0.1.1

License

none

Last publish

Collaborators

  • doowb
  • jonschlinkert