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.2.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file mdninja-1.0.2.tar.gz
.
File metadata
- Download URL: mdninja-1.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d73965aa9e02547e8da7435b21d0ecd3a8f4748e175eb0357318a32e79f02b88 |
|
MD5 | 956438956775fba9527d956b52e1967d |
|
BLAKE2b-256 | 0fe6875fb800329fd0b67eea5a77017ff2c989b404d9535f2ba5a7a506d95769 |
File details
Details for the file mdninja-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: mdninja-1.0.2-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 | 1e947ddb5c6b381cb915589e4c68e60fe5fd693168af6f0004cfd12f0f93d740 |
|
MD5 | af182e4c54f3a3b2573d4de67845802d |
|
BLAKE2b-256 | f63a5ddc895ce82d65dd078225294dddffc6305e53d267454d2e96db19149f49 |