Shpadoinkle-disembodied: Shpadoinkle as a static site.

[ bsd3, library, web ] [ Propose Tags ]

Static site backed SPA applications.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.0.1, 0.0.0.2
Change log CHANGELOG.md
Dependencies base (>=4.12.0 && <4.16), directory, filepath, servant, Shpadoinkle, Shpadoinkle-backend-static, Shpadoinkle-html, Shpadoinkle-router, text (>=1.2.3 && <1.3), unliftio [details]
License BSD-3-Clause
Author Isaac Shapira
Maintainer fresheyeball@protonmail.com
Category Web
Uploaded by fresheyeball at 2021-01-06T20:48:52Z
Distributions
Downloads 271 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for Shpadoinkle-disembodied-0.0.0.1

[back to package description]

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.