Popularity
2.0
Growing
Activity
0.0
Declining
1
1
1

Monthly Downloads: 45
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web     Unclassified    
Latest version: v0.0.5

generic-lucid-scaffold alternatives and similar packages

Based on the "Unclassified" category

Do you think we are missing an alternative of generic-lucid-scaffold or a related project?

Add another 'Unclassified' Package

README

webpage

This is a general web page scaffold written in Haskell for the Lucid Html DSL.

Usage

It's pretty straigt forward:

λ> 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, or do whatever:

λ> let page = def {pageTitle = "foo", bodyScripts = script_ [src_ "jquery.js"] ""}

λ> template page "some content"

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

Note: When using the Hastache implementation, the content inside a WebPage data type will be in the same scope as the rest of the template - you can access the things your final content will see from metaVars, for instance (unless you do multiple renderings).

Another Note: We don't provide an instance for the beloved Hamlet because under the hood, it's just Blaze-Html - $(runQ $ shamletFile "foo.hamlet") gives us an Html.

Contributing

Fork, Pull-Request, repeat.