Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ksconf-jinja-markdown-1.2.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

ksconf_jinja_markdown-1.2.0-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page