1.0.2 • Published 7 years ago

filesystem-doctoc v1.0.2

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

Other table of contents generators take a single readme file. What if you have several readmes, or many? You can use filetree-doctoc to join many readme files in your filesystem tree into a single .md file with a table of contents that matches your file structure.

For now, it only supports github-flavor markdown.

api

import fileSystemDocToc from 'filesystem-doctoc'

fileSystemDocToc({
  // should be a file that serves as the root of your docs directory
  rootPath: `${__dirname}/docs/readmes`,
  // filepath to specify where you want output to be written
  output: `${__dirname}/docs/dist/index.md`
})