An xhtml-based templating engine, allowing Haskell functions to be bound to XML tags.
Haskell CSS Smarty Shell
Latest commit 929ebf1 Sep 25, 2016 @mightybyte mightybyte committed on GitHub Merge pull request #94 from trofi/master
heist.cabal: add missing test emplates to release tarball
Permalink
Failed to load latest commit information.
docs Lots of cleanup. Fixed test cases. Refreshed the tutorial. Apr 23, 2010
examples Removed "snap:" from examples. May 22, 2010
extra Remove Droid serif from the haddocks Feb 5, 2011
src
test
.ghci Cherry-pick map-syntax to pre-1.0 Aug 4, 2014
.gitignore Fix doctype bug that made doctypes in one template affect other templ… Apr 27, 2016
.stylish-haskell.yaml Add stylish-haskell config file Apr 5, 2014
.travis.yml Add --enable-coverage and remove -fhpc to please cabal sdist Aug 7, 2016
CHANGELOG.md Update changelog Aug 17, 2016
CONTRIBUTORS relax blaze-html dependency, as heist builds fine with blaze-html 0.5… Apr 23, 2012
LICENSE Commit the new re-structured heist library Mar 19, 2010
README.SNAP.md Update READMEs Oct 24, 2011
README.md Add travis badge Aug 2, 2016
Setup.hs
TODO Updated TODO Jun 2, 2010
haddock.sh Fix haddock.sh Feb 5, 2011
heist.cabal heist.cabal: add missing test emplates to release tarball Sep 24, 2016

README.md

Heist

Build Status

Heist, part of the Snap Framework, is a Haskell library for xml/html 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.