Skip to content

Commit fa1370f

Browse files
leerobstyflesokraijjk
authored
Update links from beta to stable docs. (#49349)
Now that the beta docs have been merged into stable with the release of 13.4, this updates all links as some paths have changed due to redirects. --------- Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com> Co-authored-by: JJ Kasper <jj@jjsweb.site>
1 parent 0f33205 commit fa1370f

File tree

25 files changed

+41
-43
lines changed

25 files changed

+41
-43
lines changed

examples/app-dir-mdx/app/layout.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ export default function RootLayout({
77
}) {
88
return (
99
<html lang="en">
10-
{/*
11-
<head /> will contain the components returned by the nearest parent
12-
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
13-
*/}
14-
<head />
1510
<body>{children}</body>
1611
</html>
1712
)

examples/app-dir-mdx/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function Home() {
4040

4141
<div className={styles.grid}>
4242
<a
43-
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
43+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
4444
className={styles.card}
4545
target="_blank"
4646
rel="noopener noreferrer"

examples/with-static-export/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Next.js enables starting as a static site or Single-Page Application (SPA), then
44

55
When running `next build`, Next.js generates an HTML file per route. By breaking a strict SPA into individual HTML files, Next.js can avoid loading unnecessary JavaScript code on the client-side, reducing the bundle size and enabling faster page loads.
66

7-
Learn more: https://beta.nextjs.org/docs/configuring/static-export
7+
Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports
88

99
## Deploy your own
1010

examples/with-turbopack/app/context/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function Page() {
2020
<div>
2121
<a
2222
className="font-medium text-zinc-300 hover:text-white"
23-
href="https://beta.nextjs.org/docs/rendering/server-and-client-components#using-context"
23+
href="https://nextjs.org/docs/rendering/server-and-client-components#using-context"
2424
>
2525
Learn more
2626
</a>

examples/with-turbopack/app/styling/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Page() {
1010
<div>
1111
<a
1212
className="font-medium text-zinc-300 hover:text-white"
13-
href="https://beta.nextjs.org/docs/styling/css-modules"
13+
href="https://nextjs.org/docs/app/building-your-application/styling/css-modules"
1414
>
1515
Learn more
1616
</a>

packages/create-next-app/templates/app-tw/js/app/page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function Home() {
4141

4242
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
4343
<a
44-
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
44+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
4545
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
4646
target="_blank"
4747
rel="noopener noreferrer"

packages/create-next-app/templates/app-tw/ts/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function Home() {
4141

4242
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
4343
<a
44-
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
44+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
4545
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
4646
target="_blank"
4747
rel="noopener noreferrer"

packages/create-next-app/templates/app/js/app/page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function Home() {
4141

4242
<div className={styles.grid}>
4343
<a
44-
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
44+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
4545
className={styles.card}
4646
target="_blank"
4747
rel="noopener noreferrer"

packages/create-next-app/templates/app/ts/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function Home() {
4141

4242
<div className={styles.grid}>
4343
<a
44-
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
44+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
4545
className={styles.card}
4646
target="_blank"
4747
rel="noopener noreferrer"

packages/font/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
This new font system also allows you to conveniently use all Google Fonts with performance and privacy in mind. CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. No requests are sent to Google by the browser.
66

7-
[Read more](https://beta.nextjs.org/docs/optimizing/fonts)
7+
[Read more](https://nextjs.org/docs/app/building-your-application/optimizing/fonts)

packages/next-swc/crates/next-core/src/app_segment_config.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ impl Issue for NextSegmentConfigParsingIssue {
128128

129129
#[turbo_tasks::function]
130130
fn documentation_link(&self) -> StringVc {
131-
StringVc::cell("https://beta.nextjs.org/docs/api-reference/segment-config".to_string())
131+
StringVc::cell(
132+
"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"
133+
.to_string(),
134+
)
132135
}
133136

134137
#[turbo_tasks::function]

packages/next/src/build/analysis/get-page-static-info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export async function getPageStaticInfo(params: {
412412
}
413413
if (pageType === 'app') {
414414
if (config) {
415-
const message = `\`export const config\` in ${pageFilePath} is deprecated. Please change \`runtime\` property to segment export config. See https://beta.nextjs.org/docs/api-reference/segment-config`
415+
const message = `\`export const config\` in ${pageFilePath} is deprecated. Please change \`runtime\` property to segment export config. See https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config`
416416
if (isDev) {
417417
Log.warnOnce(message)
418418
} else {

packages/next/src/build/webpack/loaders/next-flight-loader/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export { e${cnt++} as ${ref} };`
9191
if (buildInfo.rsc?.type !== RSC_MODULE_TYPES.client) {
9292
if (noopHeadPath === this.resourcePath) {
9393
warnOnce(
94-
`Warning: You're using \`next/head\` inside the \`app\` directory, please migrate to the Metadata API. See https://beta.nextjs.org/docs/api-reference/metadata for more details.`
94+
`Warning: You're using \`next/head\` inside the \`app\` directory, please migrate to the Metadata API. See https://nextjs.org/docs/app/api-reference/file-conventions/metadata for more details.`
9595
)
9696
}
9797
}

packages/next/src/build/webpack/plugins/wellknown-errors-plugin/parseRSC.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function formatRSCErrorMessage(
6565
if (isPagesDir) {
6666
formattedMessage = message.replace(
6767
NEXT_RSC_ERR_CLIENT_IMPORT,
68-
`\n\nYou're importing a component that needs $1. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components\n\n`
68+
`\n\nYou're importing a component that needs $1. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components\n\n`
6969
)
7070
formattedVerboseMessage = '\n\nImport trace for requested module:\n'
7171
} else {
@@ -91,7 +91,7 @@ function formatRSCErrorMessage(
9191
} else if (NEXT_RSC_ERR_INVALID_API.test(message)) {
9292
formattedMessage = message.replace(
9393
NEXT_RSC_ERR_INVALID_API,
94-
`\n\n"$1" is not supported in app/. Read more: https://beta.nextjs.org/docs/data-fetching/fundamentals\n\n`
94+
`\n\n"$1" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching\n\n`
9595
)
9696
formattedVerboseMessage = '\n\nFile path:\n'
9797
} else if (NEXT_RSC_ERR_ERROR_FILE_SERVER_COMPONENT.test(message)) {
@@ -103,14 +103,14 @@ function formatRSCErrorMessage(
103103
} else if (NEXT_RSC_ERR_CLIENT_METADATA_EXPORT.test(message)) {
104104
formattedMessage = message.replace(
105105
NEXT_RSC_ERR_CLIENT_METADATA_EXPORT,
106-
`\n\nYou are attempting to export "$1" from a component marked with "use client", which is disallowed. Either remove the export, or the "use client" directive. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n`
106+
`\n\nYou are attempting to export "$1" from a component marked with "use client", which is disallowed. Either remove the export, or the "use client" directive. Read more: https://nextjs.org/docs/getting-started/react-essentials#the-use-client-directive\n\n`
107107
)
108108

109109
formattedVerboseMessage = '\n\nFile path:\n'
110110
} else if (NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT.test(message)) {
111111
formattedMessage = message.replace(
112112
NEXT_RSC_ERR_CONFLICT_METADATA_EXPORT,
113-
`\n\n"metadata" and "generateMetadata" cannot be exported at the same time, please keep one of them. Read more: https://beta.nextjs.org/docs/api-reference/metadata\n\n`
113+
`\n\n"metadata" and "generateMetadata" cannot be exported at the same time, please keep one of them. Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata\n\n`
114114
)
115115

116116
formattedVerboseMessage = '\n\nFile path:\n'

packages/next/src/lib/metadata/resolvers/resolve-url.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function getSocialImageFallbackMetadataBase(
3535
// Add new line to warning for worker output
3636
console.log()
3737
Log.warnOnce(
38-
`metadata.metadataBase is not set for resolving social open graph or twitter images, fallbacks to "${fallbackMetadata.origin}". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase`
38+
`metadata.metadataBase is not set for resolving social open graph or twitter images, fallbacks to "${fallbackMetadata.origin}". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase`
3939
)
4040
}
4141

packages/next/src/lib/typescript/writeConfigurationDefaults.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export async function writeConfigurationDefaults(
222222
'tsconfig.json'
223223
)} extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experience, we recommend adding the Next.js plugin (\`${chalk.cyan(
224224
'"plugins": [{ "name": "next" }]'
225-
)}\`) manually to your TypeScript configuration. Learn more: https://beta.nextjs.org/docs/configuring/typescript#using-the-typescript-plugin\n`
225+
)}\`) manually to your TypeScript configuration. Learn more: https://nextjs.org/docs/app/building-your-application/configuring/typescript#the-typescript-plugin\n`
226226
)
227227
} else if (!hasNextPlugin) {
228228
if (!('plugins' in userTsConfig.compilerOptions)) {

packages/next/src/server/config-shared.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export interface ExperimentalConfig {
182182
externalDir?: boolean
183183
/**
184184
* The App Router (app directory) enables support for layouts, Server Components, streaming, and colocated data fetching.
185-
* @see https://beta.nextjs.org/docs/api-reference/next-config#appdir
185+
* @see https://nextjs.org/docs/app/api-reference/next-config-js/appDir
186186
*/
187187
appDir?: boolean
188188
amp?: {
@@ -224,7 +224,7 @@ export interface ExperimentalConfig {
224224

225225
/**
226226
* A list of packages that should be treated as external in the RSC server build.
227-
* @see https://beta.nextjs.org/docs/api-reference/next-config#servercomponentsexternalpackages
227+
* @see https://nextjs.org/docs/app/api-reference/next-config-js/serverComponentsExternalPackages
228228
*/
229229
serverComponentsExternalPackages?: string[]
230230

@@ -251,14 +251,14 @@ export interface ExperimentalConfig {
251251

252252
/**
253253
* For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
254-
* @see https://beta.nextjs.org/docs/api-reference/next-config#mdxrs
254+
* @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs
255255
*/
256256
mdxRs?: boolean
257257

258258
/**
259259
* Generate Route types and enable type checking for Link and Router.push, etc.
260260
* This option requires `appDir` to be enabled first.
261-
* @see https://beta.nextjs.org/docs/api-reference/next-config#typedroutes
261+
* @see https://nextjs.org/docs/app/api-reference/next-config-js/typedRoutes
262262
*/
263263
typedRoutes?: boolean
264264

packages/next/src/server/typescript/rules/config.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const API_DOCS: Record<
3636
'"force-static"':
3737
'This forces caching of all fetches and returns empty values from `cookies`, `headers` and `useSearchParams`.',
3838
},
39-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#dynamic',
39+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',
4040
},
4141
fetchCache: {
4242
description:
@@ -57,7 +57,7 @@ const API_DOCS: Record<
5757
'"force-cache"':
5858
"This lets you intentionally opt-in to all caching of data. This option forces all fetches to be cache even if the `cache: 'no-store'` option is passed to `fetch()`.",
5959
},
60-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#fetchcache',
60+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#fetchcache',
6161
},
6262
preferredRegion: {
6363
description:
@@ -68,7 +68,7 @@ const API_DOCS: Record<
6868
'"global"': 'Prefer deploying globally.',
6969
'"home"': 'Prefer deploying to the Home region.',
7070
},
71-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#preferredregion',
71+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#preferredregion',
7272
isValid: (value: string) => {
7373
try {
7474
const parsed = JSON.parse(value)
@@ -98,7 +98,7 @@ const API_DOCS: Record<
9898
0: 'Specifying `0` implies that this layout or page should never be static.',
9999
30: 'Set the revalidation time to `30` seconds. The value can be `0` or any positive number.',
100100
},
101-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#revalidate',
101+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate',
102102
isValid: (value: string) => {
103103
return value === 'false' || Number(value) >= 0
104104
},
@@ -114,7 +114,7 @@ const API_DOCS: Record<
114114
false:
115115
'Disallow rendering dynamic params that are not generated by `generateStaticParams`.',
116116
},
117-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#dynamicparams',
117+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams',
118118
},
119119
runtime: {
120120
description:
@@ -124,11 +124,11 @@ const API_DOCS: Record<
124124
'"edge"': 'Prefer the Edge runtime.',
125125
'"experimental-edge"': 'Prefer the experimental Edge runtime.',
126126
},
127-
link: 'https://beta.nextjs.org/docs/api-reference/segment-config#runtime',
127+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime',
128128
},
129129
metadata: {
130130
description: 'Next.js Metadata configurations',
131-
link: 'https://beta.nextjs.org/docs/api-reference/metadata',
131+
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/metadata',
132132
},
133133
}
134134

packages/next/src/server/typescript/rules/error.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const errorEntry = {
2222
file: source,
2323
category: ts.DiagnosticCategory.Error,
2424
code: NEXT_TS_ERRORS.INVALID_ERROR_COMPONENT,
25-
messageText: `Error Components must be Client Components, please add the "use client" directive: https://beta.nextjs.org/docs/api-reference/file-conventions/error`,
25+
messageText: `Error Components must be Client Components, please add the "use client" directive: https://nextjs.org/docs/app/api-reference/file-conventions/error`,
2626
start: 0,
2727
length: source.text.length,
2828
},

packages/next/src/server/typescript/rules/metadata.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ const metadata = {
425425
file: getSource(fileName),
426426
category: ts.DiagnosticCategory.Error,
427427
code: NEXT_TS_ERRORS.INVALID_METADATA_EXPORT,
428-
messageText: `The 'metadata' export value is not typed correctly, please make sure it is typed as 'Metadata':\nhttps://beta.nextjs.org/docs/guides/seo#static-metadata`,
428+
messageText: `The 'metadata' export value is not typed correctly, please make sure it is typed as 'Metadata':\nhttps://nextjs.org/docs/app/building-your-application/optimizing/metadata#static-metadata`,
429429
start: e.name.getStart(),
430430
length: e.name.getWidth(),
431431
},

test/development/acceptance-app/error-message-url.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ createNextDescribe(
2929
const text = await link.text()
3030
const href = await link.getAttribute('href')
3131
expect(text).toEqual(
32-
'https://beta.nextjs.org/docs/data-fetching/fundamentals'
32+
'https://nextjs.org/docs/app/building-your-application/data-fetching'
3333
)
3434
expect(href).toEqual(
35-
'https://beta.nextjs.org/docs/data-fetching/fundamentals'
35+
'https://nextjs.org/docs/app/building-your-application/data-fetching'
3636
)
3737

3838
await cleanup()

test/development/acceptance/server-component-compiler-errors-in-pages.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ createNextDescribe(
5252
"./components/Comp.js
5353
ReactServerComponentsError:
5454
55-
You're importing a component that needs next/headers. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components
55+
You're importing a component that needs next/headers. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components
5656
5757
,-[1:1]
5858
1 |
@@ -94,7 +94,7 @@ createNextDescribe(
9494
"./components/Comp.js
9595
ReactServerComponentsError:
9696
97-
You're importing a component that needs server-only. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://beta.nextjs.org/docs/rendering/server-and-client-components
97+
You're importing a component that needs server-only. That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components
9898
9999
,-[1:1]
100100
1 |

test/e2e/app-dir-legacy-edge-runtime-config/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ createNextDescribe(
2121
}
2222
expect(next.cliOutput).toContain('`export const config`')
2323
expect(next.cliOutput).toContain(
24-
'app/legacy-runtime-config/page.js is deprecated. Please change `runtime` property to segment export config. See https://beta.nextjs.org/docs/api-reference/segment-config'
24+
'app/legacy-runtime-config/page.js is deprecated. Please change `runtime` property to segment export config. See https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config'
2525
)
2626
})
2727
}

test/e2e/app-dir/create-next-app-template/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Home() {
1515
</p>
1616

1717
<div className={styles.grid}>
18-
<a href="https://beta.nextjs.org/docs" className={styles.card}>
18+
<a href="https://nextjs.org/docs" className={styles.card}>
1919
<h2>Documentation &rarr;</h2>
2020
<p>Find in-depth information about Next.js 13</p>
2121
</a>

test/e2e/app-dir/metadata-missing-metadata-base/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('app dir - metadata missing metadataBase', () => {
2525
)
2626
expect(next.cliOutput).toInclude('"http://localhost:')
2727
expect(next.cliOutput).toInclude(
28-
'. See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase'
28+
'. See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase'
2929
)
3030
})
3131
})

0 commit comments

Comments
 (0)