heist: An Haskell template system supporting both HTML5 and XML.

[ bsd3, library, snap, web ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.1, 0.1.2, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.5.0.1, 0.5.1.0, 0.5.1.1, 0.5.2, 0.5.2.1, 0.5.3, 0.6.0, 0.6.0.1, 0.6.1, 0.7.0, 0.7.0.1, 0.8.0, 0.8.1, 0.8.1.1, 0.8.2, 0.10.0, 0.10.1, 0.10.2, 0.10.2.1, 0.11.0, 0.11.0.1, 0.11.1, 0.12.0, 0.13.0, 0.13.0.1, 0.13.0.2, 0.13.0.3, 0.13.0.4, 0.13.0.5, 0.13.0.6, 0.13.1, 0.13.1.1, 0.13.1.2, 0.14.0, 0.14.0.1, 0.14.1, 0.14.1.1, 0.14.1.2, 0.14.1.3, 0.14.1.4, 1.0.0.0, 1.0.1.0, 1.0.1.1, 1.0.1.2, 1.0.1.3, 1.1, 1.1.0.1, 1.1.1.0, 1.1.1.1, 1.1.1.2
Change log CHANGELOG.md
Dependencies aeson (>=0.6 && <2.3), attoparsec (>=0.10 && <0.15), base (>=4.5 && <5), blaze-builder (>=0.2 && <0.5), blaze-html (>=0.4 && <0.10), bytestring (>=0.9 && <0.13), containers (>=0.2 && <1.0), directory (>=1.1 && <1.4), directory-tree (>=0.10 && <0.13), dlist (>=0.5 && <1.1), filepath (>=1.3 && <2), hashable (>=1.1 && <2), indexed-traversable (>=0.1.1 && <0.2), lifted-base (>=0.2 && <0.3), map-syntax (>=0.3 && <0.4), monad-control (>=0.3 && <1.1), mtl (>=2.0 && <2.4), process (>=1.1 && <1.7), random (>=1.0.1.0 && <1.3), semigroups (>=0.16 && <0.19), text (>=0.10 && <2.2), time (>=1.1 && <2), transformers (>=0.3 && <0.7), transformers-base (>=0.4 && <0.5), unordered-containers (>=0.1.4 && <0.3), vector (>=0.9 && <0.14), xmlhtml (>=0.2.3.5 && <0.4) [details]
Tested with ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.8, ghc ==9.6.5, ghc ==9.8.2, ghc ==9.10.1
License BSD-3-Clause
Author Doug Beardsley, Gregory Collins
Maintainer snap@snapframework.com
Revised Revision 3 made by cydparser at 2024-07-04T22:38:48Z
Category Web, Snap
Home page http://snapframework.com/
Source repo head: git clone https://github.com/snapframework/heist.git
Uploaded by cydparser at 2023-10-22T23:19:27Z
Distributions Debian:1.1.0.1, FreeBSD:0.14.1.1, LTSHaskell:1.1.1.2, NixOS:1.1.1.2, Stackage:1.1.1.2
Reverse Dependencies 24 direct, 50 indirect [details]
Downloads 70979 total (80 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-10-23 [all 1 reports]

Readme for heist-1.1.1.2

[back to package description]

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.