flamethrower

A template engine for HTML https://charmander.me/flamethrower/

Latest on Hackage:0.0.5.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Charmander
Maintained by ~@charmander.me

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>
Used by 1 package:
comments powered byDisqus