Redsandro Redsandro - 10 days ago 5
HTML Question

How can I export markdown documentation to different formats?

Writing Documentation



As a developer, I've been looking for the easiest way to write and update documentation. Not a boring text that screams "don't read me", but something happily (and easily) formatted with extra easy support for code.

From
LaTeX
to
wiki
to
markdown
, just to name a few, I think markdown is about as close as it gets. But the document itself is very nerdy and not very portable. This will need to become
html
and
pdf
.

Markdown Editor



So basically I am looking for an editor, converter, or any clever trick I haven't thought of, to turn this documentation into
html
and
pdf
.

Hands down the simplest editor I have found is StackEdit, but it doesn't export
html
well; it depends on online stylesheets that aren't linked properly and the exported
html
is pretty unbearable to see. It wouldn't work offline anyway.

Export html and pdf



I am looking for any way to do this properly. I don't mind if there's some stand alone app or script that converts the
markdown
file into proper
html
. I need someone to show me the tricks in documentation-generating that I can't find.

Pdf
is a different story. I think I spammed my computer full with html to pdf converters, and each of them added spam and watermarks to my awesomely clean documentation.

Answer

For choice of output formats, you probably can't beat pandoc - it will convert markdown (and many other formats) into html,pdf,docbook and a number more. It's defaults are fairly sane, but you can include your own templates easily enough if you wish. It also has support for language specific code highlighting in blocks.

Comments