This is the documentation for the unsupported version 1.6. Please consider upgrading your code to the latest stable version

Command Line

This functionality has been deprecated in version 1.4 and will be removed in 2.0.

Markdown can be converted at the command line using the ./bin/commonmark script.

Usage

./bin/commonmark [OPTIONS] [FILE]

If no file is given, input will be read from STDIN.

Output will be written to STDOUT.

Examples

Converting a file named document.md

./bin/commonmark document.md

Converting a file and saving its output

./bin/commonmark document.md > output.html

Converting from STDIN

echo -e '# Hello World!' | ./bin/commonmark

Converting from STDIN and saving the output

echo -e '# Hello World!' | ./bin/commonmark > output.html

Edit this page