mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-30 23:06:10 +03:00
34 lines
558 B
Markdown
34 lines
558 B
Markdown
## elm-pages 2.0
|
|
|
|
```
|
|
elm-pages add Projects.Username_.Repo_
|
|
```
|
|
|
|
```elm
|
|
type alias RouteParams =
|
|
{ username : String, repo : String }
|
|
|
|
page : Page RouteParams StaticData
|
|
page =
|
|
Page.noStaticData
|
|
{ head = head
|
|
, staticRoutes = StaticHttp.succeed []
|
|
}
|
|
|> Page.buildNoState { view = view }
|
|
|
|
|
|
view :
|
|
StaticPayload StaticData RouteParams
|
|
-> Document Msg
|
|
view static =
|
|
{ title = "TODO title"
|
|
, body = []
|
|
}
|
|
```
|
|
|
|
## Core Concepts
|
|
|
|
- Page Modules (`Page.*.elm`)
|
|
- `BackendTask`s
|
|
- `Shared.elm`, `Site.elm`
|