Represents the configuration of a web manifest file.
You pass your Pages.Manifest.Config record into the Pages.application function
(from your generated Pages.elm file).
import Pages
import Pages.Manifest as Manifest
import Pages.Manifest.Category
import Pages.PagePath as PagePath exposing (PagePath)
import Palette
manifest : Manifest.Config Pages.PathKey
manifest =
{ backgroundColor = Just Color.white
, categories = [ Pages.Manifest.Category.education ]
, displayMode = Manifest.Standalone
, orientation = Manifest.Portrait
, description = "elm-pages - A statically typed site generator."
, iarcRatingId = Nothing
, name = "elm-pages docs"
, themeColor = Just Color.white
, startUrl = Pages.pages.index
, shortName = Just "elm-pages"
, sourceIcon = Pages.images.icon
}
main : Pages.Program Model Msg Metadata (List (Element Msg))
main =
Pages.application
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
, documents = [ markdownDocument ]
, head = head
, manifest = manifest
, canonicalSiteUrl = canonicalSiteUrl
}Pages.elm)Feel free to use this, but in 99% of cases you won't need it. The generated
code will run this for you to generate your manifest.json file automatically!
Represents a web app manifest file (see above for how to use it).
The
sourceIconis used to automatically generate all of the Favicons and manifest icons of the appropriate sizes (512x512, etc) for Android, iOS, etc. So you just point at a single image asset and you will have optimized images following all the best practices!Type-safe static paths
The
pathKeyin this type is used to ensure that you are using known static resources for any internal image or page paths.startUrlis a type-safePagePath, ensuring that any internal links are present (not broken links).sourceIconis a type-safeImagePath, ensuring that any internal images are present (not broken images).