Commit Graph

1072 Commits

Author SHA1 Message Date
Roel Vaneyghen aaee236cb5 Update self-hosting.mdx (#87109)
small typo fix

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-12-12 17:23:09 +01:00
Joseph 6cc51a3b8a docs: dynamic routes w/ gsP (#86402) 2025-12-12 14:51:29 +01:00
Joseph 916f45d5e5 docs: use cache remote (#86546) 2025-12-11 12:15:49 +01:00
Viraj Jadhav 593cef1b97 docs: remove deprecated url.parse() from custom server example (#86986)
This PR updates the custom server documentation to remove usage of
Node's
deprecated `url.parse()` API. The example does not require URL parsing,
since
the `parsedUrl` argument is optional for the Next.js `RequestHandler`.

Removing `url.parse()` avoids Node deprecation warnings (DEP0116,
DEP0169) and
keeps the example aligned with current best practices.

### What changed?
- Removed the `url.parse()` import and usage.
- Removed unused `parsedUrl` variable.
- Updated both TS and JS examples to use `handle(req, res)` directly.

### Why?
- `url.parse()` is deprecated in modern Node versions.
- The example works without URL parsing.
- Simplifies the docs and matches recommended APIs.

Fixes #86951 and https://github.com/vercel/next.js/issues/83183

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-12-10 14:58:36 +01:00
Joseph 42690262d6 docs: codemode upgrade command (#87006) 2025-12-10 09:47:04 +01:00
Joseph 22caab8676 docs: improve TypeScript navigation/discoverability (#86938)
Add signposts and info about next-env.d.ts. Also rework links from
getting started to TypeScript features, and from the to config
reference.
2025-12-09 21:35:19 +01:00
Joseph b90b3034e4 docs: i18n type narrowing w/ runtime guards (#86871)
Closes: https://github.com/vercel/next.js/issues/86864
2025-12-09 21:23:25 +01:00
Joseph 347c8dfaaf docs: use cache debugging notes (#86937)
Closes: https://github.com/vercel/next.js/issues/86896
2025-12-09 21:22:51 +01:00
Joseph 73f5076257 docs: fix generateSitemaps returned type signature (#86984)
Closes: https://github.com/vercel/next.js/issues/86959
2025-12-09 13:01:22 +01:00
Joseph 78660a5386 Add gitignore note for next-env.d.ts (#86809)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### What?
Adds a note to the `next-env.d.ts` entry in the project structure
documentation.

### Why?
To clarify that `next-env.d.ts` is a generated file and should be
excluded from version control (i.e., added to `.gitignore`). This helps
developers follow best practices for Next.js project setup.

### How?
Updated `docs/01-app/01-getting-started/02-project-structure.mdx` to add
"(should not be tracked by version control)" to the description of
`next-env.d.ts`.

Closes NEXT-
Fixes #

-->

---
[Slack
Thread](https://vercel.slack.com/archives/C07BS1WEYAZ/p1764841040993409?thread_ts=1764841040.993409&cid=C07BS1WEYAZ)

<a
href="https://cursor.com/background-agent?bcId=bc-fc2eab83-628d-4ae1-b190-436d7e00063e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in
Cursor"
src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a
href="https://cursor.com/agents?id=bc-fc2eab83-628d-4ae1-b190-436d7e00063e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web"
src="https://cursor.com/open-in-web.svg"></picture></a>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-08 11:36:09 +01:00
Niklas Mischkulnig 3bb0bcbf82 Add pino-related packages to server-external-packages (#86884) 2025-12-05 22:53:56 +01:00
Jeff 38ef2360e1 Add Firebase App Hosting to the deployment guide (#86832)
Add Firebase App Hosting to the list of adapters in the [deployment
guide](https://nextjs.org/docs/app/getting-started/deploying#adapters).

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-12-04 19:06:04 +00:00
dan 3afc77738a Remove Vercel mention from Next.js docs (#86801)
I think overall it's not appropriate to add Vercel-specific caveats to
these guides because they make it look like they're upselling Vercel.
I've edited to emphasize the self-hosting condition instead, from which
one should be able to infer it doesn't apply to Vercel.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-12-04 14:23:57 +00:00
Joseph 80791c019f docs: cookie clear and has alignment (#86788)
Closes: https://github.com/vercel/next.js/issues/86778
2025-12-04 10:33:29 +01:00
danpeleg4 654cd8e431 Fix typo in fetching data documentation (#86758)
Corrects a grammatical error in the data preloading explanation. The
phrase "an utility function" was updated to "a utility function" because
"utility" begins with a consonant sound. This improves clarity and
maintains consistency with standard English usage throughout the
documentation.
2025-12-03 13:27:49 +00:00
Luke Sandberg 50d459e688 [turbopack] Remove the docs on the bundle size gap (#86707)
The biggest gap was 'Inner graph treeshaking' which was implemented in #85973 as `remove_unused_imports`

So we no longer need to document this issue
2025-12-02 00:52:56 -08:00
Luke Sandberg de57f78924 [turbopack] Enable filesystem cache by default for development (#85975)
Enable Turbopack filesystem cache for dev by default

Remove the canary block on the option for builds, but that remains false by default
2025-12-01 15:48:09 -08:00
Yiming Cao 4a8eeab2fc Add "@zenstackhq/runtime" to server-external-packages.json (#54829)
### What?

[ZenStack](https://github.com/zenstackhq/zenstack) is a toolkit built
above Prisma ORM for adding access control and other features. This
change adds one of its packages "@zenstackhq/runtime" to the default
list of "serverComponentsExternalPackages".

### Why?

The package is frequently used in Next.js route handlers and results in
false-positive errors with Next.js's bundler (likely caused by
dynamically `require` modules).

### How?

Add the package to the default external packages list.

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2025-11-28 12:37:43 +01:00
Ben b43fe3542b Add alinea to server-external-packages.json (#55006)
### What?

Adds `@alinea/generated` to the external package list

### Why?

[`Alinea`](https://github.com/alineacms/alinea) generates this package
at build time and it should not end up in a cache (much like the
`@prisma/client` package)

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2025-11-27 17:28:00 +01:00
Allen Zhou d96cc5c5d4 docs: fix cache component doc grammar (#86563)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Fixes grammar error in cache components doc

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-27 10:33:34 +01:00
Joseph 6bfd81847f Fix grammar and typos in typescript doc (#86513)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?
Fixes grammar and typos in the TypeScript configuration documentation.

### Why?
To improve the clarity and correctness of the documentation.

### How?
- Removed an unnecessary article ("the") on line 38.
- Corrected a preposition ("on" to "in") on line 128.
- Fixed subject-verb agreement ("need" to "needs") on line 158.

Closes NEXT-
Fixes #

-->

---
[Slack
Thread](https://vercel.slack.com/archives/C07BS1WEYAZ/p1764105619569089?thread_ts=1764105619.569089&cid=C07BS1WEYAZ)

<a
href="https://cursor.com/background-agent?bcId=bc-732fcdec-b21b-4ce1-9c26-b10386636edc"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in
Cursor"
src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a
href="https://cursor.com/agents?id=bc-732fcdec-b21b-4ce1-9c26-b10386636edc"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web"
src="https://cursor.com/open-in-web.svg"></picture></a>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-25 23:02:47 +01:00
Jimmy Lai 8c271102dd Update Next.js auth docs examples (#86361)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?
Updated the `Layouts and auth checks` section in the authentication
documentation (`docs/01-app/02-guides/authentication.mdx`).

### Why?
The previous example demonstrating authentication checks within layouts
was confusing and contradicted the documentation's own advice against
this pattern. This update aims to provide clearer, recommended
approaches for implementing authentication checks.

### How?
- Removed the misleading layout-based authentication example.
- Introduced a new subsection with an example showing authentication
checks in a page component.
- Added another new subsection with an example demonstrating
authentication checks in a leaf component.
- Enhanced the "Good to know" section with a reminder about the
necessity of authorization checks for Server Actions.

Closes NEXT-
Fixes #

-->

---
[Slack
Thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1763685748449029?thread_ts=1763685748.449029&cid=C03KAR5DCKC)

<a
href="https://cursor.com/background-agent?bcId=bc-f490a8eb-8f55-4a85-a31a-357adb24c09a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in
Cursor"
src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a
href="https://cursor.com/agents?id=bc-f490a8eb-8f55-4a85-a31a-357adb24c09a"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web"
src="https://cursor.com/open-in-web.svg"></picture></a>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-21 15:31:48 -08:00
Joseph 22cc5be063 docs: cacheLife feedback (#86128)
- Adjust nested behavior
- Include conditional calls to cacheLife

---------

Co-authored-by: Ismael <ismael@vercel.com>
2025-11-21 21:27:44 +01:00
Niklas Mischkulnig 10e0828fb9 Use JSONC for default server-external-packages (#86252)
So that we can then use comments to track a reason why we have added packages to this list.
2025-11-21 11:45:39 +01:00
Joseph e31608f15f docs: serverless deploy feedback (#86357)
Co-authored-by: Rich Haines <hello@richardhaines.dev>
2025-11-21 11:11:58 +01:00
Kazi Mahbubur Rahman 1dd580dad8 docs: add example for enabling both AVIF and WebP image formats for better image optimization (#86191)
## Title
docs: add example for enabling both AVIF and WebP image formats

## Description

### What?
This PR enhances the image component documentation by adding examples
showing how to enable both AVIF and WebP image formats together in
`next.config.js`. It also updates the `image-component` example to
demonstrate this configuration.

### Why?
Currently, the documentation only shows examples for:
- WebP only (default): `formats: ['image/webp']`
- AVIF only: `formats: ['image/avif']`

However, many developers want to enable both formats together to:
- Prefer AVIF for browsers that support it (better compression, ~20%
smaller files)
- Fall back to WebP for broader browser compatibility
- Maximize image optimization across different browsers

This configuration is a best practice but wasn't clearly documented with
an example.

### How?
- Added example configuration `formats: ['image/avif', 'image/webp']` to
App Router image component documentation
- Added the same example to Pages Router (legacy) image component
documentation for consistency
- Updated `examples/image-component/next.config.js` to demonstrate the
configuration
- Added clarification that the order matters - Next.js uses the first
format in the array that the browser supports

### Changes Made
- `docs/01-app/03-api-reference/02-components/image.mdx` - Added AVIF +
WebP example
- `docs/02-pages/04-api-reference/01-components/image-legacy.mdx` -
Added AVIF + WebP example
- `examples/image-component/next.config.js` - Added formats
configuration

### Testing
- [x] Documentation changes only - no code changes
- [x] Verified examples are syntactically correct
- [x] Checked that formatting follows Next.js documentation guidelines

### Checklist
- [x] Run `pnpm prettier-fix` to fix formatting issues (if applicable)
- [x] Documentation follows the docs guidelines
- [x] Changes are clear and helpful for developers

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-20 23:27:07 +01:00
Joseph fedee7d7c4 docs: follow up to getting started CC and use-cache API ref (#85582)
Expanding on the Getting started for CC and also extending `use cache`

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-11-18 13:50:15 +01:00
Jonathan Ho d174698cde docs: cacheHandlers use object instead of class (#86022)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

This PR fixes the docs' example where it used class (like cacheHandler
(no s)), but cacheHandlers expect an object.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-18 11:33:39 +00:00
Sebastian "Sebbie" Silbermann 1587978363 [next-upgrade] Add next upgrade (#86120) 2025-11-18 11:53:26 +01:00
jokokoloko 9c416ee2fd Update 14-metadata-and-og-images.mdx (#86198)
Changed better match example images and to be consistent within
documentation copy.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-17 15:09:49 +01:00
Hamidreza Nateghi d1643b47c4 Fix typo on 03-layouts-and-pages.mdx (#86186)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-17 15:09:40 +01:00
Bernd Strehl 9dc96c89e5 Remove redundant example code for cacheLife docs (#86043)
Remove redundant example code for overriding cache profiles.

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR. ✅ (no changes)
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide ✅

### What?

Remove a redundant example in the `cacheLife` docs.

### Why?

Because the redundant example is confusing.

### How?

Closes NEXT-
Fixes #

-->
2025-11-13 20:39:08 +00:00
sequencerr ef051ff3dc Update cookies.mdx (#86094)
delete is reserved word

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-13 20:20:14 +00:00
Tim Neutkens 589f4684a2 Docs: Mention npm link with Turbopack root (#86075)
## What?

Mention `npm link` case for the Turbopack root for when the package is
outside of the project directory.

Based on feedback here:
https://x.com/stevenaharrison/status/1988781488738070962.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-13 12:07:32 +01:00
Amy Burns 56fa9cd452 Fix typo in documentation (#86054)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?
Corrected a typo in the `redirects.mdx` documentation.

### Why?
The comment for the `x-do-not-redirect` header incorrectly stated
`x-dont-redirect`. This PR updates the comment to match the actual
header name for consistency and clarity.

### How?
Modified line 161 in
`docs/01-app/03-api-reference/05-config/01-next-config-js/redirects.mdx`
from `x-dont-redirect` to `x-do-not-redirect`.

Closes NEXT-
Fixes #
-->

---
[Slack
Thread](https://vercel.slack.com/archives/C09P3BYAD7W/p1762978463766399?thread_ts=1762978463.766399&cid=C09P3BYAD7W)

<a
href="https://cursor.com/background-agent?bcId=bc-eb67e8d3-17fe-4af2-8f74-d93bf659c809"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in
Cursor"
src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a
href="https://cursor.com/agents?id=bc-eb67e8d3-17fe-4af2-8f74-d93bf659c809"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web"
src="https://cursor.com/open-in-web.svg"></picture></a>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-12 21:31:13 +01:00
Joseph 1b113c01be docs: Feedback item on proxy default (#86004) 2025-11-11 13:02:05 +00:00
Joseph 12318ed007 docs: cacheHandlers (#85311) 2025-11-11 13:27:04 +01:00
Georges Farah d5262c7286 Update authentication.mdx: Fix Auth0 Link (#85953)
The `Auth0` link is broken so I fixed it

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-11 10:09:20 +01:00
Joseph cb6ee43973 docs: eslint config update (#85969)
Closes: https://github.com/vercel/next.js/issues/85947
2025-11-10 13:44:24 +01:00
Tessa 24cfba6b72 Add Appwrite Sites to supported adapters (#85830)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

Added Appwrite Sites to the list of deployment adapters in the deploying
documentation.

### Why?

Appwrite Sites is a deployment platform that uses an adapter to run
Next.js applications on their infrastructure, similar to other platforms
listed in the Adapters section (Cloudflare, Netlify, AWS Amplify, etc.).
This addition helps developers discover Appwrite Sites as a deployment
option for their Next.js applications.

### How?

Added a link to Appwrite Sites documentation
(https://appwrite.io/docs/products/sites/quick-start/nextjs in the
Adapters section of 17-deploying.mdx

Closes NEXT-
Fixes #

-->

### What?

Added Appwrite Sites to the list of deployment adapters in the deploying
documentation.

### Why?

Appwrite Sites is a deployment platform that uses an adapter to run
Next.js applications on their infrastructure, similar to other platforms
listed in the Adapters section (Cloudflare, Netlify, AWS Amplify, etc.).
This addition helps developers discover Appwrite Sites as a deployment
option for their Next.js applications.

### How?

Added a link to Appwrite Sites documentation
(https://appwrite.io/docs/products/sites/quick-start/nextjs in the
Adapters section of 17-deploying.mdx
2025-11-08 17:49:38 +00:00
Joseph 6080d9c469 docs: keywords in system reqs and add browserslist (#85838)
Adding more searchable keywords
2025-11-06 09:08:44 +01:00
Joseph 6ba8ec8725 docs: getting started updates 01 (#85750) 2025-11-05 23:52:23 +01:00
Joseph 7fef3a0cca docs: fresh up getting started 00 (#85736) 2025-11-05 10:54:34 +01:00
Joseph 531293634a docs: disclosure on path-to-regexp (#85629)
Prepping for a bit more helpful work with these matchers
2025-11-04 18:27:59 +01:00
Joseph 8bfa443b74 docs: generateSitemap passes id as promise (#85767) 2025-11-04 14:13:44 +01:00
Tan Zi Gang 2f8dec2314 docs(next.config): this docs should remove ".mts" is not supported. (#85716)
Fix #85715

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2025-11-03 22:31:44 +00:00
ajstrongdev 7cfb1488e0 docs: update docs to mention ESLint as default (#85740)
### What?
- Add mention of ESLint being the default linter when specifying `--yes`
flag on `create-next-app`

### Why?

- Adds consistency by calling out the default linter.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-03 21:27:49 +00:00
Joseph 29d28ac3e9 docs: recommend reverse-proxy when self-hosting (#85650) 2025-11-03 16:01:55 +01:00
Jiachi Liu 089ca2c0db docs: update multi sitemap argumenmt type (#85701)
In v16, `id` argument in metadata routes becomes promise which requries
to to unwrap it first to access the value

Follow up of #84491

Closes #85632

---------

Co-authored-by: Joseph Chamochumbi <joseph.chamochumbi@vercel.com>
2025-11-03 11:01:03 +01:00
Marjan Ahmed b350da474b docs: fix generateImageMetadata example to use normal params object (#85658)
### What?

Fixes an inconsistency in the v16 upgrade documentation for
`generateImageMetadata`.

### Why?

In the “Upgrading to Version 16” guide, the example incorrectly awaited
the `params` object inside `generateImageMetadata`, implying that it was
a Promise.
However, according to the API reference, `params` is a normal object.
This PR updates the example to reflect the correct synchronous usage.

### How?

Replaced:
```ts
export async function generateImageMetadata({ params }) {
  const { slug } = await params
  return [{ id: '1' }, { id: '2' }]
}

With
```ts
export async function generateImageMetadata({ params }) {
  // params is a normal object
  return [{ id: '1' }, { id: '2' }]
}

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-11-03 10:28:31 +01:00