A text converter that transforms markdown into HTML, powered by unified.js and bun.sh.
remark-breaksremark-frontmatterremark-gfmremark-parse
md2hype is easily installable via Homebrew, built with a JavaScript runtime bun.sh:
brew install shotanue/tap/md2hypeConvert a markdown file (foo.md) to HTML, including both HTML content and parsed frontmatter in JSON format:
md2hype --file foo.mdExample Input (foo.md):
---
tag:
- foo
---
hello worldExample Output:
{
"html": "<p>hello world</p>",
"frontmatter": {
"tag": ["foo"]
}
}For scenarios where only the HTML output is required, excluding frontmatter:
md2hype --file foo.md --htmlExample Output:
<p>hello world</p>-
Standard Input Support: md2hype can also be used with standard input (stdin).
cat foo.md | md2hype -
Help Option: For more information about the usage and options, use the
--helpor-hflag.md2hype --help