1.0.0 • Published 5 months ago

markdown-docs-tree v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
5 months ago

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

ToolDifference
markdown-file-treemarkdown-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-treemarkdown-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.