Description
Shpadoinkle as a static site.
Description
Static site backed SPA applications.
README.md
Shpadoinkle Disembodied
This module provides static site generation tools for Html.
Usage
Lets say you have the following API routes for you SPA application:
type Pages m
= "about" :> View m Int
:<|> View m ()
And you have a view for each. You can now produce a SiteSpec
mapping these routes to the views.
site :: SiteSpec () (Pages m)
site = about 0 :<|> const home
Which can be written to static pages with writeSite
. Each route will become a directory, and each View will become an index.html
file in that directory.