Skip to content
This repository

An xhtml-based templating engine, allowing Haskell functions to be bound to XML tags.

This branch is 7 commits ahead and 217 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 examples
Octocat-spinner-32 extra
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .ghci
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CONTRIBUTORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.SNAP.md
Octocat-spinner-32 README.md
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 TODO
Octocat-spinner-32 haddock.sh
Octocat-spinner-32 heist.cabal
README.md

Heist

Heist, part of the Snap Framework, is a Haskell library for xhtml templating. It uses simple XML tags to bind values to your templates in a straightforward way. For example, if you were to put the following in a template:

<bind tag="message">some text</bind>
<p><message/></p>

the resulting xhtml would be

<p>some text</p>

Likewise, if you need to add text to an attribute,

<bind tag="special">special-id</bind>
<div id="$(special)">very special</div>

gives you

<div id="special-id">very special</div>

Values can also be pulled from "Splices" (see the documentation for more information.)

Building heist

The heist library is built using Cabal and Hackage. Just run

cabal install

from the heist toplevel directory.

Building the Haddock Documentation

The haddock documentation can be built using the supplied haddock.sh shell script:

./haddock.sh

The docs get put in dist/doc/html/.

Building the testsuite

To build the test suite, cd into the test/ directory and run

$ cabal configure
$ cabal build

From here you can invoke the testsuite by running:

$ ./runTestsAndCoverage.sh 

The testsuite generates an hpc test coverage report in test/dist/hpc.

Something went wrong with that request. Please try again.