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.

Installation

pip install mdninja

Usage

Simple use:

mdninja doc.md -o doc.html

If you want to use a different template:

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

The default template is:

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

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.

Source Distribution

mdninja-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distributions

mdninja-1.0.0-py3.6.egg (3.8 kB view details)

Uploaded Source

mdninja-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file mdninja-1.0.0.tar.gz.

File metadata

  • Download URL: mdninja-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mdninja-1.0.0.tar.gz
Algorithm Hash digest
SHA256 348388bba12a6d2de6575cc00fcdf9626344f6cb4262cc742830fe9db4874c90
MD5 2bb80524c086cd799e3da2c05162b90c
BLAKE2b-256 87d9378cd3d36dffb4f715232c8194355054225951c8f6e46a5c5bcc40c44edb

See more details on using hashes here.

File details

Details for the file mdninja-1.0.0-py3.6.egg.

File metadata

  • Download URL: mdninja-1.0.0-py3.6.egg
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mdninja-1.0.0-py3.6.egg
Algorithm Hash digest
SHA256 a5c6ae256175a75e1641a77878dc769039d69c0dd910fbf44c65e58c85d85a87
MD5 a471c8bb1d8aadaf337e06a01b005ed1
BLAKE2b-256 b154506827f1026a9dbdedb72705ae9ef56704f1861e2fa8b486598e44913e33

See more details on using hashes here.

File details

Details for the file mdninja-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mdninja-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3ef973ce2ed53b0470d602f7468e4a4b145ce951e472a5bcd0f73e15b0736c4
MD5 8a555eb1a43c09b224f09bbc52bc3df2
BLAKE2b-256 de6a1e9e27b6d7e9efe48642e057b064d08a278689e30178c00721fa77241b90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page