Description
A template engine for HTML.
Description
Flamethrower is a simpler indentation-based template language for HTML.
It’s intended to be a port of Razor Leaf, but it has quite a ways to go before reaching that status.
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
import Text.Flamethrower (flamethrower)
import qualified Data.Text.IO
render name = [flamethrower|
p id: "greeting"
"Hello, "
em "#{name}"
"!"
|]
main = Data.Text.IO.putStrLn $ render "world"
-- <p id="greeting">Hello, <em>world</em>!</p>