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.3.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file mdninja-1.0.3.tar.gz
.
File metadata
- Download URL: mdninja-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9132b81c648c6b6f0bdf7be4e2cc7d823c2ca07356c6203829d46a789263c150 |
|
MD5 | 41bca4c7bb0548448efb33bbac7e45b9 |
|
BLAKE2b-256 | 248a8c2e271fac8d3e26e7bbc404c2e01595ded365a652267e90d62346d1ca7f |
File details
Details for the file mdninja-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: mdninja-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0216ca77edcaa3c849e08a687b2aabc19a7899bc0856a6209fb68ced3d2ff99 |
|
MD5 | 4d8cadde8961db293af9f44cd5932c43 |
|
BLAKE2b-256 | 5a7949c314837f5e6242ec32fd00dcbdc1d9617984019fc6b866ad9af1dcbc27 |