@hackage flamethrower0.0.4.1

A template engine for HTML

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
import Text.Flamethrower.Escape
import Data.Text
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>