@hackage Shpadoinkle-disembodied0.0.0.2
Shpadoinkle as a static site.
Categories
License
BSD-3-Clause
Maintainer
isaac.shapira@platonic.systems
Links
- Documentation
- No source repository
- Security
Versions
Installation
Dependencies (10)
Dependents (0)
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.