instant-markdown-d is a small Node.js server that enables real-time compilation and previewing of Markdown (and LaTEX, reST, etc) files in a browser. A plugin can easily be written for any text editor to interface with it. One currently exists for VIm: https://github.com/suan/vim-instant-markdown
[sudo] npm -g install instant-markdown-d
- If you're on Linux and the
xdg-openexecutable is not present, install
xdg-utilsthrough your package manager
- If you plan on previewing any formats other than github-flavored-markdown, install pandoc
Running the server
$ cat <markdown_file> | instant-markdown-d
|Action||HTTP Method||Request URL||Request Body|
|Refresh Markdown on page||PUT||
|Set input format||PUT||
- By default,
- You don't have to call the set input format endpoint if you're only using github-flavored-markdown (gfm).
markdownis for the "plain" markdown format, which doesn't have any of the Github-added features.
This module installs a second executable,
instant-markdown, which just converts a given markdown file, opens it in your default browser, and exits - perfect for cases where you simply want to read a markdown file. Usage:
instant-markdown invocation will create a tempfile that won't be deleted until your machine is restarted, so be wary of calling it thousands of times in a script.
Aaron Lampros's Docter, which is the underlying Markdown converter and styler.