提交 7fc850e2 编写于 作者: L Luis Alvarez D 提交者: Tim Neutkens

[docs] Added related links to next.config.js (#10174)

* Added related links

* Added missing dots
上级 a21a8fcc
...@@ -48,7 +48,7 @@ For more information on what to do next, we recommend the following sections: ...@@ -48,7 +48,7 @@ For more information on what to do next, we recommend the following sections:
<div class="card"> <div class="card">
<a href="/docs/advanced-features/automatic-static-optimization.md"> <a href="/docs/advanced-features/automatic-static-optimization.md">
<b>Automatic Static Optimization:</b> <b>Automatic Static Optimization:</b>
<small>Learn more about how Next.js automatically optimizes your pages.</small> <small>Next.js automatically optimizes your app to be static HTML whenever possible. Learn how it works here.</small>
</a> </a>
</div> </div>
......
...@@ -27,3 +27,19 @@ module.exports = { ...@@ -27,3 +27,19 @@ module.exports = {
target: 'serverless', target: 'serverless',
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/deployment.md">
<b>Deployment:</b>
<small>Compile and deploy your Next.js app to production.</small>
</a>
</div>
...@@ -18,3 +18,19 @@ module.exports = { ...@@ -18,3 +18,19 @@ module.exports = {
``` ```
Next.js will automatically use your prefix in the scripts it loads, but this has no effect whatsoever on the [public](/docs/basic-features/static-file-serving.md) folder; if you want to serve those assets over a CDN, you'll have to introduce the prefix yourself. One way of introducing a prefix that works inside your components and varies by environment is documented [in this example](https://github.com/zeit/next.js/tree/canary/examples/with-universal-configuration-build-time). Next.js will automatically use your prefix in the scripts it loads, but this has no effect whatsoever on the [public](/docs/basic-features/static-file-serving.md) folder; if you want to serve those assets over a CDN, you'll have to introduce the prefix yourself. One way of introducing a prefix that works inside your components and varies by environment is documented [in this example](https://github.com/zeit/next.js/tree/canary/examples/with-universal-configuration-build-time).
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/basic-features/static-file-serving.md">
<b>Static File Serving:</b>
<small>Serve static files, like images, in the public directory.</small>
</a>
</div>
...@@ -13,3 +13,12 @@ module.exports = { ...@@ -13,3 +13,12 @@ module.exports = {
compress: false, compress: false,
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -18,3 +18,12 @@ module.exports = { ...@@ -18,3 +18,12 @@ module.exports = {
}, },
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -16,3 +16,12 @@ module.exports = { ...@@ -16,3 +16,12 @@ module.exports = {
}, },
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -13,3 +13,12 @@ module.exports = { ...@@ -13,3 +13,12 @@ module.exports = {
pageExtensions: ['mdx', 'jsx', 'js', 'ts', 'tsx'], pageExtensions: ['mdx', 'jsx', 'js', 'ts', 'tsx'],
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -65,3 +65,12 @@ module.exports = { ...@@ -65,3 +65,12 @@ module.exports = {
}, },
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -13,3 +13,12 @@ module.exports = { ...@@ -13,3 +13,12 @@ module.exports = {
generateEtags: false, generateEtags: false,
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -11,3 +11,12 @@ module.exports = { ...@@ -11,3 +11,12 @@ module.exports = {
poweredByHeader: false, poweredByHeader: false,
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -45,3 +45,12 @@ Will end up being: ...@@ -45,3 +45,12 @@ Will end up being:
```jsx ```jsx
return <h1>The value of customKey is: {'my-value'}</h1> return <h1>The value of customKey is: {'my-value'}</h1>
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -66,3 +66,19 @@ module.exports = { ...@@ -66,3 +66,19 @@ module.exports = {
exportTrailingSlash: true, exportTrailingSlash: true,
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/advanced-features/static-html-export.md">
<b>Static HTML Export:</b>
<small>Export your Next.js app to static HTML.</small>
</a>
</div>
...@@ -40,3 +40,19 @@ module.exports = { ...@@ -40,3 +40,19 @@ module.exports = {
}, },
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/basic-features/typescript.md">
<b>TypeScript:</b>
<small>Get started with TypeScript in Next.js.</small>
</a>
</div>
...@@ -52,3 +52,19 @@ function MyImage() { ...@@ -52,3 +52,19 @@ function MyImage() {
export default MyImage export default MyImage
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/api-reference/next.config.js/environment-variables.md">
<b>Environment Variables:</b>
<small>Access environment variables in your Next.js application at build time.</small>
</a>
</div>
...@@ -17,3 +17,12 @@ module.exports = { ...@@ -17,3 +17,12 @@ module.exports = {
Now if you run `next build` Next.js will use `build` instead of the default `.next` folder. Now if you run `next build` Next.js will use `build` instead of the default `.next` folder.
> `distDir` **should not** leave your project directory. For example, `../build` is an **invalid** directory. > `distDir` **should not** leave your project directory. For example, `../build` is an **invalid** directory.
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
...@@ -17,3 +17,19 @@ module.exports = { ...@@ -17,3 +17,19 @@ module.exports = {
}, },
} }
``` ```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/advanced-features/automatic-static-optimization.md">
<b>Automatic Static Optimization:</b>
<small>Next.js automatically optimizes your app to be static HTML whenever possible. Learn how it works here.</small>
</a>
</div>
...@@ -71,6 +71,6 @@ For more information on what to do next, we recommend the following sections: ...@@ -71,6 +71,6 @@ For more information on what to do next, we recommend the following sections:
<div class="card"> <div class="card">
<a href="/docs/basic-features/typescript.md#api-routes"> <a href="/docs/basic-features/typescript.md#api-routes">
<b>TypeScript:</b> <b>TypeScript:</b>
<small>Add TypeScript to your API Routes</small> <small>Add TypeScript to your API Routes.</small>
</a> </a>
</div> </div>
...@@ -106,13 +106,13 @@ For more information on what to do next, we recommend the following sections: ...@@ -106,13 +106,13 @@ For more information on what to do next, we recommend the following sections:
<div class="card"> <div class="card">
<a href="/docs/routing/introduction.md"> <a href="/docs/routing/introduction.md">
<b>Routing:</b> <b>Routing:</b>
<small>Learn more about routing in Next.js</small> <small>Learn more about routing in Next.js.</small>
</a> </a>
</div> </div>
<div class="card"> <div class="card">
<a href="/docs/basic-features/typescript.md#pages"> <a href="/docs/basic-features/typescript.md#pages">
<b>TypeScript:</b> <b>TypeScript:</b>
<small>Add TypeScript to your pages</small> <small>Add TypeScript to your pages.</small>
</a> </a>
</div> </div>
--- ---
description: Next.js supports TypeScript by default and has built-in types for pages and the API. You can get started with Next.js and TypeScript here. description: Next.js supports TypeScript by default and has built-in types for pages and the API. You can get started with TypeScript in Next.js here.
--- ---
# TypeScript # TypeScript
......
...@@ -73,13 +73,13 @@ For more information on what to do next, we recommend the following sections: ...@@ -73,13 +73,13 @@ For more information on what to do next, we recommend the following sections:
<div class="card"> <div class="card">
<a href="/docs/basic-features/pages.md"> <a href="/docs/basic-features/pages.md">
<b>Pages:</b> <b>Pages:</b>
<small>Learn more about what pages are in Next.js</small> <small>Learn more about what pages are in Next.js.</small>
</a> </a>
</div> </div>
<div class="card"> <div class="card">
<a href="/docs/basic-features/built-in-css-support.md"> <a href="/docs/basic-features/built-in-css-support.md">
<b>CSS Support:</b> <b>CSS Support:</b>
<small>Use the built-in CSS support to add custom styles to your app</small> <small>Use the built-in CSS support to add custom styles to your app.</small>
</a> </a>
</div> </div>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册