I love pandoc for writing documents. However, sometime you want a lighter solution if (for whatever reason) you cannot use Pandoc.

Python has a fairly decent markdown -> HTML converter in python-markdown. But the output of markdown converter tends to be barebones with no CSS styling and lacks ways to customise the final HTML layout. Jinja2 is a very powerful and friendly templating engine for Python.

mdninja is a nice Command Line Utility that allows you to produce neat looking HTML documents by combining these two nice libraries.

Look at the github page for mdninja for details. The package is also available on Python Package Index.

This requires you to have Python3.4+. I think it's high time for folks to move off Python2.7 for good. I did not take the time to test with/target python2. I'll welcome PRs to that effect if you want to use it with Python 2.