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

Tips, tricks and tools for creating your own data-driven app, brought to you in partnership with Qlik.

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!

 

Explore data-driven apps with less coding and query writing, brought to you in partnership with Qlik.

Topics:

Published at DZone with permission of Lorna Mitchell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}