@hackage hamlet0.4.2
Haml-like template files that are compile-time checked
Categories
License
BSD-3-Clause
Maintainer
Michael Snoyman <michael@snoyman.com>
Links
Versions
Deprecated
Dependencies (7)
- base >=4 && <5
- blaze-html >=0.1.1 && <0.2
- bytestring >=0.9 && <0.10
- failure >=0.1.0 && <0.2
- parsec >=2 && <4
- template-haskell <2.5 Show all…
Dependents (54)
@hackage/yesod-auth-fb, @hackage/yesod-auth-smbclient, @hackage/yesod-tableview, @hackage/yesod-vend, @hackage/hledger, @hackage/yesod-default, Show all…
Package Flags
buildtests
(off by default)
Build the executable to run unit tests
Hamlet gives you a type-safe tool for generating HTML code. It works via Quasi-Quoting, and generating extremely efficient output code. The syntax is white-space sensitive, and it helps you avoid cross-site scripting issues and 404 errors. Please see the documentation at http://docs.yesodweb.com/hamlet/ for more details.
As a quick overview, here is a sample Hamlet template:
!!!
%html
%head
%title Hamlet Demo
%body
%h1 Information on $name.person$
%p $*name.person$ is $age.person$ years old.
%h2
$if isMarried.person
Married
$else
Not married
%ul
$forall children.person child
%li $child$
%p
%a!href=@page.person@ See the page.
^footer^