Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct conversion from markdown to html with hackmd-cli #28

Open
excurice opened this issue Jul 3, 2020 · 1 comment
Open

Direct conversion from markdown to html with hackmd-cli #28

excurice opened this issue Jul 3, 2020 · 1 comment

Comments

@excurice
Copy link

excurice commented Jul 3, 2020

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!

@salim-b
Copy link

salim-b commented Jul 8, 2020

Have a look at Pandoc, it's the holy grail in Markdown land. 😉

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants