webpage

Organized and simple web page scaffold for blaze and lucid

Version on this page:0.0.3.1@rev:1
LTS Haskell 22.14:0.0.5.1
Stackage Nightly 2024-03-28:0.0.5.1
Latest on Hackage:0.0.5.1

See all snapshots webpage appears in

MIT licensed and maintained by Athan Clark
This version can be pinned in stack with:webpage-0.0.3.1@sha256:1829b0f7db8745498bee16ed1d70917aa781fd14ab8f8032b51472cfc3cd6787,2026

Module documentation for 0.0.3.1

This is a general organization scheme for web pages, implemented for Lucid, and adapted for Blaze-html.

It's as easy as 1-2-3:

 import Web.Page.Lucid

 λ> renderText $ template def "some content"

 ↪ "<!DOCTYPE HTML><html><head><title></title><link href
   rel="icon"></head><body>some content</body></html>"

overload the particular areas with record syntax and stuff:

 λ> let page = WebPage
                 "foo"
                 mempty
                 mempty
                 mempty
                 mempty
                 mempty
                 mempty
                 (script_ [src_ "jquery.js"] "")


 λ> template page "some content"

 ↪ "<!DOCTYPE HTML><html><head><title>foo</title>
   </head><body>some content<script
   src=\"jquery.js\"></script></body></html>"