Description
A backend for rendering Shpadoinkle as Text.
Description
Shpadoinkle's static backend, which renders Html as Text. Event listeners are ignored. This is useful when rendering on the server or for static site generation.
README.md
Shpadoinkle Backend Static
This module provides a static rendering backend that translates Shpadoinkle Html
into Text
.
For example:
page :: Html' a
page = h "div" [ ("class", PText "header" ) ]
[ h "h1" [] [ text "Trappers!" ] ]
main = putStrLn $ unpack $ renderStatic page
will output:
<div class="header"><h1>Trappers!</h1></div>