Commit Graph

1072 Commits

Author SHA1 Message Date
Lee Robinson 6b8a3cc740 docs: fix typo (#77483) 2025-03-24 17:04:13 -07:00
Lee Robinson 3468f10cbb docs: clarify middleware use cases (#77438) 2025-03-23 08:46:57 -05:00
Zack Tanner cdb9a8c3b3 switch development origin verification to be opt-in rather than opt-out (#77395)
To avoid breaking local development proxies and more complex setups,
this ensures that we only block cross-origin development requests when
opting into the configuration. In a future major release, this will not
be opt-in, and will require explicitly providing the allowed origins
that can access the special `/_next` endpoints.

This adds a warning when a cross origin request is detected that would
be blocked without explicit configuration.

Fixes #77073
Fixes #77253
Fixes #77344
2025-03-21 17:08:25 -07:00
Amirreza Gholami 122c7d0506 Fix chakra link (#77280)
Fix chakra ui link in (https://nextjs.org/docs/app/getting-started/css)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-03-20 20:15:48 +00:00
Lee Robinson 3ab033de01 docs: optimizing local dev (#77140) 2025-03-18 11:01:26 -05:00
Jude Gao d41d03547b doc: diff between instrumentation vs instrumentation-client (#77143)
<!-- 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

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### 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 #

-->
2025-03-14 15:17:50 -07:00
Sam Ko cca78ec948 docs(scripts): missing 'soon' (#77137)
## Why?

Follow up to https://github.com/vercel/next.js/pull/77136
2025-03-14 13:18:57 -07:00
Jude Gao 4fead14969 Add doc for instrumentation client hook (#77134) 2025-03-14 12:56:53 -07:00
Sam Ko 83021c5a1d docs(scripts): update Script -> beforeInteractive docs (#77136)
## Why?

The current documentation is misleading about how `beforeInteractive` does **not** block page hydration from occurring. Users should look to [this](https://github.com/vercel/next.js/pull/76916) for synchronously blocking scripts before hydration.
2025-03-14 12:54:24 -07:00
Zack Tanner b4d7093f71 unify allowed origin detection handling (#77053)
This unifies the CSRF origin detection to mirror what we do for server
action origins, which supports things like wildcard matches (below the
domain level)

Fixes #76999
2025-03-12 15:50:16 -07:00
JJ Kasper 576cd1e0f4 Add dev warning for cross-origin and stabilize allowedDevOrigins (#77044)
Adding a warning when we block cross-origin requests in dev so users are
aware this is why easier and know how to allow the origin through as
custom setups can use different origins and it be valid.

x-ref:
https://github.com/vercel/next.js/pull/76880#issuecomment-2718487112

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-03-12 21:06:43 +00:00
Dominik Koch b91c7cecab docs: add Pinterest Rich Pins metadata example (#77025)
In 75831c08e8 I added support for the
Pinterest rich pin meta tag, this change adds it to the
[generateMetadata](https://nextjs.org/docs/app/api-reference/functions/generate-metadata)
documentation.

- [x] Ran `pnpm prettier-fix` before commiting
2025-03-12 12:11:30 +00:00
Sam Ko eb53f79553 docs(use-cache): add invalidating section to use cache docs (#76958)
## Why?

The cacheTag mention [here](https://nextjs.org/docs/app/api-reference/directives/use-cache#revalidating) makes it seem like cacheTag does the "revalidating," but actually this is still revalidateTag's job.

- Related: https://github.com/vercel/next.js/issues/76581
2025-03-10 17:54:50 -07:00
Jiachi Liu 4518bc9164 docs: reword the docs of veiw transition flag (#76841)
### What

Mention it's experimental feature and maintained by react team, we're
still developing it

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-03-07 17:24:48 +00:00
Lee Robinson 494cac1fde docs: update Turbopack docs (#76799) 2025-03-06 19:09:08 -06:00
Sam Ko 0abd87717f docs(errors): remove confusing good-to-know since global-errors.tsx also show in dev as of 15.2 (#76825)
## Why?

The "Good to know" has a typo, and it is probably better not mentioned. The https://nextjs.org/docs/app/building-your-application/routing/error-handling#handling-global-errors page does not mention (the fact that `global-errors.tsx` now show in `next dev`) it either.
2025-03-05 04:52:45 -08:00
Jiachi Liu f14174f92b [docs] document experimental viewTransition flag (#76832)
Add a new page for the experimental flag `viewTransition`
2025-03-05 12:59:39 +01:00
Jude Gao 3fa70738c9 doc: use redirect in client components (#76332)
Co-authored-by: Jimmy Lai <laijimmy0@gmail.com>
2025-03-05 10:00:29 +00:00
Steven e26d683b08 chore(docs): update minimumCacheTTL example to 31 days (#76796)
The docs for `minimumCacheTTL` showed the default but didn't show an
example of changing it.

Based on looking at many websites and the frequency those images change,
I think 31 days is a good choice.
2025-03-04 07:34:22 -08:00
Lee Robinson 170e8a4a27 docs: Tailwind v4 (#76801) 2025-03-04 09:23:53 -06:00
Niaz Morshed Nayeem 4ac2f1473b docs: update Tailwind CSS installation and configuration instructions (#76259) 2025-03-04 09:09:17 -06:00
Lihao Wang ead6e95fc1 Fix: missing close brace in demo code (#76549)
Upon reading the documentation, I found the demo TypeScript code in
server components section is missing a close brace.

So adding it back to fix the issue. Thanks for reviewing!

<!-- 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

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### 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-03-03 09:31:54 -08:00
Lee Robinson 9eb47f11c0 docs: fix reading params code blocks (#76705)
These function the same, but the updated version looks cleaner.
2025-03-01 12:38:08 -06:00
Delba de Oliveira 8986037d33 15.2 docs: document missing htmlLimitedBots option (#76616)
- Minor updates to the new Streaming Metadata section
- Document new next.config.ts option: `htmlLimitedBots`
2025-02-27 17:33:59 +00:00
Delba de Oliveira 8df92f1d2f 15.2: Add version history for devIndicators and note on deprecated options (#76611)
We added a new option to `devIndicators` (`position`) and removed the
previous options from the docs. This PR adds a version history with a
note about the deprecated options.
2025-02-27 17:00:48 +00:00
Philip I. Thomas 8cf8b98f2f fix: Add popular embedding libraries to serverExternalPackages (#76574) 2025-02-27 16:21:26 +00:00
Rich Haines be051841a6 docs: Node.js runtime support for Middleware (#76556)
This PR adds docs for the experimental node.js runtime middleware
feature.
<!-- 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

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### 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: Mariano Fernández Cocirio <marianococirio@gmail.com>
Co-authored-by: Lee Robinson <lee@leerob.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-02-26 17:30:46 -08:00
Zack Tanner 957ae37b19 [dev-overlay]: update docs for devIndicators & outdated screenshot (#76463)
- Updates the `devIndicators` documentation to reflect the new API
- Removes an outdated screenshot for explaining how to use the Node.js
inspector -- the image itself wasn't adding much clarity and having to
keep it in sync with UI updates isn't ideal.

Closes DOC-4281
Closes DOC-4282
2025-02-26 06:55:09 -08:00
cassian-goode d46d3efd87 Correcting typo (#76440)
<!-- 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

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### 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: Sam Ko <sam@vercel.com>
2025-02-25 23:32:31 +00:00
Sachin Hegde 5c531cc2d2 Docs: Fix minor typo in api-reference/functions/cookies.mdx (#76376)
Small grammatical improvement on the cookieStore API docs.

<!-- 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

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### 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: Sam Ko <sam@vercel.com>
2025-02-25 23:31:41 +00:00
Boyan Bratvanov 54fd984060 docs: fix typo in route-segment-config (#74403)
Fix typo.

Co-authored-by: Sam Ko <sam@vercel.com>
2025-02-25 23:30:31 +00:00
Jiachi Liu 6a5d6764b9 [metadata] clarify the default list behavior (#76450) 2025-02-25 19:14:08 +00:00
Zack Tanner 8d43c66a53 [docs]: add --api option information (#76493)
We added `--api` support to create-next-app via #68130. This documents
that option.

Closes DOC-4221
2025-02-25 16:07:18 +00:00
Sam Ko 86ef885563 docs: adjust Caching data with an ORM or Database section (#76454)
## Why?

Adjust first sentence of [Caching with an ORM or Database](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching#caching-data-with-an-orm-or-database) section to clarify that you don't need `unstable_cache` to prerender a page.

- Fixes https://github.com/vercel/next.js/issues/73808
2025-02-24 16:08:43 -08:00
Sam Ko a27d411037 docs(lazy-loading): add caveat to importing client components section (#76358)
## Why?

Automatic code-splitting is currently not supported when a Server Component dynamically imports a Client Component.

- x-ref: https://github.com/vercel/next.js/issues/61066
- Fixes https://github.com/vercel/next.js/issues/60656
2025-02-24 15:37:29 -08:00
loopy 573fb12b18 docs: fix duplicate "scroll" parameter in Link component documentation (#74820)
### What
This PR fixes a duplicate description of the `scroll` parameter in the
[Link component API
documentation](https://nextjs.org/docs/pages/api-reference/components/link#disable-scrolling-to-the-top-of-the-page).

### Why
The section describing the `scroll` parameter included duplicated
information, which might confuse readers. Removing the redundancy
improves clarity and ensures the documentation remains concise.

### Changes
- Removed the duplicate `scroll` parameter description in the `Link`
component documentation.

Co-authored-by: loopy-lim <loopy@jnu.ac.kr>
Co-authored-by: Sam Ko <sam@vercel.com>
2025-02-24 20:23:58 +00:00
Jiachi Liu 165f9be782 [metadata] update metadat docs for streaming metadata (#76282) 2025-02-24 17:36:50 +01:00
wangsijie 6b2aec16d7 docs: add Logto auth library (#75176)
### What?

Add [Logto](https://logto.io) to the auth libraries list.

### Why?

Logto has official Next.js SDK with a well documented quick start guide.
Logto is an open-source Auth0 alternative for modern apps and SaaS
products, supporting OIDC, OAuth 2.0 and SAML open standards for
authentication and authorization.

### How?

Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-02-21 14:47:21 -08:00
Sam Ko 74c99d2b76 docs(cookies): update good-to-know for cookie.delete (#76303)
## Why?

We should also clarify that the exact subdomain must be specified when using wildcard domains.

- Fixes https://github.com/vercel/next.js/issues/76275
2025-02-20 15:35:35 -08:00
Jiwon Choi a89d55c011 [dev-overlay] Remove old Dev Overlay (#76256)
This PR removed the old overlay including the deprecated `buildActivity`
and `appIsrStatus` options.

Closes NDX-785
Closes NDX-855
Closes NDX-865
Closes NDX-866
Closes NDX-867
Closes NDX-868
2025-02-20 19:43:14 +09:00
Niaz Morshed Nayeem 6800e1ec4b docs: update tailwind installation instruction to v4 (#75739) 2025-02-12 13:33:16 -06:00
Lee Robinson 5b671c122d docs: fix prettier error (#75968) 2025-02-12 10:55:27 -06:00
Lee Robinson 106e17ca8f docs: recommend webp over avif (#75966)
Co-authored-by: Steven <steven@ceriously.com>
2025-02-12 10:43:41 -06:00
Lee Robinson bd1a84dc50 docs: fix use pattern (#75529) 2025-02-12 10:34:05 -06:00
Aleksey Maltsev 3804e4657d docs: Fixed link to stale-while-revalidate article (#74949) 2025-02-11 21:20:57 -06:00
Johann Pinson eab683b268 docs: incorrect anchor on searchParams link (#75266) 2025-02-11 21:17:08 -06:00
Arthur Sedlukha 03d6b0d2c5 docs: fixed wrong import for unauthorized (#75420) 2025-02-11 21:14:30 -06:00
Michael 6895febbe2 docs: fix typo (#75711) 2025-02-11 21:05:04 -06:00
bjunix ba7cd6c671 docs: update install instructions (#75788) 2025-02-11 21:03:54 -06:00
Angel P. 9cedecff26 docs: fix typo in use-cache.mdx (#75848) 2025-02-11 21:02:25 -06:00