Skip to content
Datasette plugin for rendering Markdown
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
datasette_render_markdown
tests
LICENSE
README.md
setup.py

README.md

datasette-render-markdown

PyPI CircleCI License

Datasette plugin for rendering Markdown.

Install this plugin in the same environment as Datasette to enable this new functionality:

pip install datasette-render-markdown

The plugin currently only works against columns with a name ending in _markdown.

Their contents will be rendered using Python-Markdown. The resulting HTML is then run through Bleach to avoid the risk of XSS security problems.

You can try it out using the following query:

select '# Hello there

* This is a list
* of items

[And a link](https://github.com/simonw/datasette-render-markdown).'
as demo_markdown

Markdown in templates

The plugin also adds a new template function: render_markdown(value). You can use this in your templates like so:

{{ render_markdown("""
# This is markdown

* One
* Two
* Three
""") }}
You can’t perform that action at this time.