Welcome to Tpll’s documentation!¶
Tpll is a Template Engine for Haskell that’s highly inspired in the Django Template Language.
This is what it looks like:
<h1>Hello World!</h1>
<ul>
{% for item in list %}
<li>{{ item|upper }}
{% endfor %}
</ul>
With the following context:
import Tpll.Context (ctx, cList, cStr, cInt)
import Tpll.Tags.Default (getAllDefaultTags)
let ctx' = ctx [("list", cList [cStr "foo", cStr "bar", cInt 42])]
renderFile "test.html" ctx' getAllDefaultTags
Will output:
<h1>Hello world!</h1>
<ul>
<li>FOO
<li>BAR
<li>42
</ul>
Table of Contents: