Remove unused code in template.

This commit is contained in:
Dillon Kearns 2021-05-15 21:35:10 -07:00
parent b2e37861dc
commit e309891be4
3 changed files with 9 additions and 40 deletions

View File

@ -12,9 +12,6 @@
"avh4/elm-color": "1.0.0", "avh4/elm-color": "1.0.0",
"danyx23/elm-mimetype": "4.0.1", "danyx23/elm-mimetype": "4.0.1",
"dillonkearns/elm-bcp47-language-tag": "1.0.1", "dillonkearns/elm-bcp47-language-tag": "1.0.1",
"dillonkearns/elm-rss": "1.0.1",
"dillonkearns/elm-sitemap": "1.0.1",
"dmy/elm-imf-date-time": "1.0.1",
"elm/browser": "1.0.2", "elm/browser": "1.0.2",
"elm/core": "1.0.5", "elm/core": "1.0.5",
"elm/html": "1.0.0", "elm/html": "1.0.0",
@ -24,32 +21,23 @@
"elm/url": "1.0.0", "elm/url": "1.0.0",
"elm-community/dict-extra": "2.4.0", "elm-community/dict-extra": "2.4.0",
"elm-community/list-extra": "8.3.0", "elm-community/list-extra": "8.3.0",
"mdgriffith/elm-ui": "1.1.8",
"miniBill/elm-codec": "1.2.0", "miniBill/elm-codec": "1.2.0",
"noahzgordon/elm-color-extra": "1.0.2", "noahzgordon/elm-color-extra": "1.0.2",
"tripokey/elm-fuzzy": "5.2.1", "tripokey/elm-fuzzy": "5.2.1",
"zwilias/json-decode-exploration": "6.0.0" "zwilias/json-decode-exploration": "6.0.0"
}, },
"indirect": { "indirect": {
"billstclair/elm-xml-eeue56": "1.0.3",
"elm/bytes": "1.0.8", "elm/bytes": "1.0.8",
"elm/file": "1.0.5", "elm/file": "1.0.5",
"elm/parser": "1.1.0",
"elm/random": "1.0.0", "elm/random": "1.0.0",
"elm/time": "1.0.0", "elm/time": "1.0.0",
"elm/virtual-dom": "1.0.2", "elm/virtual-dom": "1.0.2",
"fredcy/elm-parseint": "2.0.1", "fredcy/elm-parseint": "2.0.1",
"justinmimbs/date": "3.2.1", "mgold/elm-nonempty-list": "4.1.0"
"justinmimbs/time-extra": "1.1.0",
"lazamar/dict-parser": "1.0.2",
"mgold/elm-nonempty-list": "4.1.0",
"ryannhg/date-format": "2.3.0"
} }
}, },
"test-dependencies": { "test-dependencies": {
"direct": { "direct": {},
"elm-explorations/test": "1.2.2"
},
"indirect": {} "indirect": {}
} }
} }

View File

@ -1,13 +1,11 @@
module Page.Index exposing (Model, Msg, Data, page) module Page.Index exposing (Data, Model, Msg, page)
import Element exposing (Element) import DataSource exposing (DataSource)
import Document exposing (Document) import Document exposing (Document)
import Pages.ImagePath as ImagePath
import Head import Head
import Head.Seo as Seo import Head.Seo as Seo
import DataSource exposing (DataSource) import Page exposing (Page, StaticPayload)
import Shared import Pages.ImagePath as ImagePath
import Page exposing (StaticPayload, Page, PageWithState)
type alias Model = type alias Model =
@ -17,9 +15,11 @@ type alias Model =
type alias Msg = type alias Msg =
Never Never
type alias RouteParams = type alias RouteParams =
{} {}
page : Page RouteParams Data page : Page RouteParams Data
page = page =
Page.singleRoute Page.singleRoute
@ -34,7 +34,6 @@ data =
DataSource.succeed () DataSource.succeed ()
head : head :
StaticPayload Data RouteParams StaticPayload Data RouteParams
-> List Head.Tag -> List Head.Tag

View File

@ -4,9 +4,7 @@ import DataSource
import Head import Head
import Pages.Manifest as Manifest import Pages.Manifest as Manifest
import Pages.PagePath as PagePath import Pages.PagePath as PagePath
import Route exposing (Route)
import SiteConfig exposing (SiteConfig) import SiteConfig exposing (SiteConfig)
import Sitemap
type alias Data = type alias Data =
@ -15,7 +13,7 @@ type alias Data =
config : SiteConfig Data config : SiteConfig Data
config = config =
\routes -> \_ ->
{ data = data { data = data
, canonicalUrl = "https://elm-pages.com" , canonicalUrl = "https://elm-pages.com"
, manifest = manifest , manifest = manifest
@ -42,19 +40,3 @@ manifest static =
, startUrl = PagePath.build [] , startUrl = PagePath.build []
, icons = [] , icons = []
} }
siteMap :
List (Maybe Route)
-> { path : List String, content : String }
siteMap allRoutes =
allRoutes
|> List.filterMap identity
|> List.map
(\route ->
{ path = Route.routeToPath (Just route) |> String.join "/"
, lastMod = Nothing
}
)
|> Sitemap.build { siteUrl = "https://elm-pages.com" }
|> (\sitemapXmlString -> { path = [ "sitemap.xml" ], content = sitemapXmlString })