Markdown to HTML Converter

Build Status

Markdown to HTML Converter is a free tool for converting a Markdown file to a single HTML file with built-in CSS and JS.

Help

``` EXAMPLES: markdown2html-converter /path/to/file.md # Convert /path/to/file.md to /path/to/file.html, titled "file" markdown2html-converter /path/to/file.md -o /path/to/output.html # Convert /path/to/file.md to /path/to/output.html, titled "output" markdown2html-converter /path/to/file.md -t "Hello World!" # Convert /path/to/file.md to /path/to/file.html, titled "Hello World!"

USAGE: markdown2html-converter [FLAGS] [OPTIONS]

FLAGS: --no-safe Allows raw HTML and dangerous URLs. --no-highlight Not allow to use highlight.js. --no-mathjax Not allow to use mathjax.js. --no-cjk-fonts Not allow to use CJK fonts. -h, --help Prints help information -V, --version Prints version information

OPTIONS: -t, --title Specifies the title of your HTML file. -o, --html-path <HTML_PATH> Specifies the path of your HTML file. --css-path <CSS_PATH> Specifies the path of your custom CSS file. --highlight-js-path <HIGHLIGHT_JS_PATH> Specifies the path of your custom highlight.js file. --highlight-css-path <HIGHLIGHT_CSS_PATH> Specifies the path of your custom CSS file for highlight.js code blocks.</p> <pre><code> --mathjax-path-path <MATHJAX_JS_PATH> Specifies the path of your custom single MathJax.js file. --mathjax-config-path <MATHJAX_CONFIG_PATH> Specifies the path of your custom config JS file for MathJax.js. </code></pre> <p>ARGS: <MARKDOWN_PATH> Specifies the path of your Markdown file. ```</p> <h2>Dependency</h2> <p>Markdown is converted to HTML by the <a href="https://crates.io/crates/comrak">comrak</a> crate. The default stylesheet (the CSS file) is from <a href="https://github.com/sindresorhus/github-markdown-css">sindresorhus/github-markdown-css</a>. </p> <p>If <code>```</code> is used in the input Markdown file, the <a href="https://highlightjs.org/">highlight.js</a> will be automatically embedded in the output HTML file. The preset supported languages are listed below.</p> <p>|Common|Other| |---|---| |Apache|Go| |Bash|Rust| |C#| |C++| |CSS| |CoffeeScript| |Diff| |HTML, XML| |HTTP| |Ini, TOML| |JSON| |Java| |JavaScript| |Makefile| |Markdown| |Nginx| |Objective-C| |PHP| |Perl| |Properties| |Python| |Ruby| |SQL| |Shell Session|</p> <p>If <code>#{{</code> - <code>}}#</code> or <code>#{{{</code> - <code>}}}#</code> is used in the input Markdown file, the <a href="https://www.mathjax.org/">mathjax.js</a> will be automatically embedded in the output HTML file. <code>#{{</code> and <code>}}#</code> are <code>inlineMath</code> delimiters. <code>#{{{</code> and <code>}}}#</code> are <code>displayMath</code> delimiters. <strong>mathjax.js</strong> can be generated by <a href="https://github.com/pkra/MathJax-single-file">pkra/MathJax-single-file</a>. The default <strong>mathjax.js</strong> are using the <a href="http://docs.mathjax.org/en/latest/config-files.html#the-tex-mml-am-chtml-configuration-file">TeX-MML-AM_CHTML</a> configuration file.</p> <h2>A Markdown Example</h2> <p><a href="https://github.com/magiclen/markdown2html-converter/blob/master/example.md">The Markdown File</a></p> <p><a href="https://jsfiddle.net/magiclen/jgs324w0/">The HTML File</a></p> <h2>License</h2> <p><a href="LICENSE">MIT</a></p> </body></html>