Crates.io | markdown2html-converter |
lib.rs | markdown2html-converter |
version | 1.1.12 |
source | src |
created_at | 2018-10-17 09:36:41.643588 |
updated_at | 2023-11-13 04:54:42.775576 |
description | A tool for converting a Markdown file to a single HTML file with built-in CSS and JS. |
homepage | https://magiclen.org/markdown2html-converter |
repository | https://github.com/magiclen/markdown2html-converter |
max_upload_size | |
id | 91124 |
size | 1,389,691 |
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 [OPTIONS] <MARKDOWN_PATH>
Arguments:
<MARKDOWN_PATH> Specify the path of your Markdown file
Options:
-t, --title <TITLE> Specify the title of your HTML file
-o, --html-path <HTML_PATH> Specify the path of your HTML file
-f, --force Force to output if the HTML file exists
--no-safe Allow 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
--css-path <CSS_PATH> Specify the path of your custom CSS file
--highlight-js-path <HIGHLIGHT_JS_PATH> Specify the path of your custom highlight.js file
--highlight-css-path <HIGHLIGHT_CSS_PATH> Specify the path of your custom CSS file for highlight.js code blocks
--mathjax-js-path <MATHJAX_JS_PATH> Specify the path of your custom single MATH_JAX.js file
-h, --help Print help
-V, --version Print version
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.
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. The default mathjax.js are using the tex-mml-chtml configuration file.