Commit Graph

1072 Commits

Author SHA1 Message Date
Delba de Oliveira a0ab6d32af docs: Move src folder page to API reference (#78499) 2025-04-24 08:34:05 -05:00
Delba de Oliveira 7a64ada1ab docs: Move pages from Config section into guides (#78496) 2025-04-24 07:28:50 -05:00
Delba de Oliveira 7b554b3967 Docs IA 2.0: Move testing guides (#78418)
Closes: https://linear.app/vercel/issue/DOC-4576/testing
Redirects: https://github.com/vercel/front/pull/44459
2025-04-24 09:25:55 +01:00
Jiwon Choi fd438787f3 misc: use correct capitals for React terms (#78445)
- `Client/Server Component`
- `React Hooks`

---------

Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
2025-04-23 21:50:55 +09:00
Jimmy Lai a556825dd7 docs: update React Compiler docs (#78427)
Adds a few clarifications on how the React Compiler side of the world
works.

<!-- 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: Lee Robinson <lee@leerob.com>
2025-04-22 16:31:51 -07:00
Michael Duncan 79b34f0652 docs: fix the path of the program attribute in debugging page (#78268)
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-04-22 17:16:42 +00:00
Delba de Oliveira bce5afe856 Docs IA 2.0: Move authentication page under guides (#78412)
Closes: https://linear.app/vercel/issue/DOC-4574/authentication
Redirects: https://github.com/vercel/front/pull/44449
2025-04-22 16:46:15 +01:00
Delba de Oliveira 74d999e06d docs: Move CI build caching page under guides, and create equivalent /app guide (#78416)
Closes: https://linear.app/vercel/issue/DOC-4577/ci-build-caching
Redirects: https://github.com/vercel/next.js/pull/78416
2025-04-22 10:18:39 -05:00
Delba de Oliveira d5359765dd docs: Move Static Exports to guides, create Self-hosting guide (#78244)
Closes: 

- https://linear.app/vercel/issue/DOC-4550/static-exports
- https://linear.app/vercel/issue/DOC-4551/self-hosting

Redirects: https://github.com/vercel/front/pull/44237

---------

Co-authored-by: Lee Robinson <lee@leerob.com>
2025-04-22 08:44:58 -05:00
Will Binns-Smith 126c22678f Turbopack: Remove next start --turbopack (#78384)
This removes the `--turbopack` and `--turbo` flags from `next start`, as
it correctly launches the server to handle Turbopack builds without the
flag.

It also removes this section from the documentation.

This is a breaking change, but Turbopack-powered builds are
experimental, so this can probably go out with the next stable release.
2025-04-21 18:32:39 -07:00
Maria Vanessa Salim 5cd6fdfa77 docs: improve userAgent device.type example in userAgent.mdx (#78368)
### What?

Updates the `userAgent` middleware example in the documentation to
accurately reflect all possible values of `device.type` and demonstrate
proper handling of desktop browsers (undefined case).

### Why?

The current example shows a binary mobile/desktop check which doesn't
accurately reflect the API's capabilities. The `device.type` property
can actually return multiple values ('mobile', 'tablet', 'console',
'smarttv', 'wearable', 'embedded', or undefined), but the example only
shows handling of 'mobile', which could mislead developers.

### How?

- Updated both TypeScript and JavaScript examples to:
1. Add comprehensive comments documenting all possible `device.type`
values
2. Use proper undefined handling with the OR operator for desktop
browsers
  3. Maintain consistency between TS and JS versions
  4. Better align with the documented behavior in the API reference
- Ran `pnpm prettier-fix` to ensure proper formatting
- Followed the [Docs Contribution
Guide](https://nextjs.org/docs/community/contribution-guide)

The changes help developers better understand:
- The full range of device types they can detect
- How desktop browsers return undefined
- The proper way to handle device type detection
- Consistency with the rest of the API documentation

### Checklist

- [x] Read the [Docs Contribution
Guide](https://nextjs.org/docs/community/contribution-guide)
- [x] Ran `pnpm prettier-fix` to fix formatting issues
- [x] Ensured examples are clear and follow documentation best practices
- [x] Maintained consistency with existing documentation style
- [x] Verified the accuracy of the technical information

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-04-21 17:48:01 +00:00
Jiachi Liu 24bd08d655 [docs] fix function signature of og image (#78277)
Fixes the function signature changed in #78200
2025-04-17 13:16:21 +01:00
Delba de Oliveira dd5f67f528 Docs: Fix nav item lettercasing for multi-zones (#78250) 2025-04-17 09:29:28 +01:00
Delba de Oliveira 304c54ad74 docs: Move Production Checklist under Guides (#78240)
Closes: https://linear.app/vercel/issue/DOC-4549/production-checklist
Redirects: https://github.com/vercel/front/pull/44234
2025-04-16 19:10:35 -05:00
Delba de Oliveira 3dc939b7fa Docs IA 2.0: Move multi-zones docs to Guides (#78238)
Closes: https://linear.app/vercel/issue/DOC-4548/multi-zones
Redirects: https://github.com/vercel/front/pull/44233
2025-04-16 14:11:41 +01:00
Delba de Oliveira 49d1b5b330 Getting Started Docs: Add deploying page (#77720)
Closes: https://linear.app/vercel/issue/DOC-3702/page-deploying

---------

Co-authored-by: Rich Haines <hello@richardhaines.dev>
2025-04-16 12:50:37 +00:00
Josh™ ddca4983a2 [docs] Update 03-fonts.mdx (#77965)
Closes: #75384 
Closes: #77883 


## Motivation
The current documentation for adding `next/font` to Tailwind CSS is now
obsolete as it gives examples applicable to Tailwind v3 such as updating
the Tailwind CSS config file, which is quite outdated since the
inception of Tailwind v4.

Based on the newer way of configuring Tailwind, the doc has been updated
with steps for adding `next/font` to Tailwind CSS v4 including relevant
examples.

### Before:

<img width="671" alt="Screenshot 2025-04-09 at 11 24 31 am"
src="https://github.com/user-attachments/assets/316e7cba-82fa-4b24-a754-759c47832060"
/>

### After:

<img width="673" alt="Screenshot 2025-04-09 at 11 22 23 am"
src="https://github.com/user-attachments/assets/355c4e26-f1a8-43cd-8e8b-d0403f4bebc3"
/>


<!-- 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: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-04-16 02:37:10 +00:00
Delba de Oliveira e3921c79ab Docs Papercuts (#78200)
Closes: 

- https://vercel.slack.com/archives/C02F56A54LU/p1744661143046739
- https://vercel.slack.com/archives/C02F56A54LU/p1744120627226299
2025-04-15 15:40:54 +00:00
Delba de Oliveira bd0da32a68 Docs IA 2.0: Move migration docs under Guides (#78193)
Closes: https://linear.app/vercel/issue/DOC-4540/migration-guides

Redirects: https://github.com/vercel/front/pull/44177

Please merge this one first:
https://github.com/vercel/next.js/pull/78189
2025-04-15 15:39:01 +00:00
Delba de Oliveira e5fe535ed1 Docs IA 2.0: Move SPA docs under Guides (#78195)
Closes:
https://linear.app/vercel/issue/DOC-4541/single-page-applications-guides
Redirect: https://github.com/vercel/front/pull/44179
2025-04-15 16:22:07 +01:00
Delba de Oliveira ae1cad07dd Docs IA 2.0: Move version upgrade docs under Guides (#78189)
Closes: https://linear.app/vercel/issue/DOC-4539/version-upgrade-guides

Redirects: https://github.com/vercel/front/pull/44175

Move version upgrade guides under `Guides`. Also creates a guides
section under the Pages docs.
2025-04-15 16:00:54 +01:00
Drew Long fc112fcf73 docs: improve wording around NextRequest and query params (#77923)
### What?
Clarified the description of the NextRequest object in the route handler
documentation. Specifically, I reworded the sentence to improve
readability.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-04-15 13:37:32 +00:00
Neschadin Oleksandr 72ce06561f Update turbopack.mdx (#78082)
just deleted an extra letter in the docs.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-04-15 13:29:16 +00:00
Dev Talan c27264c606 Added @types/jest in installtion commands. (#78090)
<!--
Thanks for opening a PR! Your contribution is much appreciated.  
To make sure your PR is handled as smoothly as possible, please follow
the checklist sections below.
Choose the right checklist for the change(s) you're making:
-->

## For Contributors

### Improving Documentation

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

### Adding or Updating Examples

- Follow the [examples contribution
guidelines](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md).
- Ensure linting passes by running `pnpm build && pnpm lint`.  
See: [Linting
Docs](https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md)

### Fixing a Bug

- Link-related issues using `fixes #number`.
- Add relevant tests. See: [Testing
Guide](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Ensure errors include helpful links.  
Reference: [Error Links
Guide](https://github.com/vercel/next.js/blob/canary/contributing.md)

### Adding a Feature

- Implements an accepted feature request or RFC.  
(Ensure there's an approved discussion: [Submit
Idea](https://github.com/vercel/next.js/discussions/new?category=ideas))
- Link issues or discussions using `fixes #number`.
- Add e2e tests where appropriate.  
See: [e2e Testing
Guide](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Include updated documentation.
- Add telemetry (if needed) to determine usage.
- Ensure errors have helpful links attached.

---

## For Maintainers

- Provide a minimal, clear description (as if explaining to someone
unfamiliar with the context).
- Share Slack thread summaries when referencing discussions.
- Link both Linear (`Fixes NEXT-xxx`) and GitHub issues.
- Leave review comments where the logic behind changes might not be
obvious.

---

### What?

Updated documentation and installation instructions to include
`@types/jest`.

### Why?

When setting up Jest in a TypeScript project, omitting `@types/jest`
causes TypeScript to fall back to `node:test`, leading to incorrect
module resolution and runtime errors. Including `@types/jest` resolves
this and ensures a smooth development experience.

### How?

Added `@types/jest` to the recommended install commands wherever
applicable, ensuring consistent and error-free setup for users following
the docs.

Closes `NEXT-`  
Fixes `#`
2025-04-15 13:23:10 +00:00
Tim Neutkens 986e392b08 Document Turbopack trace viewer (#78184)
Explains how to run the Turbopack trace viewer. This tool is focused on
low-level observability. We use it to optimize Turbopack performance and
memory usage. It's also useful for finding slowdowns caused by
customization like postcss / custom loaders and such.

<!-- 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-04-15 12:36:11 +02:00
Delba de Oliveira 59f7a8abe9 Getting Started Docs: Clean up docs/app and docs/pages pages (#78151)
Closes: https://linear.app/vercel/issue/DOC-4498/clean-up-appdocs

- Went through the FAQ on the page and made sure the information is
found in other places in our docs.
- With the IA changes, we shouldn't need a FAQ that duplicates
information.
- We can have a dedicated App Router FAQ page in the future - if there's
a need for it.
2025-04-15 09:20:52 +01:00
Delba de Oliveira c94753cfdc Docs: Update useLinkStatus API reference (#78022)
Updating the docs after playing around with `useLinkStatus`:
https://github.com/vercel/next-app-router-playground/pull/184
Closes: https://linear.app/vercel/issue/DOC-4514/update-docs

Main changes:

- Update introduction
- Simplify example
- Add example for gracefully handling fast navigations (avoiding UI
flash)
2025-04-10 14:30:20 +01:00
Delba de Oliveira 5b243a2d5a Docs: Improve "use cache" and cacheLife API references (#78024)
Decoupling from: https://github.com/vercel/next.js/pull/73437


- Add "How `use cache` works" section
  - Clarify cache keys inputs
  - Describe what happens during build, runtime, and revalidation
- Correct the default values for the `cacheLife` profiles
- Add the default time for `expireTime`
- Add note about `staleTimes` and `expireTime` affecting the default
cache profile
2025-04-10 14:26:26 +01:00
Delba de Oliveira d8aae5e7c0 15.3 Docs: Turbopack for build (#77730)
Closes: https://linear.app/vercel/issue/DOC-4469/turbopack-for-builds

---------

Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
2025-04-10 11:17:41 +01:00
Will Binns-Smith c54f98767a Turbopack: update docs for config.turbopack (#77853)
Turbopack: update docs for `config.turbopack`
    
As `turbo.mdx` is renamed to `turbopack.mdx`, we’ll need a redirect on
the nextjs.org website to take users to the new location. This will be a
separate PR in its repository.

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2025-04-09 16:32:32 +02:00
Jiwon Choi b9620e6b1f docs: improve file tree (#77889)
The file tree can be improved and share the same convention:

- Use the `txt` file extension.
- One tab indented.
- Use file tree with root `.` and trailing slash for folders.

x-ref: https://tree.nathanfriend.io
2025-04-09 12:53:44 +02:00
Will Binns-Smith 4f5531b140 Turbopack: support config.turbopack and deprecate config.experimental.turbopack. (#77850)
Closes PACK-4263

This:
- Adds support for using `config.turbopack` for Turbopack. The accepted value for this option is identical to the previous experimental one without the deprecated field `loaders`.
- Deprecates `config.experimental.turbo`. Warns on its use, but will continue to accept it, merging it with `config.turbopack` while preferring fields on `config.turbopack`.
- also see https://github.com/vercel/next.js/pull/77850#pullrequestreview-2749738760

Test Plan:
- [x] Convert use of `config.experimental.turbo` in tests to `config.turbopack`
- [x] Automated test for accepting the experimental option for compatibility, as well as the config merging
2025-04-09 03:42:38 -07:00
Kain c640c57a08 docs: fix useLinkStatus import (#77834) 2025-04-08 20:59:52 -05:00
Delba de Oliveira cfad624df1 docs: update Getting Started Section (#77921)
Closes: https://linear.app/vercel/issue/DOC-4467/review-and-clean-up

Also addressed user feedback from vercel/feedback
2025-04-08 08:08:41 -05:00
Delba de Oliveira 6bc472a788 Docs IA 2.0: Add Deep Dive section placeholder (#77724)
This section will be for developers who want to understand how things
work. It's not essential knowledge, but good to know.

A place for conceptual information and colorful diagrams that explain
the magic behind things ✨ 🌈
2025-04-04 16:24:56 +01:00
Jude Gao a14d013766 doc: onNavigate follow-up (#77805)
Fix the logic when user explicitly wants to leave the page but
navigation is blocked.
2025-04-04 07:53:45 +08:00
Jude Gao 2acdadb418 doc: useLinkStatus doc follow-up (#77790)
`use client` file should not define server components

---------

Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-04-04 02:00:13 +08:00
Jude Gao 4643bcd4e2 doc: onNavigate (#77647)
<!-- 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: Lee Robinson <lee@leerob.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-04-04 01:39:04 +08:00
Jiachi Liu 06384d1f92 [docs] fix lint issue in use link status doc (#77785)
lint job was not triggered
2025-04-03 09:54:15 -07:00
Jude Gao 6fa2d2124b doc: useLinkStatus (#77648) 2025-04-03 20:21:44 +08:00
Delba de Oliveira 251d1fec82 Revert "Docs: Recommend inline use server and update examples" (#77771)
Reverts vercel/next.js#77770
2025-04-03 12:35:46 +01:00
Delba de Oliveira d9d3f73fbc Docs: Recommend inline use server and update examples (#77770) 2025-04-03 12:05:12 +01:00
Lee Robinson 030b0382c8 docs: instrumentation-client follow up (#77752)
Small follow-up
2025-04-02 20:53:59 -05:00
Steven c9e238edf9 feat(next/image): support new URL() for images.remotePatterns (#77692)
Configuring `remotePatterns` can be a hassle because you have to define
each of the parts. And if you forget a part, its a wildcard meaning it
will match anything. This is usually not desirable since most remote
images don't allow query strings.

This PR adds support for using an array of `URL` objects when defining
`images.remotePatterns`.

```js
module.exports = {
  images: {
    remotePatterns: [
      new URL('https://res.cloudinary.com/my-account/**'),
      new URL('https://s3.my-account.*.amazonaws.com/**'),
    ],
  },
}
```

Note that wildcards must be explicit and anything missing is assumed to
no longer match.
2025-04-02 19:13:57 -04:00
Sam Ko 49ba0acc18 chore(examples): remove examples that can be v0'd (#77349)
## Why?

Taking small steps towards reducing the large burden we are taking on with [examples](https://github.com/vercel/next.js/tree/canary/examples).
2025-04-02 14:27:08 -07:00
Bernardo Gomes f77d0ee469 fix(docs): update error type in notFound function description (#77503)
<!-- 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?

* Update the documentation to reflect the current named exception.

### Why?

* The code was updated, but the documentation was not.

### How?

* Replace outdated information in the markdown file with the correct
details.
2025-04-02 17:19:13 +00:00
Delba de Oliveira 9249188ebb Docs IA 2.0: Rename Examples to Guides (#77722)
Examples: small, isolated use cases
Guides: more extensive how-tos

Redirect: https://github.com/vercel/front/pull/43551
2025-04-02 14:57:01 +01:00
Delba de Oliveira 48eac4d5d1 Getting Started Docs: Add Upgrade page (#77717)
Closes: https://linear.app/vercel/issue/DOC-4072/page-upgrading

---------

Co-authored-by: Rich Haines <hello@richardhaines.dev>
2025-04-02 14:09:50 +01:00
Delba de Oliveira 0a5e04220a Getting Started Docs: Add Metadata and OG images page (#74077)
Closes:
https://linear.app/vercel/issue/DOC-3701/page-metadata-and-og-images

- Default fields
- Static metadata
- Generated metadata
- Favicons
- Static OG images
- Generated OG images

---------

Co-authored-by: Rich Haines <hello@richardhaines.dev>
2025-04-02 13:35:02 +01:00
Jude Gao 2737373c3b doc: instrumentation-client (#77649) 2025-04-01 23:14:25 +08:00