Crates.io | askama-filters |
lib.rs | askama-filters |
version | 0.1.3 |
source | src |
created_at | 2019-04-23 03:21:03.232094 |
updated_at | 2020-01-26 21:47:46.83745 |
description | Extra template filters for Askama |
homepage | |
repository | https://git.rushsteve1.us/rushsteve1/askama_filters |
max_upload_size | |
id | 129582 |
size | 16,886 |
Additional template filters for the Askama templating library.
This library is intended to be used alongside Askama and is effectively useless without it.
Inside any module that is defining an Askama Template
just use askama_filters::filters;
and they will be available
in the HTML template.
If you wish to use this library in addition to your own filters
create a module named filters
and add use askama_filters::filters::*
to it. Then import that module wherever you are creating Template
s
and both sets of filters should be available.
This is a standard Rust project so just use:
$ cargo build
markdown
: adds the markdown
and md
filters which can be used to convert
plain-text to HTML. It is intended to be used like this:
{{ raw|e|md|safe }}
with the e
escaping, and the safe
marking the resultant HTML as safe.
chrono
adds the date
filter for date and time formatting.
Please email any issues or patches to rushteve1
at rushsteve1.us
.