未验证 提交 1c8f1b50 编写于 作者: J Jan Potoms 提交者: GitHub

Add a note about optional catch-all and rootmost route (#13791)

Fixes https://github.com/vercel/next.js/issues/13467
上级 f37c0027
...@@ -272,6 +272,7 @@ Note that the value for each `params` must match the parameters used in the page ...@@ -272,6 +272,7 @@ Note that the value for each `params` must match the parameters used in the page
- If the page name is `pages/posts/[postId]/[commentId]`, then `params` should contain `postId` and `commentId`. - If the page name is `pages/posts/[postId]/[commentId]`, then `params` should contain `postId` and `commentId`.
- If the page name uses catch-all routes, for example `pages/[...slug]`, then `params` should contain `slug` which is an array. For example, if this array is `['foo', 'bar']`, then Next.js will statically generate the page at `/foo/bar`. - If the page name uses catch-all routes, for example `pages/[...slug]`, then `params` should contain `slug` which is an array. For example, if this array is `['foo', 'bar']`, then Next.js will statically generate the page at `/foo/bar`.
- If the page uses an optional catch-all route, supply `null`, `[]`, `undefined` or `false` to render the rootmost route. For example, if you supply `slug: false` for `pages/[[...slug]]`, Next.js will statically generate the page `/`.
#### The `fallback` key (required) #### The `fallback` key (required)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册