@sharoussh/md-to-html
v1.0.0
Published
Zero-dependency CLI to convert Markdown files to HTML
Downloads
82
Maintainers
Readme
md-to-html
Zero-dependency CLI to convert Markdown files to HTML — with optional styling and full page wrapper.
Install
npm install -g md-to-htmlOr run without installing:
npx md-to-html README.mdUsage
md-to-html <input.md> [output.html] [options]Examples
# Convert and save as README.html (default)
md-to-html README.md
# Specify output file
md-to-html README.md docs/index.html
# Fragment only (no <html> wrapper)
md-to-html README.md --no-wrap
# Custom page title
md-to-html README.md --title "My Docs"
# No default CSS
md-to-html README.md --no-cssWhat it supports
| Markdown | Output |
|----------|--------|
| # Heading | <h1> – <h6> |
| **bold** | <strong> |
| *italic* | <em> |
| ***bold+italic*** | <strong><em> |
| ~~strikethrough~~ | <del> |
| `inline code` | <code> |
| [link](url) | <a href> |
|  | <img> |
| ``` fenced blocks | <pre><code> |
| - item / * item | <ul><li> |
| 1. item | <ol><li> |
| > quote | <blockquote> |
| --- | <hr> |
Options
| Flag | Description |
|------|-------------|
| --no-wrap | Output HTML fragment only |
| --no-css | Skip default styles |
| --title=TEXT | Set the <title> tag |
| --help | Show help |
Running tests
npm testLicense
MIT
