dillonkearns/elm-pages-v3-beta/8.0.0

NOTE: the latest version is 21.0.0

Rerouted (regenerated, verified). Same repository and tag, but GitHub now builds the zip with different bytes, so it no longer matches the SHA-1 package.elm-lang.org recorded. The Lamdera package server serves a copy recovered from https://github.com/dillonkearns/elm-pages-v3-beta.

What we checked: Tag 8.0.0 is still on github.com/dillonkearns/elm-pages-v3-beta; its commit b7735572454e is from 2023-01-17 05:49 UTC, before the version was published (2023-01-17 05:52 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one (GitHub's zip no longer comes out byte for byte the same), so the contents were checked instead.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/dillonkearns/elm-pages-v3-beta/zipball/8.0.0/

Pages.Flags

type Flags
= BrowserFlags Value
| PreRenderFlags

elm-pages apps run in two different contexts

  1. In the browser (like a regular Elm app)
  2. In pre-render mode. For example when you run elm-pages build, there is no browser involved, it just runs Elm directly.

You can pass in Flags and use them in your Shared.init function. You can store data in your Shared.Model from these flags and then access it across any page.

You will need to handle the PreRender case with no flags value because there is no browser to get flags from. For example, say you wanted to get the current user's Browser window size and pass it in as a flag. When that page is pre-rendered, you need to decide on a value to use for the window size since there is no window (the user hasn't requested the page yet, and the page isn't even loaded in a Browser window yet).