Skip to main content

A jinja2 extension that adds a {% markdown %} tag to templates.

Project description

# Jinja2 Markdown extension [![Build Status](https://travis-ci.org/danielchatfield/jinja2_markdown.png)](https://travis-ci.org/danielchatfield/jinja2_markdown)

A simple extension for adding a `{% markdown %}{% endmarkdown %}` tag to Jinja.

## Installation

`pip install jinja2_markdown`

## Usage

```python
from jinja2_markdown import MarkdownExtension


jinja_env.add_extension(MarkdownExtension)

```

or

```python

jinja_env = Environment(extensions=['jinja2_markdown.MarkdownExtension'])
```

## Features

### Automatic whitespace gobble

This works:

```
<article class="article container-very-tight pad-medium highlight-first">
{% markdown %}
Terms of Service
================

In short, we run this website called Volcanic Pixels and you are more
than welcome to use it and the products distributed through it. All we
ask is that you don't use it for things which are illegal or harmful.

***

...
{% endmarkdown %}
</article>
```

## Want a new feature? Bug report?

Open an issue on github, or better submit a pull request.

Project details


Download files

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

Files for jinja2_markdown, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size jinja2_markdown-0.0.3.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page