mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 05:13:24 +03:00
76 lines
1.4 KiB
Elm
76 lines
1.4 KiB
Elm
module Page.Blog.Slug_ exposing (Data, Model, Msg, page)
|
|
|
|
import DataSource exposing (DataSource)
|
|
import Head
|
|
import Head.Seo as Seo
|
|
import Page exposing (Page, PageWithState, StaticPayload)
|
|
import Pages.PageUrl exposing (PageUrl)
|
|
import Pages.Url
|
|
import Shared
|
|
import View exposing (View)
|
|
|
|
|
|
type alias Model =
|
|
{}
|
|
|
|
|
|
type alias Msg =
|
|
()
|
|
|
|
|
|
type alias RouteParams =
|
|
{ slug : String }
|
|
|
|
|
|
page : Page RouteParams Data
|
|
page =
|
|
Page.preRender
|
|
{ head = head
|
|
, pages = pages
|
|
, data = data
|
|
}
|
|
|> Page.buildNoState { view = view }
|
|
|
|
|
|
pages : DataSource (List RouteParams)
|
|
pages =
|
|
DataSource.succeed []
|
|
|
|
|
|
type alias Data =
|
|
{}
|
|
|
|
|
|
data : RouteParams -> DataSource Data
|
|
data routeParams =
|
|
DataSource.succeed {}
|
|
|
|
|
|
head :
|
|
StaticPayload Data RouteParams
|
|
-> List Head.Tag
|
|
head static =
|
|
Seo.summary
|
|
{ canonicalUrlOverride = Nothing
|
|
, siteName = "elm-pages"
|
|
, image =
|
|
{ url = Pages.Url.external "TODO"
|
|
, alt = "elm-pages logo"
|
|
, dimensions = Nothing
|
|
, mimeType = Nothing
|
|
}
|
|
, description = "TODO"
|
|
, locale = Nothing
|
|
, title = "TODO title" -- metadata.title -- TODO
|
|
}
|
|
|> Seo.website
|
|
|
|
|
|
view :
|
|
Maybe PageUrl
|
|
-> Shared.Model
|
|
-> StaticPayload Data RouteParams
|
|
-> View Msg
|
|
view maybeUrl sharedModel static =
|
|
View.placeholder "Blog.Slug_"
|