Markdown rendering support for Jinja2 templates within Ksconf
Project description
ksconf-jinja-markdown
Add Markdown rendering support to the Ksconf packing ecosystem.
This allows rendering markdown into html when using Jinja (*.j2
) files within
a rendered Splunk app using the ksconf package
command.
Jinja filter
markdown2html
- Filter used to convert markdown text into HTML output.
Install
pip install -U ksconf-jinja2-markdown
Installation can be validated by running: ksconf --version
Example Usage
Simple XML with an input
Contents of my_app/default/data/view/my_dashboard.xml.j2
:
<dashboard>
<row>
<html>
{{ description | markdown2html }}
</html>
</row>
</dashboard>
Contents of inputs.json
:
{
"description": "# Title\n## Header 2\n* bulleted\n* list\n"
}
ksconf package --enable-handler=jinja --template_vars @inputs.conf my_app
Release steps
python setup.py build
python setup.py bdist_wheel sdist
twine upload dist/ksconf_jinja_markdown-*any.whl dist/ksconf-jinja-markdown-*.tar.gz
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ksconf-jinja-markdown-1.2.0.tar.gz
.
File metadata
- Download URL: ksconf-jinja-markdown-1.2.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd7e2e42366453394b555fe00e469ce1bd0fed4cd3bdbc26ba4e4b44f1825d7d |
|
MD5 | ccea86aaa962bd194bbf289e5d741fab |
|
BLAKE2b-256 | 23a11bc7a43b8f044309f7546cb9716de3cf9990fe3d9508cae73333749423d3 |
File details
Details for the file ksconf_jinja_markdown-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: ksconf_jinja_markdown-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7220d2e357b4b5e364ef15069b69f06db0d4c6af8341a27e8fc66af7c1183085 |
|
MD5 | c8adaa5c01ee6c1215c55b9936f269bb |
|
BLAKE2b-256 | dd2a37ab7a3e902ff1b58468ab7161aed0a06025cd076c7285f7cab12dba48d5 |