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 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
Close
Hashes for ksconf-jinja-markdown-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970904ed6a704f7e1a6353122198522971be8d47eaa026af786397f56e3c1dd0 |
|
MD5 | 4dc4439665b8d062d520fdb1558008d3 |
|
BLAKE2b-256 | 950c6ce81d1ed8191dee94809be64d73c02af869b8a90af2bbf79c9f7f159666 |
Close
Hashes for ksconf_jinja_markdown-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68e96fe6261228cda0027d100ca519ee935a15db021b65761c5887ff8c62ee78 |
|
MD5 | cb8b88cce6ac81c3451dc89479b45605 |
|
BLAKE2b-256 | 47f0c7cf93b4e227b84b80afe14cd5a99d60369e9aa9aa73edd70fd1ce1281e9 |