mirror of
https://github.com/ryan-haskell/elm-spa.git
synced 2024-11-26 03:08:02 +03:00
Merge pull request #67 from erlandsona/master
Sorry if this is super boring but hoping it's helpful.
This commit is contained in:
commit
3e068adfce
@ -95,7 +95,7 @@ We'll cover this in more detail in the [routing section](./routing)
|
||||
|
||||
### using page templates
|
||||
|
||||
The `elm-spa add` command also accepts an optional `template` argument to for common
|
||||
The `elm-spa add` command also accepts an optional `template` argument too for common
|
||||
pages you might create.
|
||||
|
||||
```bash
|
||||
|
@ -73,7 +73,7 @@ This is less common than `req.params` and `req.query`, but can be useful for get
|
||||
|
||||
## Getting the current route
|
||||
|
||||
The `Request` type also has access to the `Route` value, so you can easily do comparisons agains the current route!
|
||||
The `Request` type also has access to the `Route` value, so you can easily do comparisons against the current route!
|
||||
|
||||
```elm
|
||||
-- "/"
|
||||
|
@ -16,13 +16,13 @@ In this section, we'll cover the 3 kinds of routes you can find in an __elm-spa_
|
||||
|
||||
## The homepage
|
||||
|
||||
The `src/Pages/Home_.elm` file is a reserved page that handles requests to `/`. The easiest way to make a new homepage is with the [`add` command](/guide/cli#adding-a-homepage) covered in the CLI section:
|
||||
The `src/Pages/Home_.elm` is a reserved filename that handles requests to /. The easiest way to make a new homepage is with the [`add` command](/guide/cli#adding-a-homepage) covered in the CLI section:
|
||||
|
||||
```terminal
|
||||
elm-spa add /
|
||||
```
|
||||
|
||||
__Note:__ Without the trailing underscore, __elm-spa__ will treat `Home.elm` as a route to `/home`! This is called a "static route", and will be covered at the end of this sentence.
|
||||
__Note:__ Without the trailing underscore, __elm-spa__ will treat `Home.elm` as a route to `/home`! This is called a "static route", and will be covered next.
|
||||
|
||||
## Static routes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user