Skip to content

Commit 93cb635

Browse files
authoredJul 7, 2022
Add note about casing to getStaticPaths docs (#38426)
x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1656942759965239) ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
1 parent 46dde0d commit 93cb635

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎docs/api-reference/data-fetching/get-static-paths.md

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The value for each `params` object must match the parameters used in the page na
5959
- If the page name uses [catch-all routes](/docs/routing/dynamic-routes.md#catch-all-routes) like `pages/[...slug]`, then `params` should contain `slug` (which is an array). If this array is `['hello', 'world']`, then Next.js will statically generate the page at `/hello/world`.
6060
- If the page uses an [optional catch-all route](/docs/routing/dynamic-routes.md#optional-catch-all-routes), use `null`, `[]`, `undefined` or `false` to render the root-most route. For example, if you supply `slug: false` for `pages/[[...slug]]`, Next.js will statically generate the page `/`.
6161

62+
The `params` strings are **case-sensitive** and ideally should be normalized to ensure the paths are generated correctly. For example, if `WoRLD` is returned for a param it will only match if `WoRLD` is the actual path visited, not `world` or `World`.
63+
6264
Separate of the `params` object a `locale` field can be returned when [i18n is configured](/docs/advanced-features/i18n-routing.md), which configures the locale for the path being generated.
6365

6466
### `fallback: false`

0 commit comments

Comments
 (0)
Please sign in to comment.