Merge pull request #67 from erlandsona/master

Sorry if this is super boring but hoping it's helpful.
This commit is contained in:
Ryan Haskell-Glatz 2021-02-09 19:32:09 -06:00 committed by GitHub
commit 3e068adfce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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
-- "/"

View File

@ -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