Commit graph

1621 commits

Author SHA1 Message Date
Tyler Lutz
a2df492957
Update next lint section (#51898)
App directory is stable so you no longer need appDir.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-06-29 19:56:45 +00:00
Delba de Oliveira
18406adf9c
Make sure DevEx can approve docs PRs / Remove Spaces (#51996) 2023-06-29 17:10:53 +00:00
Delba de Oliveira
7c5eb3191e
[Docs] Remove unnecessary mention of scroll false (#51964) 2023-06-29 12:21:49 +00:00
Balázs Orbán
3dcaf922de
docs: clarify reactStrictMode: true by default (#51931)
Closes #51841

[Slack thread](https://vercel.slack.com/archives/C03S9JCH2Q5/p1687815414309519?thread_ts=1687814821.415089&cid=C03S9JCH2Q5)

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2023-06-29 03:48:29 +00:00
JJ Kasper
15b84c1dd3
lint fix 2023-06-28 20:00:37 -07:00
Lee Robinson
e602207cb0
docs: make custom image loader a client component. (#51858) 2023-06-28 19:36:20 -07:00
Charles Dudley
f17614abd1
[Docs] Fix run-on sentence (#51956)
As stated in title :)
2023-06-29 02:28:28 +00:00
Mrxbox98
bd1fc78bd8
Add cpu-features to server external packages (#51946)
<!-- 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 #

-->
### What?
Adds [cpu-features](https://www.npmjs.com/package/cpu-features) to
external server packages.

### Why?
To prevent developers from having to add ``cpu-features`` to their next
config.
2023-06-28 17:52:04 -07:00
Tyler Lutz
1f19a5b810
Add separate links in shared documentation (#51733)
### What?
- Added separate links for the app and pages router in the shared documentation.
- Added comment at the top of all shared documentation.
- Fixed typos in pages documentation comment.

### Why?
- To limit the switching between the different routers in shared documentation when clicking the links.
2023-06-28 23:37:56 +00:00
VelociRaptor
64c297f194
[docs] fix curly brackets in mdx (#51916)
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-28 23:19:49 +00:00
Christian Ivicevic
73491308b4
[docs] Replace the term "hole" with "slot" (#51919)
It feels more natural to use the actual term "slot" when describing how
to interweave server and client components since it's used in other
frameworks as well.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-28 16:07:15 -07:00
VelociRaptor
d390d75e1f
[docs] fix angle bracket in mdx (#51920) 2023-06-28 23:01:24 +00:00
Jacob Fletcher
d206c68ad7
adds payload to server-external-packages.json (#51933)
### What?
Adds `payload` to the external package list

### Why?

To prevent developers using
[Payload](https://github.com/payloadcms/payload) modules within Next.js
from having to add this in their next config.
2023-06-28 13:03:08 -07:00
drblessing
0732f2f538
Update 10-router-handlers.mdx (#51850)
Fixes a key bug for RequestCookie type
2023-06-26 14:25:39 -07:00
Ty Hopp
65f94baa83
feat: Introduce eslint rule for async client components (#51547)
The [React Server Component RFC on promise support](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md) indicates that [client components cannot be async functions](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md#why-cant-client-components-be-async-functions).

This PR introduces an eslint rule to enforce this.

Fixes #50898
2023-06-26 21:10:24 +00:00
Charles Dudley
e140e90e05
[Docs] Fix usage of article "an" before a consonant sound (#51803)
Because `<Carousel />` starts with the consonant, "C", the preceding article should be "a" not "an".

Reference: [https://www.merriam-webster.com/words-at-play/is-it-a-or-an](https://www.merriam-webster.com/words-at-play/is-it-a-or-an)
2023-06-26 15:34:31 +00:00
Luca Steeb
6d0d5e313b
docs(deploy): fix GitHub Actions cache key (#51789)
The specified default cache key `**.[jt]s` does not consider any files
in
folders, while `**/*.[jt]s` recursively includes all files.
The same goes for jsx/tsx.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-25 13:28:02 -07:00
Lee Robinson
72fdb063ee
docs: Add updated next/image video. (#51790)
I made a video two years ago that was teaching old patterns of the
Next.js image component. Since then, we have simplified the API, made
improvements to the component that no longer require wrapping DOM
elements, and more. This updated video explains these concepts, as well
as walks through some of the practical examples in the `examples/` fold
here.
2023-06-25 13:11:37 -07:00
Italo A
5e36c34992
fix: typo into 03-css-in-js.mdx page (#51761)
### Improving Documentation
Just fixing a typo into "alphabetical" word

- 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

### What?
Misleading typo
2023-06-24 22:08:49 +00:00
kevinmitch14
881512baf1
docs: improve minor grammar mistake (#51758) 2023-06-24 20:43:23 +00:00
Shu Ding
70692d80b4
Rename serverActionsSizeLimit as serverActionsBodySizeLimit and add docs (#51755)
Close the circle after #51104. The name "size limit" can be confusing as it could also mean the size of the Server Action function itself, so this PR changes it to `serverActionsBodySizeLimit` and makes sure it's well documented.
2023-06-24 16:16:09 +00:00
Angel Lopez Pol
385e6fdbcf
Fix Typo in Optimizing - Open Telemetry docs (#51729)
### What this PR does

This PR fixes a minor typo on the Vercel Open Telemetry Docs.
`It's not extensible and you should configure OpenTelemetry manually
(if) you need to customize your setup.`

That is all :)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-23 16:33:34 -07:00
Tyler Lutz
91636405fc
Add app to tailwind.config.js in fonts documentation. (#51671)
The tailwind.config.js in the fonts documentation was missing the app
directory.
2023-06-23 13:43:59 -07:00
Morgan Feeney
fb79c116c6
Update 01-images.mdx (#51532)
Due to the size of grid tracks specified in the CSS I amended the usage of the HTML `sizes` attribute.

The media can be ascertained from `gridTemplateColumns` and `gridGap` values, this change results in smaller images also being available in the srcset for use with sizes, which should be more performant.
2023-06-23 19:28:35 +00:00
SMG
b448a50475
fix(docs): added missing dot (#51718)
Added missing dot in
```docs/02-app/01-building-your-application/06-configuring/03-environment-variables.mdx```
2023-06-23 11:48:47 -07:00
Tyler Lutz
b7d49e0e0f
Fix typo in 01-typescript.mdx (#51669)
Change 'Previous' to 'Previously'
2023-06-23 14:13:19 +00:00
Bigyan
df08b22e7f
docs: fix generated app icons file extensions (#51562)
The file extensions of the generated file extensions section are not what it's supposed to be or not what documentation has specified.

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-06-23 10:34:16 +00:00
Lee Robinson
f1624b65b4
docs: link to tutorial for incremental adoption. (#51682)
https://www.youtube.com/watch?v=YQMSietiFm0
2023-06-23 01:25:45 +00:00
Tyler Lutz
df0612adf5
docs: Add 'DO NOT EDIT' comment (#51600)
### What?

Adds missing "DO NOT EDIT" comment to some of the shared documentation pages"

### Why?

A few of the shared documentation files didn't have the comment to not edit them.
2023-06-22 16:54:52 +00:00
Tyler Lutz
5127c33fc9
Add page router documentation (#51626)
Adds tailwindcss documentation for the pages router.
2023-06-22 14:12:50 +00:00
Keerthi Ramanarayan Meda
e3ad371c97
Add docs for src directory to include tailwindcss (#51619)
Tailwind CSS configuration is missing in the docs when configuring the `src` folder




Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-06-22 13:33:40 +00:00
Lee Robinson
e73baa5a65
docs: Add Panda CSS to CSS-in-JS docs. (#51484)
https://panda-css.com is a new solution that works with the Next.js App
Router.
2023-06-21 16:12:28 -07:00
SHOURYA SHIKHAR
87bfab4448
added good to know in /app based pages and layout in nested layouts (#51558)
<!-- 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?

-->
Added a good to know section mentioning that one should not add `html`
or `body` tags in nested layouts under `/app` based routing.

It was not mentioned anywhere before and often one forgets this while
migrating from the `/pages` based routing

Fixes #51556

---------
2023-06-21 15:42:43 -07:00
hustLer2k
a101ffe213
Broken link at 01-static-and-dynamic-rendering.mdx (#51582)
useSearchParams() links to /docs/app/api-reference/functions/use-params instead of /docs/app/api-reference/functions/use-search-params
2023-06-20 19:13:06 +00:00
Tyler Lutz
70c1024737
Remove duplicate word in 11-draft-mode.mdx (#51580)
Removes duplicate "to" in documentation.
2023-06-20 11:49:52 -07:00
Tyler Lutz
21af14dc11
docs: Fix typo (#51517)
Change tranforming to transforming in 05-mdx.mdx
2023-06-19 22:49:02 +00:00
Wyatt Johnson
85002ba01e
Linted MDX (#51530)
Fixes a linting issue with a MDX file that was updated.
2023-06-19 14:19:03 -06:00
Wisnu Wicaksono
3ca833da3b
docs: add missing comma for code snippet. (#51437) 2023-06-19 07:50:05 -07:00
Leo Driesch
53df94f8d5
docs: Remove duplicate bullet point in app router migration. (#51440) 2023-06-19 07:49:33 -07:00
vicsantizo
03e975be9e
docs: add missing comma. (#51489) 2023-06-19 07:48:39 -07:00
vicsantizo
4977bb7006
docs: add missing word. (#51490) 2023-06-19 07:48:15 -07:00
Sonam Serchan
5936213e74
docs: link to caching heading for production docs. (#51501) 2023-06-19 07:47:48 -07:00
Lee Robinson
b0a704d801
docs: add better examples to next/image docs. (#51457) 2023-06-19 07:44:58 -07:00
Tyler Lutz
ac74b58bd1
docs: Fix typo in image alt. (#51487) 2023-06-18 21:40:45 -07:00
Kevin Wang
6a189bc442
docs: Update to prepending in contribution guide. (#51474) 2023-06-18 20:08:29 -07:00
Rexford Essilfie
8dfaa48668
docs: fix MDX formaction link ID. (#51481) 2023-06-18 20:06:44 -07:00
Tyler Lutz
67853aa8cd
docs: Fix typo in Route Handlers docs. (#51429) 2023-06-16 15:01:33 -07:00
Michael Novotny
cd683523a1
docs: Adds missing export from Server Actions docs (#51418) 2023-06-16 08:41:03 -07:00
Delba de Oliveira
13c205ffdf
[Docs] Add note about adding the instrumentation file inside 'src' (#51415)
The instrumentation.js should be placed in the root, or inside the 'src' folder if one exists
2023-06-16 14:15:39 +00:00
Jon Meyers
3cac09790b
examples: update with-supabase example to App Router (#51335)
### What?

Update Next.js with Supabase example

### Why?

Existing example for Next.js with Supabase is out of date

### How?

- Rename `with-supabase-auth-db-realtime` to `with-supabase`
- Update example to use App Router
- Use Supabase Auth Helpers for Next.js to configure auth cookies

---------
2023-06-16 06:16:42 -07:00
Bruno Eduardo de Souza Medeiros
94c9418091
docs: remove copy mentioning appDir as an experimental feature (#51403)
The documentation for `(App or Pages) / Building your Application /
Configuring / Eslint`
[here](https://nextjs.org/docs/app/building-your-application/configuring/eslint#linting-custom-directories-and-files)
is mentioning the appDir as an experimental feature that needs to be
enabled.

This PR update it's content removing this mention

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-16 05:54:38 -07:00
Lee Robinson
f7533e0dc1
docs: Add streaming AI example. (#51382)
Addresses https://github.com/vercel/feedback/issues/32707.
2023-06-16 03:11:38 +00:00
Hank Lin
e43f134c1f
docs: fix the url of router event (#51339)
Refer to [here](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/toString#examples)

The `searchParams.toString()` doesn't include the question mark.


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2023-06-15 15:56:35 +00:00
Michael Novotny
f7c105d371
Adds env suggestions (#51312)
Adds suggestions from #51063, which didn't get applied before merge.
2023-06-14 21:33:34 +00:00
Shu Ding
5e9b5e5d3c
Update example of Server Actions HoC (#51299)
Currently the Server Action function with `"use server"` must be an
async function as it's required by the compiler, even if it returns a
promise already.
2023-06-14 12:17:45 -07:00
Tyler Lutz
9539440965
Docs: Remove extra word in 03-scripts.mdx (#51304)
Removes extra 'the' in the documentation

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-14 12:06:25 -07:00
Gideon
86112a357c
Update images.mdx (#51275)
fix Fastly and Gumlet heading level
2023-06-14 18:59:04 +00:00
Delba de Oliveira
d27cda21d6
[Docs] Fix broken links (#51285)
Bring back #related-links and fix broken link in fonts page
2023-06-14 14:30:35 +00:00
Delba de Oliveira
419194bb4b
[Docs] Fix broken link (#51281) 2023-06-14 13:52:03 +00:00
John Albin Wilkins
1e796726ee
Document CSS concatenation order matches the import order (#39889)
Given the amount of CSS ordering problems mentioned in the issue queue
(see #16630), it's clear, for most people, that it is NOT obvious that
the order of CSS concatenation matches the order of importing CSS and
modules inside `_app.js`.

We should try to make this fact explicit in the docs. Right now, it's
only implied.


## Documentation checklist

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 23:31:49 -07:00
wiredacorn
cc46d97232
Update module-path-aliases.md (#43592)
<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

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

## Documentation / Examples

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

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 19:53:17 -07:00
J
18b133e6a3
docs: fixed a typo in parallel routes (#51267)
`allow` => `allows`
2023-06-14 02:45:48 +00:00
Guilleo
691598ecee
Fix middleware documentation (#48876)
In the actual documentation, `value` does not exist. I removed `value`
and work correctly

<!-- 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 or adding/fixing 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>
2023-06-13 19:18:11 -07:00
William Wilder
99142b5897
Update 02-fonts.mdx (#51249)
Add link to font api instead of internal reference to same page.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 19:06:32 -07:00
Joe Marty
ac32452d1c
Clarify the limitations of NEXT_PUBLIC_ (#49105)
It's not totally clear from the docs that using `NEXT_PUBLIC_` env vars
will be a problem for pipelines that deploy the same image to multiple
environments (this bit us in a production incident). This PR is an
attempt to make it clear. Open to feedback/suggestions!

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 19:01:44 -07:00
Jan Cizmar
0a9148901b
docs: Add Tolgee to internationalization section (#49754)
It would be nice to have Tolgee listed in internationalization libs
supporting Next.JS

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 18:50:11 -07:00
Delba de Oliveira
85ea7cde33
Remove related-links (#51258) 2023-06-13 22:12:48 +00:00
Steven
0f03ef14f0
chore(docs): codemod docs should mention . for cwd (#51264)
These docs were wrong because `./pages` is not sufficient to run a
codemod.

Imagine a project that has `./components` and `./pages` and many
directories for example.

Also its important to run at the root of the Next.js project so that the
path has a `next.config.js` because some codemods modify that config.
2023-06-13 14:44:53 -07:00
Delba de Oliveira
d27a4969f6
Fix code example filename for related-links (#51256) 2023-06-13 13:36:41 -05:00
Delba de Oliveira
6431b19906
Fix broken link (#51253)
Fix broken link in client-side rendering page
2023-06-13 13:08:19 -05:00
Delba de Oliveira
8a0686e28d
[Docs] Add version history to app api pages (#51218) 2023-06-13 18:03:27 +00:00
Delba de Oliveira
3d41ccb916
Update codeowners (#51250)
Tweak code owners after some testing and feedback. 

- Move the Next.js team up to be optional global code owners (so that everyone can review but are not tagged for review). Global individuals should still be tagged if there are no specific `.vercel.approvers` files in subdirectories.
- Adds @vercel/devex to image files so there's coverage on those files for the docs
- Target specific folder and files for Styfle to get notified
- Deletes some rules in the old GitHub codeowners
2023-06-13 17:47:12 +00:00
Delba de Oliveira
a3344ad6fc
[Docs] Add mininum client-side rendering page (#51220) 2023-06-13 12:16:29 -05:00
Delba de Oliveira
e048f4ef03
[Docs] Recommend prettier-fix in PR template and contribution guide (#51237)
Recommend running `prettier-fix` before opening docs PRs to fix formatting issues. I've found that `lint-fix` is currently not fixing formatting issues. Related: https://vercel.slack.com/archives/C03S9JCH2Q5/p1686647582580629
2023-06-13 14:54:06 +00:00
VelociRaptor
b89da42985
[docs] Fix typo in parallel routes (#51238) 2023-06-13 13:54:37 +00:00
Delba de Oliveira
a611641cec
[Docs] Remove extra line in summary dropdowns (#51226)
They were causing markdown to render a <p> tag which has margins and broke the summary dropdowns
2023-06-13 13:50:20 +00:00
Chad Luo
2a93345f14
[Docs] fix example function param and signature (#51235)
Apparently the object deconstruction in the example doesn't work. This PR proposes a working version:

```diff
- export default function Page({ params: { slug: string } }) {
-   return <div>My Post: {slug}</div>
- }
+ export default function Page({ params }: { params: { slug: string } }) {
+   return <div>My Post: {params.slug}</div>
+ }
```

According to the [page reference](https://nextjs.org/docs/app/api-reference/file-conventions/page), the page function parameter slugs needs to be retrieved by calling `params.slug`.

The TypeScript section below shows the correct function type signature, although not referencing to the parameter.
2023-06-13 13:33:31 +00:00
Kiko Beats
4633b2254b
[docs] Add missing Edge Runtime APIs (#51224)
Added missing APIs, also sorted all of them alphabetically to make it
easier to read.

---------

Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
2023-06-13 11:01:40 +01:00
Jiachi Liu
d544c2806e
docs: fix prettier lint (#51222)
Fix prettier lint errors in #51080
2023-06-13 09:19:10 +00:00
Michael Novotny
cefdb27662
docs: Adds Note to Good to know consistency (#51080)
* Changes all `Note` → `Good to know`
* Consistently puts the colon on the outside of bold text
* Documents singe and multi-line styles in contribution guide

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-06-12 19:00:07 -07:00
Tyler Lutz
9fc904f489
docs: fix typos in Server Actions docs. (#51185) 2023-06-12 15:07:27 -07:00
Max Leiter
cdfdaab67d
docs: correct valid route segments for icon/favicon/apple-icon (#51188)
Improves the documentation to correctly mention that only favicon is
restricted to the root app/ segment.

x-ref:
[slack](https://vercel.slack.com/archives/C03KAR5DCKC/p1686425241975119)
2023-06-12 15:06:57 -07:00
Jeremy Douglas Hoover
3b2ee1e085
docs: Fix typo on strategy for next/script. (#51189) 2023-06-12 15:06:12 -07:00
Jack Sutton
4ae8bc7da0
docs: Update Vanilla Extract example link. (#51192) 2023-06-12 15:05:48 -07:00
Tyler Lutz
1987f44474
docs: Add separate lines to eslint prompt. (#51143) 2023-06-12 15:05:23 -07:00
S. Mahdi Mir-Ismaili
0c9041e5b9
Fix a mistake URL in "docs/generate-metadata.mdx/metadataBase" (#51199)
The sample output of `metadataBase` configuration (`<head <link rel="alternate" ...>`) had an incorrect `href`:

https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
2023-06-12 21:34:15 +00:00
Michael Novotny
a973ad64d4
Makes codeblock language and filename extensions consistent (#51056)
There was mismatched usage of `js`, `jsx`, `ts`, and `tsx`. Just tried to get them all in sync.
2023-06-12 18:55:08 +00:00
Delba de Oliveira
98351e9398
[Docs] Update static assets page to filter out <PagesOnly> information (#51180)
Co-authored-by: Michael Novotny <446260+manovotny@users.noreply.github.com>
2023-06-12 18:25:06 +00:00
Jiachi Liu
272ffffd59
docs: fix prettier error (#51182) 2023-06-12 11:31:53 -05:00
Mehran Mirshekaran
0f5b1917df
docs: remove accidental character before use client directive. (#51176) 2023-06-12 08:46:37 -07:00
Lee Robinson
e5a45c8a49
docs: clarify usePathname usage as client hook. (#51146)
Using client components for `usePathname` is not a de-optimization. This
update tries to make this more clear by sharing more information about
the design and tradeoffs of this approach.

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-06-12 07:58:06 -07:00
Lee Robinson
f9813ad671
docs: Improve Actions docs. (#51145)
Adds more clarity on which pieces are Next.js only, how actions
integrate with Next.js, and details on the progressive enhancement
story.
2023-06-12 07:57:17 -07:00
Tristan
b870bf22e5
docs: Fix useSearchParams link in adoption guide. (#51151) 2023-06-12 07:36:52 -07:00
James Pearson
d2e014a011
docs: fix link to next/font API reference. (#51169) 2023-06-12 07:34:02 -07:00
Sayyed Shozib Abbas
109e6cb34b
docs: fix grammar issue in next/image intro. (#51133) 2023-06-11 12:59:21 -07:00
Pau Fernández
bd97c01fca
docs: remove added verb and fix good to know section. (#51054) 2023-06-10 11:55:27 -07:00
Arun S V
6a9fb9e77f
Update 03-linking-and-navigating.mdx (#51084)
Fixed a typo in 'Scrolling to an id' section.

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

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

-->
2023-06-10 11:53:42 -07:00
Michael Novotny
8366f1af31
docs: Clarify manual graceful shutdown in dev server (#51078)
Replaces #50481

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2023-06-10 07:24:25 -07:00
Michael Novotny
e797546ee3
Adds missing and in How to Use These Docs section (#51058)
Fixes #50227
2023-06-10 13:15:02 +00:00
Michael Novotny
83860091a6
Removes PORT from .env concatenation example (#51063)
This is to [avoid confusion](https://github.com/vercel/next.js/issues/32603#issuecomment-996751692) about being able to set Next.js's port via `.env`, which is currently not allowed.
2023-06-10 10:47:49 +00:00
Delba de Oliveira
ccc64d96b6
[Docs] Remove html <b> from summaries (#51008)
This PR removes manual HTML `<b>` tags in `<details><summary>...` titles. They are unnecessary because we add bold styling in CSS.

Also did a tiny fix to some other unnecessary inline HTML.
2023-06-09 22:12:58 +00:00
Michael Novotny
9fad474018
Adds the "why" for next/image optimization (#51066)
Give a touch more context as to why one would want to use image optimization.

Fixes #30220
2023-06-09 22:02:35 +00:00
Delba de Oliveira
9c44c1dca1
[Docs] Add section on how to preview docs changes on VSCode (#51019) 2023-06-09 15:16:19 +00:00
Delba de Oliveira
9800eaf467
[Docs] Clarify a few things about the instrumentation.ts file (#51034)
There was some confusion about where to place it.
2023-06-09 13:40:53 +00:00
Alain Kaiser
8370e52a32
Fix Typo in Metadata API Description (#51024)
### Fix Typo in Metadata API Description

#### Description:

This PR fixes a minor typo in the description of the Metadata API.

#### Changes:

- Fixed typo in the Metadata API description. 

**File:** `docs/02-app/01-building-your-application/05-optimizing/04-metadata.mdx`

**Old Sentence:**

> Next.js has a Metadata API that can used to define your application metadata (e.g. `meta` and `link` tags inside your HTML `head` element) for improved SEO and web shareability.

**New Sentence:**

> Next.js has a Metadata API that can be used to define your application metadata (e.g. `meta` and `link` tags inside your HTML `head` element) for improved SEO and web shareability.

This change helps improve the readability and understanding of the documentation for readers and users.

#### Checks:

- [x] Followed the Docs Contribution Guide
- [x] Linting passes (`pnpm build && pnpm lint`)
2023-06-09 12:20:41 +00:00
Kevin Ang
e5b88caed7
fix revalidateTag import (#51005)
This PR fixes the erroneous `revalidateTag` import on certain examples.
It was imported from `next/server`, but should be imported from
`next/cache` instead.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-06-09 09:23:58 +01:00
Taylor Bryant
8484a6b9c2
Fix typos in 01-contribution-guide.mdx (#51006)
This PR fixes some small typos in the Contribution Guide.
2023-06-09 08:16:12 +00:00
Tyler Lutz
aef03cf3a5
docs: update ESLint prompt output. (#50986)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-06-08 19:07:58 -07:00
PatrickCodes_
3817770bc0
docs: update Route Handlers to have JS/TS code snippet. (#51003)
Added a TS and JS switcher. Previously the code snippet did not have a
switcher. The file extension was .js when the code was TypeScript which
made it confusing to try to read.

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2023-06-08 19:06:08 -07:00
Michael Novotny
9c4b0ec9e9
Adds missing JavaScript codeblock in Opengraph Image API reference (#50996)
Also changes JavaScript examples to use `.jsx` extensions so IDEs better recognize the JSX allowed as the first argument to `ImageResponse`. 

Fixes #50141
2023-06-08 21:29:47 +00:00
didemkkaslan
f2cbfe3147
docs: Fix typo in colocation documentation. (#50975) 2023-06-08 12:16:48 -07:00
Tyler Lutz
3ccbe82280
Update create-next-app docs (#50981)
### What?

Update the create-next-app prompts and create-next-app --help
documentation
2023-06-08 12:16:05 -07:00
Ethan Mick
9a08206242
docs: Correct useFormStatus to be a client component (#50991)
### What?

The `useFormStatus` needs to be used in a client component. That
component should be used within a `form` for the `pending` property to
reflect the form status.

### Why?

The docs are currently not accurate.

### Notes

I could also update the name of the file to not be `form.js`, which
implies this is the entire form instead of just the submit button being
used as a component within the form.
2023-06-08 12:13:13 -07:00
Michael Novotny
61a553963d
Adds missing async to Opengraph Image code example. (#50990) 2023-06-08 12:08:04 -07:00
Jiwoo JEONG
b8e08abf9e
fix: add missed / at useSelectedLayoutSegment at App routing/Pages and Layout (#50956)
## Why?
- When i click `red box` in following image, page returns 404 page.
<img width="1728" alt="스크린샷 2023-06-08 오후 7 31 37" src="https://github.com/vercel/next.js/assets/63336958/903b11e3-17af-426e-8787-b6e033c14a24">

## How?
- I found that `/` is missed at `docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx`.
- So I added `/`.
2023-06-08 15:33:25 +00:00
Delba de Oliveira
f4f34e4226
[Next Docs] Migrate new docs from next-site to Next.js repo (#50701) 2023-06-08 12:03:14 +02:00
Delba de Oliveira
8c2e5bd072
Update codeowners to use Vercel Spaces (#50841)
Move as much of codeowners as possible to use Vercel Spaces. 

1. Makes `@timneutkens @ijjk @shuding @huozhi @feedthejim` global owners
2. Make the `@vercel/next-js` team _optional_ owners of **/docs**,
**/errors**, and **/contributing**, makes team owners of a few packages
as per old config.
3. Make `@vercel/devex` (docs and devrel) owners of **/docs**,
**/errors**, and **/contributing**
4. Make `@vercel/devrel` (devrel only) owners of **/examples**
5. Make `@vercel/web-tooling` owners of specific files and folders (as
per old config)

Leaves @styfle as owner of **image** files on the old config since this
pattern `/**/*image*/** ` can't be used with Vercel Spaces.

Note: We cannot add * or / at the end of files.
[Docs](https://spaces-docs.vercel.sh/docs/code-owners#:~:text=Code%20Owners%20files%20are%20meant%20to%20encourage%20distributed%20ownership%20definitions%20across%20a%20codebase.)
2023-06-08 12:02:18 +02:00
Javi Velasco
aa91de56ce
Remove static analysis of process.env (#50260)
Since there is no longer a limitation that requires us to static analyze
`process.env`, this PR removes it from the build process and updates the
corresponding documentation.
2023-05-24 08:19:02 -07:00
Anders Kjær Damgaard
428342dbdf
Add --use-yarn flag to create-next-app (#49407)
# Add `--use-yarn` flag to `create-next-app`

fixes #49405

- [x] Implement `--use-yarn` flag
- [x] Update docs
- [x] Add tests

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-10 14:51:12 +02:00
Gabriel Schneider
c9d87eec7c
Add note about custom distDir to standalone build docs (#48592)
### What?
Add a note that if a custom `distDir` has been set, the standalone build
can be found at the specified location and the static files folder has
to be copied to the custom location as well.

### Why?
This may be obvious, but such a note would've saved me some minutes, not
gonna lie.

### How?
\-

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-05-10 12:33:24 +02:00
Maia Teegarden
fdd6e979f4
Turbopack alpha -> beta (#49103)
Closes WEB-918
Closes WEB-913
2023-05-04 16:53:40 +02:00
Shu Ding
83b774eeb6
Fix standalone mode with appDir running in a single process (#49116)
Fixes #49055, fixes #48918. 

App dir will always require the server to run in the workers mode, so it
can keep a separate Node.js process for pages. This PR updates the
standalone server to initialize a "standalone server" (which works
similar to `start-server`), and changes the tracked files to include
Jest worker.
2023-05-04 05:55:05 +02:00
Tim Neutkens
3cb15a064b
Update create-next-app App Router question (#49111)
<!-- 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 or adding/fixing 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>
2023-05-02 17:28:31 -07:00
JJ Kasper
26f69d5ef3
Simplify CNA prompts a bit (#49063)
This updates the default CNA prompts a bit to be more straightforward.

x-ref: [slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1681919151818769)
x-ref: [slack thread](https://vercel.slack.com/archives/C04K237UHCP/p1682959312307409)
2023-05-02 17:01:36 +00:00
Alberto Vilches
2343610fdf
fix: wrong link in docs (#49001)
A link to a third-party package in the docs directs you to the wrong page.
2023-05-01 15:28:50 +00:00
Steven
e7c9d3c051
fix: bump minimum Node.js version to 16.8.0 (#48957)
We bumped `undici` fetch which has a minimum version of 16.8.0 so we need to make sure `next` and `create-next-app` also have the same minimum version.

Since 14.x reaches End-of-Life on [2023-04-30](https://github.com/nodejs/Release), we can drop support for 14 in the next release.

See also:

- Related to #48870
- Related #48941
2023-04-28 15:07:54 +00:00
Jan Kaifer
cc2bcece63
Start recommending gRPC with otel (#48915) 2023-04-28 11:43:28 +00:00
JTaylor0196
f7baa56792
update example Deploy button URLs (#48842)
### What?
Updates Deploy button URLs for all listed examples here:
https://github.com/vercel/next.js/tree/canary/examples

### Why?
The Deploy URLs are currently broken and result in a failed clone
attempt on Vercel.

### How?
The URLs have been changed from https://vercel.com/new/git/external?… to
-> https://vercel.com/new/clone?…
(Last updated
[here](8eaabe2fb0)
in 2021)
2023-04-26 13:31:44 -04:00
Martin Wahlberg
c390c1662b
Add missing word to getStaticProps documentation (#48854)
### What?
Added missing `that` to documentation for getStaticProps

### Why?
This change fixes grammar.

### How?
Updated the text.
2023-04-26 14:02:53 +00:00
Jan Kaifer
db764c35e6
Add support for async instrumentation register (#48575) 2023-04-24 11:43:50 +00:00
Chris
2679ab672d
Update naming for Next.js Analytics (#48618)
Updates the name of Next.js Analytics to Next.js Speed Insights

closes ALY-579

---------

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-04-24 12:14:45 +02:00
Afonso Jorge Ramos
2e99645b6c
docs: update Image props (#48726)
Hey! Hope this can help anyone dealing with this in the future.

I'm also using the `TinaMarkdown` provider to generate my MDX and one of the things that I've found helpful so that the image was better handled in the browser was to set position to `undefined`, as it was the only way to unset it from `absolute`, which was affecting the visual aspect of the page.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-04-23 20:28:03 +00:00
Jan Kaifer
82a01c11a7
Fix TYPO in otel docs (#48623)
<!-- 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 or adding/fixing 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 #

-->
2023-04-20 11:30:40 +00:00
Ryo
9c0a8ce730
Docs: Unify note formatting (#48417)
<!-- 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 or adding/fixing 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 #

-->

closes #48416 

### What?

Standardize the "Note" format in the Next.js documentation for improved
consistency and readability.

### Why?

There are currently four different variations of "Note" formatting in
the documentation.
Standardizing to a single format will improve the overall experience for
users.

### How?

Update all instances of "Note" in the documentation to follow the most
common format, `**Note**:` (used in 27 files).
This will involve updating the following variations:

- `Note` (12 files)
- `Note:` (20 files)
- `**Note:**` (21 files)

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-04-19 20:21:28 +00:00
Toru Kobayashi
7b6e336bc5
docs: fix minimum Node.js version to 14.18.0 (#48545)
fixes #42729

According to #42729, the minimum Node.js version of Next is `14.18.0`,
but some docs say `14.6.0`, and it's error-prone.
https://github.com/vercel/next.js/issues/42729#issuecomment-1309947579
pointed out it's a bug rather than wrong documentation.

But Node v14 is going to be EOF this month, so Next will update the
minimum version in the next major release.
https://github.com/nodejs/release#release-schedule

So I feel it's enough to only fix the documentation rather than fixing
the implementation to work with 14.6.0 as a temporary fix.


<!-- 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 or adding/fixing 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: Steven <steven@ceriously.com>
2023-04-19 15:16:37 +00:00
Chris McGrath
a9e4b795d7
typo (#48495)
<!-- 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 or adding/fixing 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 #

-->
2023-04-18 02:39:15 +00:00
Rodrigo Feijao
3aca97b410
Update instrumentation.md (#48394)
There is a typo on `export const` where it should be `export function`
2023-04-14 19:06:21 +02:00
Jan Kaifer
79f4e11034
Fix grammar and typos in OTEL docs (#48235)
I ran a grammar check on OTEL docs to get any remaining issues that
spell check didn't fix.

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-04-13 21:21:06 -07:00
Mohit Yadav
c1991c6bae
docs: fix grammar for dynamic routes catch-all explanation and give better examples (#48181)
### Why?

Making the explanation more obvious because it took quite a while for me
to figure out the difference between catch-all and optional catch-all,
and I think others may feel the same way too.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-13 21:12:46 -07:00
Jan Kaifer
89366ff44c
Add information about deploy to open telemetry docs (#48241)
Added information on how to deploy with OTEL.

- mentioned that `@vercel/otel` works on Vercel and when self-hosted
- added links to Vercel docs
- added links into OTEL docs for self-hosted
- Added information about custom exporter

Questions:

- should we mention Datadog, NewRelic and others as an examples of
custom exporters?
  - https://docs.datadoghq.com/opentelemetry/
-
https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/opentelemetry-legacy-new-relic-exporters/
2023-04-12 14:45:46 +00:00
apeltop
8bacad921b
Fix typo in script.md (#48225)
occuring -> occurring

I hope it helps.

<!-- 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 or adding/fixing 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 #

-->
2023-04-11 13:26:23 +00:00
Jan Kaifer
af12a94a28
Docs: Describe how to manually configure open telemetry (#48071)
It's currently not clear that `@vercel/otel` is just a simple wrapper
when you are trying things out. So I added an excellent example of how
to instrument create an OpenTelemetry setup.

The only FUD I have here is that people won't skip that `Manual
OpenTelemetry setup` and try to understand it. But I try to describe
this at the beginning of that section.

I'll also try to update `@vercel/otel` readme to be more transparent on
what it does.
2023-04-11 10:59:00 +00:00
Chandrajeet Maurya
536b4dca8c
Update deployment.md (#48062)
Since the code above is referring to `package.json` it should be `npm
run build` and `npm run start` instead of running `next build` and `next
start` directly

<!-- 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 or adding/fixing 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>
2023-04-07 08:38:59 -07:00
Steven
690208b11f
fix: show error when "next start" is used with "output" config (#47989)
fix #47334
fix NEXT-861
2023-04-06 17:28:27 -07:00
Jan Kaifer
e35710f71f
Recommend @opentelemetry/api instead of @vercel/otel reexport (#48013)
- remove vscode folder from example
- recommend `@poentelemetry/api` over `@vercel/otel`

<!-- 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 or adding/fixing 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 #

-->

fix NEXT-959
2023-04-06 14:17:47 +02:00
Jan Kaifer
dd959251e6
Docs: Improve Open Telemetry documentation (#47955)
- Removed duplicate information
- Add links into official docs to explain `http.*` attributes
- Properly explain what `next.page` means.
fix NEXT-945

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2023-04-06 11:41:19 +00:00
Gustavo Steinmetz
9df4e0614e
Update Local Images Example to Use Assets Folder (#47878)
This pull request updates the Local Images example in the Next.js
documentation to use an ``assets`` folder inside the ``src`` directory
instead of the ``public`` folder. The changes are made to emphasize the
recommended practice of organizing and importing static assets when
using the Next.js ``Image`` component.

The previous example could cause confusion as it suggested importing
images from the ``public`` folder, which is generally used for static
files that can be accessed directly via a URL. However, when using the
Next.js ``Image`` component, it is recommended to import images as
modules and store them in a folder like ``assets`` inside the ``src``
directory. This approach allows the Image component to optimize images
and prevent Cumulative Layout Shift while loading.

This PR changes the image import statements as the example below:

```jsx
import profilePic from '@/assets/me.png';
```

These changes aim to provide clearer guidance on how to handle local
images. To avoid misunderstandings while the developer follows the
documentation.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-05 04:10:31 +00:00
Swarnava Sengupta
a79d1efdd0
[Docs] Update react docs link (#47891)
- This PR fixed the  Documentation link of new react.dev website.
2023-04-04 11:56:03 -07:00
Jan Kaifer
a3acbf4f55
Add documentation on OTEL support (#47194)
Added docs that mention:
- important code-snippets from example
- links to official OTEL docs
- document NEXT_VERBOSE_OTEL
- explain what we provide out of the box
- what we don’t
- explain how you can add tracing yourself
- explain how instrumentation.js works
- it can be used for different types of instrumentation that don't use
OTEL. It's just a hook called when starting up a new node environment.

- list of all spans we instrument by default
 
fix NEXT-799 ([link](https://linear.app/vercel/issue/NEXT-799))

---------

Co-authored-by: S3Prototype <liuqahs15@gmail.com>
2023-04-04 14:24:46 +00:00
HarshaVardhanReddyDuvvuru
217fbbfd39
[docs] Update getting-started.md with New react docs link (#47841)
Replaced the old React Docs Link with new one




Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-04-03 07:43:34 +00:00