@muzza3000/md-to-html
v1.0.1
Published
Small Node CLI to convert Markdown files to HTML
Readme
@muzza3000/md-to-html
Small Node CLI to convert Markdown files to HTML.
Install
npm install -g @muzza3000/md-to-htmlUsage
npm will install the executable as:
md-to-html [options] <input.md> [output.html]If output.html is omitted, the CLI writes next to the input file using the same name with an .html extension.
Options
-e,--embed-images: embed local images as base64 data URLs. This is the default.-E,--no-embed-images: keep local image file paths instead of embedding them.-f,--fragment: output only the rendered HTML fragment.-F,--full-document: output a full HTML document. This is the default.-s,--stylesheet: add the built-in stylesheet with the SLB/Noto font stack.-h,--help: show the help message.
Examples
Convert a file to a full HTML document:
md-to-html notes.mdWrite to a specific output file:
md-to-html notes.md dist/notes.htmlKeep image paths instead of embedding them:
md-to-html --no-embed-images notes.mdRender only the HTML fragment and include the stylesheet block:
md-to-html --fragment --stylesheet notes.md snippet.html