mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-24 20:31:42 +03:00
Update pokedex example.
This commit is contained in:
parent
3f8b68a655
commit
08540c52a0
@ -38,6 +38,7 @@
|
||||
"miniBill/elm-codec": "1.2.0",
|
||||
"noahzgordon/elm-color-extra": "1.0.2",
|
||||
"pablohirafuji/elm-syntax-highlight": "3.4.0",
|
||||
"robinheghan/fnv1a": "1.0.0",
|
||||
"robinheghan/murmur3": "1.0.0",
|
||||
"rtfeldman/elm-css": "16.1.1",
|
||||
"tripokey/elm-fuzzy": "5.2.1",
|
||||
|
@ -7,10 +7,12 @@ import Html exposing (Html)
|
||||
import Json.Decode
|
||||
import Json.Encode
|
||||
import MySession
|
||||
import Pages.Manifest as Manifest
|
||||
import Route exposing (Route)
|
||||
import Server.Request
|
||||
import Server.Response
|
||||
import Server.Session as Session
|
||||
import Site
|
||||
|
||||
|
||||
routes :
|
||||
@ -27,6 +29,7 @@ routes getStaticRoutes htmlToString =
|
||||
, greet
|
||||
, fileLength
|
||||
, jsonError
|
||||
, manifest |> Manifest.generator Site.canonicalUrl
|
||||
]
|
||||
|
||||
|
||||
@ -275,3 +278,13 @@ route1 =
|
||||
|> ApiRoute.slash
|
||||
|> ApiRoute.capture
|
||||
|> ApiRoute.literal ".json"
|
||||
|
||||
|
||||
manifest : Manifest.Config
|
||||
manifest =
|
||||
Manifest.init
|
||||
{ name = "Site Name"
|
||||
, description = "Description"
|
||||
, startUrl = Route.Index |> Route.toPath
|
||||
, icons = []
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Site exposing (config)
|
||||
module Site exposing (canonicalUrl, config)
|
||||
|
||||
import DataSource
|
||||
import Head
|
||||
@ -15,12 +15,16 @@ type alias Data =
|
||||
config : SiteConfig Data
|
||||
config =
|
||||
{ data = data
|
||||
, canonicalUrl = "https://elm-pages.com"
|
||||
, manifest = manifest
|
||||
, canonicalUrl = canonicalUrl
|
||||
, head = head
|
||||
}
|
||||
|
||||
|
||||
canonicalUrl : String
|
||||
canonicalUrl =
|
||||
"https://elm-pages.com"
|
||||
|
||||
|
||||
data : DataSource.DataSource Data
|
||||
data =
|
||||
DataSource.succeed ()
|
||||
@ -32,16 +36,6 @@ head static =
|
||||
]
|
||||
|
||||
|
||||
manifest : Data -> Manifest.Config
|
||||
manifest static =
|
||||
Manifest.init
|
||||
{ name = "Site Name"
|
||||
, description = "Description"
|
||||
, startUrl = Route.Index |> Route.toPath
|
||||
, icons = []
|
||||
}
|
||||
|
||||
|
||||
siteMap :
|
||||
List (Maybe Route)
|
||||
-> { path : List String, content : String }
|
||||
|
Loading…
Reference in New Issue
Block a user