Update pokedex example.

This commit is contained in:
Dillon Kearns 2022-02-10 09:55:20 -08:00
parent 3f8b68a655
commit 08540c52a0
3 changed files with 21 additions and 13 deletions

View File

@ -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",

View File

@ -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 = []
}

View File

@ -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 }