Rust command line tool written that converts Markdown files into HTML pages. Supports tables, strikethrough, code blocks, and more.
- Rust (includes
cargo)
# Clone the repo
git clone https://github.com/osteph32/markdown-to-html.git
cd markdown-to-htmlcargo build --releaseThe compiled binary will be at ./target/release/markdown-to-html.
cargo run -- <file.md>Or with the compiled binary:
./target/release/markdown-to-html <file.md>cargo run -- README.mdThis will produce a README.html file in the same directory as the input file.
- Headings, paragraphs, blockquotes
- Bold, italic,
strikethrough - Ordered and unordered lists
- Inline code and fenced code blocks
- Tables
- Links and images
- Reads the input
.mdfile from the command-line argument - Parses it using
pulldown-cmarkwith extended options enabled - Converts the parsed tokens to an HTML body string
- Wraps the body in a full HTML page with minimal built-in CSS styling
- Writes the result to a
.htmlfile with the same base name as the input
| Language | Rust |
| Crate | pulldown-cmark |
| Build Tool | Cargo |
MIT