Official filter and tag addons for pongo2
.gitignore | ||
.travis.yml | ||
filters_test.go | ||
filters.go | ||
LICENSE | ||
README.md |
pongo2-addons
Official filter and tag add-ons for pongo2. Uses 3rd-party-libraries.
How to use and install
Install via go get -u github.com/flosch/pongo2-addons
.
Simply add the following import line after importing pongo2:
_ "github.com/flosch/pongo2-addons"
All additional filters/tags will be registered automatically.
Filters
-
Regulars
- slugify (creates a slug for a given input)
- filesizeformat (human-readable filesize; takes bytes as input)
-
Markup
- markdown (parses markdown text and outputs HTML; hint: use the safe-filter to make the output not being escaped)
-
Humanize
- timesince/timeuntil/naturaltime (human-readable time [duration] indicator)
- intcomma (put decimal marks into the number)
- ordinal (convert integer to its ordinal as string)
Tags
(nothing yet)