We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9afcdfc commit 3063d3bCopy full SHA for 3063d3b
docs/basic-features/pages.md
@@ -160,7 +160,9 @@ export async function getStaticPaths() {
160
const posts = await res.json()
161
162
// Get the paths we want to pre-render based on posts
163
- const paths = posts.map((post) => `/posts/${post.id}`)
+ const paths = posts.map((post) => ({
164
+ params: { id: post.id },
165
+ }))
166
167
// We'll pre-render only these paths at build time.
168
// { fallback: false } means other routes should 404.
0 commit comments