Markup
The Roadmarks comment
Roadmarks fills in the space between an opening and a closing HTML comment. Each comment starts a line:
<!-- RM -->
<!-- /RM -->
Each time it runs, Roadmarks replaces everything between the two comments. Write your own text outside them. Markdown viewers, such as GitHub and npm, hide the comments and show the links.
Options
To change what Roadmarks writes, list options in brackets, separated by
commas. An option on its own turns a setting on. Write name:value to
give a value:
<!-- RM(tree:*,depth:2,nocontent) -->
<!-- /RM -->
| Option | Default | Description |
|---|---|---|
depth:<n> |
10 |
How many levels of headings and folders to list. |
tree:<path> |
off | List the Markdown files under a path, relative to the file. See Trees of files. |
nocontent |
off | Leave out the headings of the file. |
nofiles |
off | Leave out the file links. Use it with list-images or list-definitions. |
noparent |
off | Leave out the link to the parent README.md. |
notop |
off | Leave out the link to the top README.md. |
nosiblings |
on | Leave out the links to the previous and next file in the folder. Write nosiblings:false to add them. |
list-images |
off | List the images in each file. |
list-definitions |
off | List the terms in each file that are marked as definitions. |
table |
off | Write images, definitions, or titles as a table. |
To turn off a setting that is on by default, write name:false.
Rules
Roadmarks follows the way GitHub shows Markdown:
- The level 1 heading names the file in lists. If the file has none, Roadmarks uses the file name.
- A
README.md, in any letter case, stands for its folder. The other files in the folder are its children. - Lists of files are in alphabetical order of their titles.
- A table of contents that has both headings and files lists the headings first.
- Headings inside fenced code blocks, indented code blocks, and
RM-IGNOREblocks do not count. - Links to headings use anchors in the GitHub style.