elm-pages-v3-beta/examples/hackernews/app/Api.elm
2022-04-10 16:37:00 -07:00

28 lines
698 B
Elm

module Api exposing (routes)
import ApiRoute exposing (ApiRoute)
import DataSource exposing (DataSource)
import Html exposing (Html)
import Pages.Manifest as Manifest
import Route exposing (Route)
import Site
routes :
DataSource (List Route)
-> (Html Never -> String)
-> List (ApiRoute.ApiRoute ApiRoute.Response)
routes getStaticRoutes htmlToString =
[ DataSource.succeed manifest |> Manifest.generator Site.canonicalUrl
]
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 = []
}