Commit graph

1970 commits

Author SHA1 Message Date
David Thorand
977df12917
Fix bundle analyzer NPM package name in documentation (#60339)
This fixes a typo in the Next.js documentation.
2024-01-06 22:10:56 +00:00
Tobias
a95a7d684f
docs: Document error cases with head/body-tags (#56412)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-06 11:16:21 -06:00
Lee Robinson
779a373460
docs: address a few open issues (#60329)
Closes https://github.com/vercel/next.js/issues/42095.
Closes https://github.com/vercel/next.js/issues/59215.
2024-01-06 11:04:17 -06:00
Dongho Kim
0191ef85e1
docs: update TS example for useSearchParams (#55357) 2024-01-06 10:08:26 -06:00
Sjoerd van Bommel
9817442e22
docs: add optional catch-all segments typescript example (#60237)
Closes https://github.com/vercel/next.js/issues/60235
2024-01-06 10:04:43 -06:00
Lee Robinson
e566f3297f
docs: add example of webhooks with App Router (#60276)
Full example of one with GitHub:
https://raw.githubusercontent.com/leerob/on-demand-isr/main/app/api/webhook/route.ts
2024-01-06 10:02:56 -06:00
Jyan
caf282ba8a
docs: typo fix in compression page (#60318) 2024-01-06 10:02:05 -06:00
Ahmed Abdelbaset
b9cd76eda2
docs: small corrections to bundle analyzer docs (#60285)
Some corrections to #59304
2024-01-05 16:14:26 -05:00
Steven
d946c669d5
chore(docs): add section for Custom Type Declarations (#60282)
We used to have docs but it was lost in the rewrite (as seen in this
comment
https://github.com/vercel/next.js/pull/30060#discussion_r732243330)

This PR adds back the documentation for Custom Type Declarations.

Closes NEXT-1999
2024-01-05 14:55:36 -05:00
Jordan Newland
f76ed005f0
docs(testing): add bun command to running your tests section (#60281)
Add missing bun command from Vitest page.

Co-authored-by: Steven <steven@ceriously.com>
2024-01-05 14:27:38 -05:00
Gaspar Garcia Jr
b110b13169
Clarify searchParams is not passed to Layouts (#60277)
Clarify searchParams is not passed to Layouts

Followup to
https://github.com/vercel/next.js/pull/60257/files#r1443175387

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

-->
2024-01-05 11:04:34 -08:00
Delba de Oliveira
ff058d64a5
Docs: Add more clarification about compress (#60268)
- Add note on how to disable Next.js compression, to use a different
algorithm.

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-05 14:54:02 +00:00
Delba de Oliveira
052006b4d7
docs: Clarify useSearchParams behavior (#60257)
- `useSearchParams` opts the client component subtree out of static
rendering (pre-rendering), not dynamic rendering. We recommend wrapping
the component that uses `useSearchParams` in a Suspense boundary to
allow client components above it to be statically rendered (part of the
initial HTML).

Closes: https://vercel.slack.com/archives/C03S9JCH2Q5/p1704398859737719
2024-01-05 07:58:55 -06:00
Delba de Oliveira
7faf4bd56e
docs: Update compression docs (#60264) 2024-01-05 07:47:30 -06:00
Stephanie Dietz
694bd3e21d
docs: Add "Going to production" page for App Router (#59304)
- Add **Going to Prod** docs for `app`
- Add bundle-analyzer page
- Merge `app` and `pages` docs

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Michael Novotny <manovotny@gmail.com>
Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-05 07:46:00 -06:00
Steven
fbd5e9184e
fix(docs): add missing docs on external packages (#60244)
In the future, we should make this automatically fetch the json
2024-01-04 14:45:04 -08:00
Shumak Manohar
b09cda608c
docs: better TS friendly example for useFormState (#60222) 2024-01-04 14:25:03 -06:00
Aleksandr Kondrashov
6456eb9b6a
Docs: Fix revalidate type annotation (#60230)
<!-- 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 #

-->
Fixes #60224

This fix addresses the linked issue by removing mentions of incompatible
values for the `revalidate` option from the documentation.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-04 19:29:19 +00:00
Hugh Do
51d6c64c39
docs: fix typos and broken links in the image.mdx (#60221)
### Overview

- Fixed some typos and broken MDN links
- Executed `pnpm prettier-fix`

---------

Co-authored-by: Steven <steven@ceriously.com>
2024-01-04 17:33:58 +00:00
Seth Bertalotto
b03381c432
docs(trailingSlashes): add note for SSG generation (#57628)
When trying to generate my SSG docs site I couldn't figure out why the
navigation links (`href="/about`) were not mapping to the generated
files (e.g. `/out/about.html)`.

`trailingSlash` was key to converting the files to
`/out/about/index.html` to make the SSG links work properly.

I've updated the trailingSlash docs to be clear how they affect SSG
mode.

It might also make sense to add this to the SSG guide as well.

Co-authored-by: Steven <steven@ceriously.com>
2024-01-04 15:01:55 +00:00
Aditya K
28fdc367b1
[Docs] small correction in 11-middleware.mdx (#60189)
<!-- 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?
A tiny correction could be made in an example in the Middleware usage
example.

### Why?
N/A

### How?
1. Verified that the actual cookie returned in the response headers
matches this.
2. Fixed the example
3. Ran `pnpm prettier-fix`

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-03 23:43:55 +00:00
Caleb Barnes
4865acc257
docs: Fix typo on generate-sitemaps.mdx (#60188)
### Improving Documentation
Fix typo for the function `generateSitemaps`. 

It had incorrect casing: `generateSiteMaps` in the docs page.
2024-01-03 22:30:41 +00:00
Alexander Fradiani
6d0eef601f
Update route-segment-config.mdx (#60179)
Fixing copy in the description of the route segment config

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-03 21:34:42 +00:00
Houssein Djirdeh
0f8b079a82
[Docs] Adds a section to Optimizing: Third Party Libraries on tracking pageviews for Google Analytics (#60176)
Adds a small section to the `Optimizing: Third Party Libraries`
documentation page on tracking client-side pageviews for Google
Analytics

---------

Co-authored-by: Steven <steven@ceriously.com>
2024-01-03 13:37:50 -05:00
siddtheone
930f82028d
Updating example with required content type in header (#59990)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

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

### Adding or Updating Examples

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

### Fixing a bug

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

### Adding a feature

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


## For Maintainers

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

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-03 09:20:55 -08:00
Alex Olshansky
7bb7f53514
Fix config code in the CSS-in-JS chapter (#60164)
Just a minor typo in the example config.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-03 09:10:59 -08:00
Lee Robinson
e9fb28c6fd
docs: improve grammar (#60149) 2024-01-02 18:40:33 -06:00
akfm
5b65491dde
Docs: If revalidatePath's path has dynamic segment path, type must be page. (#59149)
fix: #59148

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

## For Contributors

### Improving Documentation

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

### Adding or Updating Examples

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

### Fixing a bug

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

### Adding a feature

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


## For Maintainers

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

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-02 16:30:28 -08:00
Nick Molchanov
09bde5a053
docs: small wording fix for 03-linking-and-navigating.mdx (#60089)
Probably there could be a better wording, but the current one looks
somewhat confusing.

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-02 16:18:59 -08:00
Jordane Quincy
76fa80000a
Update 03-css-in-js.mdx : fix typo (#60114)
Fix a small typo of a missing space

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-02 15:04:47 -05:00
Houssein Djirdeh
0df6fc90e8
[Docs] Clarify measurement ID in Optimizing: Third Party Libraries (#60136)
Minor changes to `Optimizing: Third Party Libraries` doc page to clarify
which type of ID for Google Analytics (and GTM)
2024-01-02 14:46:10 -05:00
Lee Robinson
ab7142a68b
docs: ⌘+Enter for forms (#60090) 2024-01-01 20:32:26 -06:00
Lee Robinson
8e3e4adfb9
docs: update maxDuration info (#60086) 2024-01-01 14:21:57 -06:00
Lee Robinson
5071fcad81
docs: clarify generateStaticParams and dynamicParams (#60083) 2024-01-01 13:00:06 -06:00
ArianHamdi
a5d87eb30a
docs: fix version history order in sitemap.mdx (#60054)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-01 12:35:16 -06:00
Lee Robinson
80f4a979d1
docs: update install count (#60072) 2023-12-31 17:18:45 -06:00
Lee Robinson
64e905132a
docs: Add section for CSP without nonces (#60067) 2023-12-31 09:28:19 -06:00
justin hook
ff45e1fc90
docs: 'userScalable' field in 'viewport' (#60033)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-31 09:28:03 -06:00
Lee Robinson
fa32e32df4
docs: clarify using redirect with client components (#60056)
Based on feedback from https://github.com/vercel/next.js/issues/54676.
2023-12-30 21:18:10 -06:00
Lee Robinson
df14fdfa25
docs: fix typo for useFormState (#60010) 2023-12-28 18:22:11 -06:00
Lee Robinson
548a07ff6b
docs: opengraph / twitter image needs absolute URL (#59985) 2023-12-27 22:48:56 -06:00
Lee Robinson
9e37c327a4
docs: small changes to linking docs (#59982) 2023-12-27 22:48:21 -06:00
Shreyans Jain
5f2d7b691f
docs: add note that contentlayer is unmaintained (#59927)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 11:09:38 -06:00
Jordy van den Aardweg
f8ba588ce4
docs: Update Middleware docs on ignoring prefetches (#56799)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 11:02:01 -06:00
Shahriar
332bf6d4f8
docs: remove incorrect async components in parallel routes docs (#59966)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 10:45:14 -06:00
Manu
02d390740b
docs: fix link to formEntries (#59935) 2023-12-27 10:42:17 -06:00
ash2048
6a23987282
docs: Fix typo in generate-sitemaps.mdx docs (#59964) 2023-12-27 10:40:51 -06:00
Michael H
eebad9c939
docs: Add media example for icon metadata (#56141)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-25 09:19:33 -06:00
Jiachi Liu
365a0492d0
docs: fix prettier lint (#59918)
x-ref:
https://github.com/vercel/next.js/actions/runs/7315608759/job/19929482613

Closes NEXT-1928
2023-12-24 22:06:28 +01:00
Igor Varyvoda
d4b7c86ecf
docs: add Sirv loader for next/image (#57102)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-24 10:03:50 -06:00