Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Generating HTML from Markdown with Pandoc

DZone's Guide to

Generating HTML from Markdown with Pandoc

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

I'm writing more and more things these days that are not code, and my content-managing toolchains are becoming more developed all the time. I've written in reStructuredText, Asciidoc and LaTeX, and today I'm working on an article that eventually wants to be HTML, but I'm creating it in Markdown because it's much easier.

My Swiss Army knife of document formats is a program called pandoc. It's absolutely fabulous, powerful and not too complicated, as long as you don't need to do anything too complicated. It will guess input and output formats from file extensions, or you can be more specific if you need to. Today's command looks like this:

pandoc article.md -o article.html

You won't be surprised to hear that this command takes a file called article.md, which contains my markdown, and outputs a file called article.html containing the HTML. I also use this to convert between all the various text markups and HTML, and also PDF and Office document formats. It's a very comprehensive tool!

 

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}