npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

readme-toc

0.1.1

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:0
$ npm install readme-toc
DailyWeeklyMonthlyYearly

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:

  • Usage
  • Author
  • License

Note that GitHub Flavored Markdown requires the extra newline for the <!-- toc stop --> code comment to remain hidden.

Author

Jon Schlinkert

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license