Created
October 21, 2014 21:11
-
-
Save mango314/8d91f9c3616d35925be8 to your computer and use it in GitHub Desktop.
turning websites into Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O http://jaspervdj.be/blaze | blaze-from-html -v html4-transitional | |
#OR | |
curl -S http://jaspervdj.be/blaze | blaze-from-html -v html4-transitional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docTypeHtml $ do | |
H.head $ do | |
meta ! charset "UTF-8" | |
H.title "BlazeHtml - Home" | |
link ! rel "stylesheet" ! type_ "text/css" ! href "./css/default.css" | |
link ! rel "stylesheet" ! type_ "text/css" ! href "./css/syntax.css" | |
body $ do | |
H.div ! A.id "navigation" $ do | |
a ! href "./" ! A.id "logo" $ "BlazeHtml" | |
a ! href "./benchmarks.html" ! class_ "menu" $ "benchmarks" | |
a ! href "./docs/index.html" ! class_ "menu" $ "docs" | |
a ! href "./about.html" ! class_ "menu" $ "about" | |
a ! href "./tutorial.html" ! class_ "menu" $ "tutorial" | |
a ! href "./" ! class_ "menu" $ "home" | |
H.div ! A.id "content" $ do | |
p $ do | |
"BlazeHtml is a blazingly fast HTML combinator library for the" | |
a ! href "http://haskell.org/" $ "Haskell" | |
"programming language. It embeds HTML templates in Haskell code for optimal efficiency and composability. To get started, just" | |
pre $ code "cabal install blaze-html" | |
p "The project is aimed at those who seek to write web applications in Haskell – it integrates well with all Haskell web frameworks." | |
p $ do | |
"The best way to get started with BlazeHtml is to have a look at our" | |
a ! href "./tutorial.html" $ "tutorial" | |
"." | |
H.div ! A.id "fold" $ mempty | |
h1 ! A.id "features" $ "Features" | |
ul $ do | |
li $ do | |
"Pretty fast – have a look at" | |
a ! href "./benchmarks.html" $ "our benchmarks" | |
li "Lightweight DSL syntax" | |
li "Embedded in Haskell" | |
li "Efficient Unicode support" | |
li "Supports HTML 4 Strict and HTML 5" | |
li "Tool to create code from an HTML file" | |
h1 ! A.id "status" $ "Status" | |
p $ do | |
"The BlazeHtml API is considered stable, however, the implementation is still experimental. We like to encourage you to try it and tell us what you think, and submit possible bugs to the" | |
a ! href "http://github.com/jaspervdj/blaze-html/issues/" $ "issue tracker" | |
"(if you do not have a GitHub account," | |
a ! href "./about.html#contact" $ "contact us by mail" | |
"." | |
h1 ! A.id "code" $ "Code" | |
p $ do | |
"If you are interested, all code is available on" | |
a ! href "http://github.com/jaspervdj/blaze-html/" $ "GitHub" | |
"." | |
H.div ! A.id "footer" $ mempty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment