mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 05:13:24 +03:00
29 lines
762 B
Elm
29 lines
762 B
Elm
module Api exposing (routes)
|
|
|
|
import ApiRoute
|
|
import BackendTask exposing (BackendTask)
|
|
import FatalError exposing (FatalError)
|
|
import Html exposing (Html)
|
|
import Pages.Manifest as Manifest
|
|
import Route exposing (Route)
|
|
import Site
|
|
|
|
|
|
routes :
|
|
BackendTask FatalError (List Route)
|
|
-> (Maybe { indent : Int, newLines : Bool } -> Html Never -> String)
|
|
-> List (ApiRoute.ApiRoute ApiRoute.Response)
|
|
routes getStaticRoutes htmlToString =
|
|
[ BackendTask.succeed manifest |> Manifest.generator Site.canonicalUrl
|
|
]
|
|
|
|
|
|
manifest : Manifest.Config
|
|
manifest =
|
|
Manifest.init
|
|
{ name = "Site Name"
|
|
, description = "Description"
|
|
, startUrl = Route.Visibility__ { visibility = Nothing } |> Route.toPath
|
|
, icons = []
|
|
}
|