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.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file mdninja-1.0.1.tar.gz
.
File metadata
- Download URL: mdninja-1.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b643a9088507df92c3d771642c43e2cf44b037c0f698696e5c8004b994d09ed0 |
|
MD5 | f0c24ffb840beb056515167ec4ed3449 |
|
BLAKE2b-256 | c209a852f45eb94cc7c8156dcd5031bb4918107e816d417b90c72db51f9a15ff |
File details
Details for the file mdninja-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: mdninja-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3668cdb830d98207bf17046c17f30aed2a373cbe04baf794eb3980972e8e5a |
|
MD5 | 285847351c98109c304625e3ae62dbe7 |
|
BLAKE2b-256 | 179caa40711ae602cb576fb8f59ac6e3c4d16294d38bab1a804356118633a325 |