hackmd-cli
hackmd-cli copied to clipboard
Direct conversion from markdown to html with hackmd-cli
Hi, I am looking to integrate an auto-publishing pipeline with GitHub Actions. Our current documentation is written in HackMD-favoured markdown, is there a way to directly convert markdown to html file with a command like the following:
hackmd-cli export --import filename.md --html filename.html
Many thanks!
Have a look at Pandoc, it's the holy grail in Markdown land. :wink:
You can directly feed the hackmd-cli export to pandoc:
hackmd-cli export --md [ID] | pandoc --from=markdown --to=html --output=filename.html
You probably want to customize the set of Pandoc extensions in use. Also you might wanna consider writing a custom Pandoc template for your HTML output (or re-using an existing one from someone else).