markdown-docs-tree

1.0.0 • Public • Published

Markdown Docs Tree

Generates a list of markdown files from a directory tree, with links to each file, and maintains this tree in README.md files in each directory.

Installing

You can globally install markdown-docs-tree with npm/yarn/pnpm:

npm install -g markdown-docs-tree # or
yarn global add markdown-docs-tree # or
pnpm add -g markdown-docs-tree

Or run it directly without installing:

npx markdown-docs-tree # or
pnpm dlx markdown-docs-tree

Running

markdown-docs-tree [dir] acts upon the specified directory, or the current directory by default, and modifies README.md files there and in subdirectories.

For each markdown file, it will read titles from (in order of precedence):

  • A title property in yaml front matter
  • The first h1 heading in the Markdown file
  • The first heading in the Markdown file
  • The filename

Similar Tools

Tool Difference
markdown-file-tree markdown-file-tree is focused on generating a tree of markdown files for a GitHub Wiki (_Sidebar.md), but markdown-docs-tree is focused on generating a tree of markdown files for a directory of markdown files anywhere in a repo.
markdown-notes-tree markdown-notes-tree limits the amount of content that can be put into the README.md for a subdirectory to a single paragraph, and fences the description of the subdirectory. markdown-docs-tree allows for arbitrary content to be included in the README.md for a subdirectory, and fences the location of the tree only.

Readme

Keywords

none

Package Sidebar

Install

npm i markdown-docs-tree

Weekly Downloads

0

Version

1.0.0

License

GPL-3.0

Unpacked Size

45.7 kB

Total Files

8

Last publish

Collaborators

  • dominics