Markdown to HTML Converter is a free tool for converting a Markdown file to a single HTML file with built-in CSS and JS.
``` 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
--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.
ARGS:
Markdown is converted to HTML by the comrak crate. The default stylesheet (the CSS file) is from sindresorhus/github-markdown-css.
If ```
is used in the input Markdown file, the highlight.js will be automatically embedded in the output HTML file. The preset supported languages are listed below.
|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|
If #{{
- }}#
or #{{{
- }}}#
is used in the input Markdown file, the mathjax.js will be automatically embedded in the output HTML file. #{{
and }}#
are inlineMath
delimiters. #{{{
and }}}#
are displayMath
delimiters. mathjax.js can be generated by pkra/MathJax-single-file. The default mathjax.js are using the TeX-MML-AM_CHTML configuration file.