github-toc-generator

Generate Tables of Contents for Github READMEs


Keywords
github, toc, table of contents, md, markdown, readme, command-line
License
MIT
Install
npm install github-toc-generator@1.0.0

Documentation

github-toc-generator

Build Status npm npm

A command-line utility for generating Tables of Contents for Github markdown files. All links are Github-compatible anchors.

Usage

By default, a maximum header depth of 6 and the file README.md is utilized.

ghtoc [options] <user> <repository> <file>

Options:

  -h, --help            output usage information
  -V, --version         output the version number
  -d, --depth <number>  specifiy the maximum header depth (1 - 6) of the toc
  -o, --open            open the readme in browser

Installation

$ npm install -g github-toc-generator

Contributing

Issues and pull requests are welcome.

$ git clone https://github.com/jackrzhang/github-toc-generator
$ cd github-toc-generator
$ npm install -g

Please run linting and tests prior to commits.

$ npm run lint
$ npm test

License

MIT