@hackage Shpadoinkle-disembodied0.0.0.2

Shpadoinkle as a static site.

Shpadoinkle Disembodied

Goldwater Haddock BSD-3 built with nix Hackage Hackage Deps Hackage CI

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.