{{ “HTML Templates For Humans” }}
https://ginger.tobiasdammers.nl/
https://github.com/tdammers/ginger/
https://hackage.haskell.org/package/ginger
tdammers@gmail.com
irc.freenode.org - tdammers
https://ginger.tobiasdammers.nl/
https://github.com/tdammers/ginger/
https://hackage.haskell.org/package/ginger
tdammers@gmail.com
irc.freenode.org - tdammers
Jinja2 HTML templating for Haskell.
<h1>{{ title }}</h1>
<div>{{ intro|markdown }}</div>
{% for page in pages %}
<div class="page">
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
{% if page.image %}
<img class="page-image"
src="/images/{{ page.image|urlencode }}"/>
{% endif %}
{{ page.intro|markdown|str|ellipse(200) }}
</div>
{% endfor %}
Interpret templates at runtime → fast dev cycles, no recompiling, no Haskell toolchain needed
Familiar syntax → no need to learn yet another template language
Complete expression language → logic does belong in templates, as long as it’s display logic
Fully sandboxable → host application determines what templates can do; use type system to enforce
Automatic HTML-encoding → secure defaults, bye-bye XSS; type system to the rescue
DOM-agnostic → flexibility first
is
(tests){% filter %}
Q
(for QQ / TH)Full list: https://github.com/tdammers/ginger/issues
Ginger Website: https://ginger.tobiasdammers.nl/
Hackage: https://hackage.haskell.org/package/ginger
GitHub: https://github.com/tdammers/ginger/
Jinja2: http://jinja.pocoo.org/
Twig: https://twig.symfony.com/
This slideshow: https://ginger.tobiasdammers.nl/zurihac