Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
73f50762
Unverified
Commit
73f50762
authored
Dec 09, 2025
by
Joseph
Committed by
GitHub
Dec 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: fix generateSitemaps returned type signature (#86984)
Closes:
https://github.com/vercel/next.js/issues/86959
parent
9be83065
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
version-16.mdx
docs/01-app/02-guides/upgrading/version-16.mdx
+2
-2
sitemap.mdx
...api-reference/03-file-conventions/01-metadata/sitemap.mdx
+2
-2
generate-sitemaps.mdx
...1-app/03-api-reference/04-functions/generate-sitemaps.mdx
+2
-2
No files found.
docs/01-app/02-guides/upgrading/version-16.mdx
View file @
73f50762
...
@@ -363,8 +363,8 @@ export async function generateSitemaps() {
...
@@ -363,8 +363,8 @@ export async function generateSitemaps() {
// Next.js 16 - asynchronous id access
// Next.js 16 - asynchronous id access
export default async function sitemap({ id }) {
export default async function sitemap({ id }) {
const resolvedId = await id // id is now Promise<
number
>
const resolvedId = await id // id is now Promise<
string
>
const start =
resolvedId
* 50000
const start =
Number(resolvedId)
* 50000
// ...
// ...
}
}
```
```
...
...
docs/01-app/03-api-reference/03-file-conventions/01-metadata/sitemap.mdx
View file @
73f50762
...
@@ -350,7 +350,7 @@ export async function generateSitemaps() {
...
@@ -350,7 +350,7 @@ export async function generateSitemaps() {
}
}
export default async function sitemap(props: {
export default async function sitemap(props: {
id: Promise<
number
>
id: Promise<
string
>
}): Promise<MetadataRoute.Sitemap> {
}): Promise<MetadataRoute.Sitemap> {
const id = await props.id
const id = await props.id
// Google's limit is 50,000 URLs per sitemap
// Google's limit is 50,000 URLs per sitemap
...
@@ -420,7 +420,7 @@ type Sitemap = Array<{
...
@@ -420,7 +420,7 @@ type Sitemap = Array<{
|
Version
|
Changes
|
|
Version
|
Changes
|
|
----------
|
------------------------------------------------------------
|
|
----------
|
------------------------------------------------------------
|
|
`v16.0.0`
|
`id`
is
now
a
promise
that
resolves
to
a
number
.
|
|
`v16.0.0`
|
`id`
is
now
a
promise
that
resolves
to
a
`string`
.
|
|
`v14.2.0`
|
Add
localizations
support
.
|
|
`v14.2.0`
|
Add
localizations
support
.
|
|
`v13.4.14`
|
Add
`changeFrequency`
and
`priority`
attributes
to
sitemaps
.
|
|
`v13.4.14`
|
Add
`changeFrequency`
and
`priority`
attributes
to
sitemaps
.
|
|
`v13.3.0`
|
`sitemap`
introduced
.
|
|
`v13.3.0`
|
`sitemap`
introduced
.
|
docs/01-app/03-api-reference/04-functions/generate-sitemaps.mdx
View file @
73f50762
...
@@ -33,7 +33,7 @@ export async function generateSitemaps() {
...
@@ -33,7 +33,7 @@ export async function generateSitemaps() {
}
}
export default async function sitemap(props: {
export default async function sitemap(props: {
id: Promise<
number
>
id: Promise<
string
>
}): Promise<MetadataRoute.Sitemap> {
}): Promise<MetadataRoute.Sitemap> {
const id = await props.id
const id = await props.id
// Google's limit is 50,000 URLs per sitemap
// Google's limit is 50,000 URLs per sitemap
...
@@ -76,6 +76,6 @@ export default async function sitemap(props) {
...
@@ -76,6 +76,6 @@ export default async function sitemap(props) {
|
Version
|
Changes
|
|
Version
|
Changes
|
|
---------
|
----------------------------------------------------------------------------------------------------------------------------------------------------
|
|
---------
|
----------------------------------------------------------------------------------------------------------------------------------------------------
|
|
`v16.0.0`
|
The
`id`
values
returned
from
`generateSitemaps`
are
now
passed
as
a
promise
t
o
the
sitemap
function
.
|
|
`v16.0.0`
|
The
`id`
values
returned
from
`generateSitemaps`
are
now
passed
as
a
promise
t
hat
resolves
to
a
`string`
to
the
sitemap
function
.
|
|
`v15.0.0`
|
`generateSitemaps`
now
generates
consistent
URLs
between
development
and
production
|
|
`v15.0.0`
|
`generateSitemaps`
now
generates
consistent
URLs
between
development
and
production
|
|
`v13.3.2`
|
`generateSitemaps`
introduced
.
In
development
,
you
can
view
the
generated
sitemap
on
`/.../sitemap.xml/[id]`
.
For
example
,
`/product/sitemap.xml/1`
.
|
|
`v13.3.2`
|
`generateSitemaps`
introduced
.
In
development
,
you
can
view
the
generated
sitemap
on
`/.../sitemap.xml/[id]`
.
For
example
,
`/product/sitemap.xml/1`
.
|
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment