=======
mdninja
=======
**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
---
Raw data
{
"_id": null,
"home_page": "https://github.com/btbytes/mdninja",
"name": "mdninja",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.9",
"maintainer_email": "",
"keywords": "markdown jinja2 publishing",
"author": "Pradeep Gowda",
"author_email": "btbytes+mdninja@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/24/8a/8c2e271fac8d3e26e7bbc404c2e01595ded365a652267e90d62346d1ca7f/mdninja-1.0.3.tar.gz",
"platform": null,
"description": "=======\nmdninja\n=======\n\n**mdninja + markdown + jinja2 = beautiful HTML documents**\n\n`mdninja` is a document processor that converts markdown documents into HTML document by applying Jinja2 templating.\n\nInstallation\n------------\n\n::\n\n pip install mdninja\n\nUsage\n-----\n\nSimple use:\n\n::\n\n mdninja doc.md -o doc.html\n\n\nIf you want to use a different template:\n\n::\n\n mdninja doc.md -o doc.html --template=stylish.html\n\n\nThe default template is:\n\n::\n\n\t<!DOCTYPE html>\n\t<html>\n\t\t<head>\n\t\t\t<title>{% for title in meta.title %}{{title}} {% endfor %}</title>\n\t\t</head>\n\t\t<body>\n\t\t\t<h1>{% for title in meta.title %}{{title}} {% endfor %}</h1>\n\t\t\t{{ body }}\n\t\t\t<hr/>\n\t\t</body>\n\t</html>\n\nMetadata (like `title` above) is added to the document by adding metadata headers like this at the top of the file\n\n::\n\n Title: A simple document\n\n\nAlternatively, you can specify the meatadata using a YAML style header too:\n\n::\n\n\t---\n\ttitle: A simple document\n\t---\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "mdninja + markdown + jinja2 = beautiful HTML",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/btbytes/mdninja"
},
"split_keywords": [
"markdown",
"jinja2",
"publishing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5a7949c314837f5e6242ec32fd00dcbdc1d9617984019fc6b866ad9af1dcbc27",
"md5": "4d8cadde8961db293af9f44cd5932c43",
"sha256": "a0216ca77edcaa3c849e08a687b2aabc19a7899bc0856a6209fb68ced3d2ff99"
},
"downloads": -1,
"filename": "mdninja-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4d8cadde8961db293af9f44cd5932c43",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.9",
"size": 3150,
"upload_time": "2023-05-23T14:52:47",
"upload_time_iso_8601": "2023-05-23T14:52:47.080481Z",
"url": "https://files.pythonhosted.org/packages/5a/79/49c314837f5e6242ec32fd00dcbdc1d9617984019fc6b866ad9af1dcbc27/mdninja-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "248a8c2e271fac8d3e26e7bbc404c2e01595ded365a652267e90d62346d1ca7f",
"md5": "41bca4c7bb0548448efb33bbac7e45b9",
"sha256": "9132b81c648c6b6f0bdf7be4e2cc7d823c2ca07356c6203829d46a789263c150"
},
"downloads": -1,
"filename": "mdninja-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "41bca4c7bb0548448efb33bbac7e45b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.9",
"size": 3038,
"upload_time": "2023-05-23T14:52:50",
"upload_time_iso_8601": "2023-05-23T14:52:50.048321Z",
"url": "https://files.pythonhosted.org/packages/24/8a/8c2e271fac8d3e26e7bbc404c2e01595ded365a652267e90d62346d1ca7f/mdninja-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-23 14:52:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "btbytes",
"github_project": "mdninja",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mdninja"
}