Heist is a powerful template system that supports both HTML5 and XML. Some of Heist's features are: Designer-friendly HTML5 (or XML) syntax Templates can be reloaded to make changes visible without recompiling your Haskell code Enforces near-perfect separation of business logic and view Powerful abstraction primitives allowing you to eliminate repetition Easy creation of domain-specific markup languages Built-in support for including JSON and Markdown content in templates Simple mechanism for designer-specified template caching Optional merging of multiple <head> tags defined anywhere in the document


Keywords
library, snap, web, Propose Tags, Skip to Readme, , Index, Quick Jump, Heist, Heist.Compiled, Heist.Compiled.LowLevel, Heist.Internal.Types, Heist.Interpreted, Heist.Splices, Heist.Splices.Apply, Heist.Splices.Bind, Heist.Splices.BindStrict, Heist.Splices.Cache, Heist.Splices.Html, Heist.Splices.Ignore, Heist.Splices.Json, Heist.Splices.Markdown, Heist.TemplateDirectory, heist-1.1.1.2.tar.gz, browse, Package description, Package maintainers, DougBeardsley, GregoryCollins, imalsogreg, cydparser, edit package information , Snap Framework, the documentation, Cabal, Hackage
License
BSD-3-Clause
Install
cabal install heist-1.0.1.1

Documentation

Heist

GitHub CI

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.