wai-static-pages-0.2.1.1: generate static html pages from a WAI application

Safe HaskellNone

Network.WAI.Application.StaticPages

Synopsis

Documentation

parseRoutePaths :: Text -> [Text]Source

Conveniently specify paths through nested indentation This is a partial function which calls error on invalid input.

 import Shakespeare.Text (st)

 staticPaths = parseRoutePaths [st|
/pages
        about
        faq
        /
-- commented out
|]
 staticPaths == ["/pages/about", "/pages/faq", "/pages"]

renderStaticPagesSource

Arguments

:: Application 
-> Text

directory

-> [Text]

request paths

-> IO () 

Run the request paths against the given WAI application and output it to the given directory