elm-pages-v3-beta/examples/slides/slides.md

38 lines
628 B
Markdown
Raw Normal View History

2021-04-15 03:17:22 +03:00
## elm-pages 2.0
2021-04-14 17:33:51 +03:00
2021-04-15 03:17:22 +03:00
```
elm-pages generate Projects.Username_.Repo_
```
```elm
2021-04-15 03:17:22 +03:00
type alias RouteParams =
{ username : String, repo : String }
template : Template RouteParams StaticData
template =
Template.noStaticData
{ head = head
, staticRoutes = StaticHttp.succeed []
}
|> Template.buildNoState { view = view }
view :
StaticPayload StaticData RouteParams
-> Document Msg
view static =
{ title = "TODO title"
, body = []
}
```
2021-04-15 03:17:22 +03:00
## Core Concepts
- Page Templates (`Template.*.elm`)
- `DataSource`s
- `Shared.elm`, `Site.elm`
## Page Templates
2021-04-14 17:33:51 +03:00
Here's another body