Extensive tool to create and maintain Markdown documentation tables of contents and navigation
This project was originally called tocmd, but because large use of that name I decided to rename it.
This documentation (including nested sits in built with
##Table of contents
Markdown is already standard in the industry. There are number of various tools (mostly commercial) to give extra powers to MD. This simple liblary is meant to allow you add maintainless, hasslefree tables of contents and other indexing widgets to your project. Idea is that you can connect this lib to your build or versioning process to keep documentation navigation always up to date.
There are similar projects (listed below), but so far none of them address file tree:
If you find features that would make this package better, or you know better open package, please let me know.
sudo npm install roadmarks -g
Start in current dir
Start in other dir
roadmarks -d /path/to/my/project
Process one file
roadmarks -f /path/to/my/file.MD
By default comment block load
<!-- RM --> <!-- /RM --> <!-- RM(max-depth:3)--> <!-- /RM --> <!-- RM(tree:/) --> <!-- /RM -->
You can use ignore blocks
<!-- RM-IGNORE --> <!-- /RM-IGNORE -->
Now you can create indexes
<!-- RM(images,tree:*,nocontent,noparent,notop) --> <!-- /RM -->
<!-- RM(definitions,images,tree:*,nocontent,noparent,notop,table) --> <!-- /RM -->
<!-- RM(images,tree:*,nocontent,noparent,notop,table) --> <!-- /RM -->
I tried to put rules as close to Markdown specifciation and way how GitHub works with Markdown.
MIT of course