rdd
Preview your Markdown locally as it would appear on GitHub, with live updating
Quick start
Requires Node.js.
$ ls
README.md
$ npm i -g rdd
$ rdd -o
Serving on 0.0.0.0:8888/README.md
Here we’re using the -o
flag to open the rendered Markdown document in our default web browser. The page will be updated automatically whenever we change README.md
.
(rdd
is short for Readme Driven Development.)
Usage
rdd [file]
Renders and serves the given Markdown document
Options:
--help Show help [boolean]
--version Show version number [boolean]
--open, -o Open the rendered Markdown document in your default web browser
[boolean] [default: false]
--port, -p Set the preferred port to serve the rendered document
[number] [default: 8888]
--toc, -t Insert a table of contents into the Markdown document
[boolean] [default: false]
Use <!-- toc -->
and <!-- tocstop -->
to demarcate where a table of contents should be rendered in the Markdown document. (This table of contents will be updated automatically whenever we change the document.)
To “commit” the table of contents to the document, do:
$ rdd -t
Installation
$ npm install --global rdd
Known issues
- Syntax highlighting for code blocks (using Highlight.js) is slightly different from what GitHub actually uses
Prior art
- Grip is a similar tool written in Python
License
MIT