Popularity
2.4
Declining
Activity
0.0
Stable
1
3
1

Monthly Downloads: 27
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.
Alternatively, view generic-lucid-scaffold alternatives based on common mentions on social networks and blogs.

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.