Shpadoinkle-disembodied: Shpadoinkle as a static site.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Static site backed SPA applications.


[Skip to Readme]

Properties

Versions 0.0.0.1, 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:47:54Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


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.