2022-04-11 02:37:00 +03:00
|
|
|
module Api exposing (routes)
|
|
|
|
|
|
|
|
import ApiRoute exposing (ApiRoute)
|
2023-01-02 01:44:11 +03:00
|
|
|
import BackendTask exposing (BackendTask)
|
2022-04-11 02:37:00 +03:00
|
|
|
import Html exposing (Html)
|
|
|
|
import Pages.Manifest as Manifest
|
|
|
|
import Route exposing (Route)
|
|
|
|
import Site
|
|
|
|
|
|
|
|
|
|
|
|
routes :
|
2023-01-02 01:44:11 +03:00
|
|
|
BackendTask (List Route)
|
2022-10-29 17:08:19 +03:00
|
|
|
-> (Maybe { indent : Int, newLines : Bool } -> Html Never -> String)
|
2022-04-11 02:37:00 +03:00
|
|
|
-> List (ApiRoute.ApiRoute ApiRoute.Response)
|
|
|
|
routes getStaticRoutes htmlToString =
|
2023-01-02 01:44:11 +03:00
|
|
|
[ BackendTask.succeed manifest |> Manifest.generator Site.canonicalUrl
|
2022-04-11 02:37:00 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
manifest : Manifest.Config
|
|
|
|
manifest =
|
|
|
|
Manifest.init
|
|
|
|
{ name = "Hacker News Clone"
|
|
|
|
, description = "elm-pages port of Hacker News"
|
|
|
|
, startUrl = Route.Feed__ { feed = Nothing } |> Route.toPath
|
|
|
|
, icons = []
|
|
|
|
}
|