@hackage / Shpadoinkle-disembodied

Shpadoinkle as a static site.

Latest0.0.0.2

About

Metadata

  • Last updated , by fresheyeball
  • License BSD-3-Clause
  • Categories Web Development
  • Maintained by: isaac.shapira@platonic.systems

  • Lottery factor: 0

Links

Installation

Readme

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.