Skip to main content

mdninja + markdown + jinja2 = beautiful HTML

Project description

mdninja + markdown + jinja2 = beautiful HTML documents

mdninja is a document processor that converts markdown documents into HTML document by applying Jinja2 templating.


pip install mdninja


Simple use:

mdninja -o doc.html

If you want to use a different template:

mdninja -o doc.html --template=stylish.html

The default template is:

<!DOCTYPE html>
                <title>{% for title in meta.title %}{{title}} {% endfor %}</title>
                <h1>{% for title in meta.title %}{{title}} {% endfor %}</h1>
                {{ body }}

Metadata (like title above) is added to the document by adding metadata headers like this at the top of the file

Title: A simple document

Alternatively, you can specify the meatadata using a YAML style header too:

title: A simple document

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mdninja, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size mdninja-1.0.1-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mdninja-1.0.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page