1.0.2 • Published 4 years ago

gfm-toc v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

GitHub markdown TOC generator

Generate TOC.md file from all Markdown files in repository.

Usage

gfm-toc target-dir

Installation

npm i -g gfm-toc
# Run gfm-toc

Or build from source.

npm
npm run build
# ./cli.js target-dir

Example

See example directory. The input is like this,

.
├── ANOTHER.md
├── README.md
└── subdir
    ├── FRIEND.md
    └── README.md

then generate TOC.md like that,

# Table of contents

- [Top level](README.md#top-level)
  - [Second level](README.md#second-level)
- [Another file](ANOTHER.md#another-file)
  - [Another second](ANOTHER.md#another-second)
- [Subdirectory](subdir/README.md#subdirectory)
  - [Sub secondary](subdir/README.md#sub-secondary)
  - [Friend](subdir/FRIEND.md#friend)
    - [Good to see you](subdir/FRIEND.md#good-to-see-you)

when executing this command.

gfm-toc example

License

MIT