gfm-toc

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i gfm-toc

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

488 kB

Total Files

6

Last publish

Collaborators

  • lacti