From d1fdd2bbf8df7e12f561f3eec0c1f16897502045 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Fri, 3 Jan 2020 13:16:51 -0500 Subject: [PATCH] Add descriptions to documentation pages (#9901) * Added descriptions * Added descriptions to API Reference * Added descriptions to API Routes * Added descriptions to basic features * Added descriptions to the routing docs * Update exportPathMap.md Co-authored-by: Joe Haddad --- docs/advanced-features/amp-support/adding-amp-components.md | 4 ++++ .../amp-support/amp-in-static-html-export.md | 4 ++++ docs/advanced-features/amp-support/amp-validation.md | 4 ++++ docs/advanced-features/amp-support/introduction.md | 4 ++++ docs/advanced-features/amp-support/typescript.md | 4 ++++ docs/advanced-features/automatic-static-optimization.md | 4 ++++ docs/advanced-features/custom-app.md | 4 ++++ docs/advanced-features/custom-document.md | 4 ++++ docs/advanced-features/custom-error-page.md | 4 ++++ docs/advanced-features/custom-server.md | 4 ++++ docs/advanced-features/customizing-babel-config.md | 4 ++++ docs/advanced-features/dynamic-import.md | 4 ++++ docs/advanced-features/src-directory.md | 4 ++++ docs/advanced-features/static-html-export.md | 4 ++++ docs/api-reference/cli.md | 4 ++++ docs/api-reference/data-fetching/getInitialProps.md | 4 ++++ docs/api-reference/next.config.js/build-target.md | 4 ++++ .../next.config.js/cdn-support-with-asset-prefix.md | 4 ++++ docs/api-reference/next.config.js/compression.md | 4 ++++ .../next.config.js/configuring-onDemandEntries.md | 4 ++++ .../next.config.js/configuring-the-build-id.md | 4 ++++ docs/api-reference/next.config.js/custom-page-extensions.md | 4 ++++ docs/api-reference/next.config.js/custom-webpack-config.md | 4 ++++ .../next.config.js/disabling-etag-generation.md | 4 ++++ docs/api-reference/next.config.js/disabling-x-powered-by.md | 4 ++++ docs/api-reference/next.config.js/environment-variables.md | 4 ++++ docs/api-reference/next.config.js/exportPathMap.md | 4 ++++ .../next.config.js/ignoring-typescript-errors.md | 4 ++++ docs/api-reference/next.config.js/introduction.md | 4 ++++ docs/api-reference/next.config.js/runtime-configuration.md | 4 ++++ .../next.config.js/setting-a-custom-build-directory.md | 4 ++++ .../next.config.js/static-optimization-indicator.md | 4 ++++ docs/api-reference/next/amp.md | 4 ++++ docs/api-reference/next/head.md | 4 ++++ docs/api-reference/next/link.md | 4 ++++ docs/api-reference/next/router.md | 4 ++++ docs/api-routes/api-middlewares.md | 4 ++++ docs/api-routes/dynamic-api-routes.md | 6 +++++- docs/api-routes/introduction.md | 4 ++++ docs/api-routes/response-helpers.md | 4 ++++ docs/basic-features/built-in-css-support.md | 4 ++++ docs/basic-features/data-fetching.md | 4 ++++ docs/basic-features/pages.md | 4 ++++ docs/basic-features/static-file-serving.md | 4 ++++ docs/basic-features/typescript.md | 4 ++++ docs/deployment.md | 4 ++++ docs/faq.md | 4 ++++ docs/getting-started.md | 2 +- docs/routing/dynamic-routes.md | 4 ++++ docs/routing/imperatively.md | 4 ++++ docs/routing/introduction.md | 4 ++++ docs/routing/shallow-routing.md | 4 ++++ 52 files changed, 206 insertions(+), 2 deletions(-) diff --git a/docs/advanced-features/amp-support/adding-amp-components.md b/docs/advanced-features/amp-support/adding-amp-components.md index 8ecd294025f05c8..1c11ffe8c630c28 100644 --- a/docs/advanced-features/amp-support/adding-amp-components.md +++ b/docs/advanced-features/amp-support/adding-amp-components.md @@ -1,3 +1,7 @@ +--- +description: Add components from the AMP community to AMP pages, and make your pages more interactive. +--- + # Adding AMP Components The AMP community provide [many components](https://amp.dev/documentation/components/) to make AMP pages more interactive. You can add these components to your page by using `next/head`, as in the following example: diff --git a/docs/advanced-features/amp-support/amp-in-static-html-export.md b/docs/advanced-features/amp-support/amp-in-static-html-export.md index f6372f481eaeb24..dfa3afbc41f309c 100644 --- a/docs/advanced-features/amp-support/amp-in-static-html-export.md +++ b/docs/advanced-features/amp-support/amp-in-static-html-export.md @@ -1,3 +1,7 @@ +--- +description: Learn how AMP pages are created when used together with `next export`. +--- + # AMP in Static HTML export When using `next export` to do [Static HTML export](/docs/advanced-features/static-html-export.md) statically prerender pages, Next.js will detect if the page supports AMP and change the exporting behavior based on that. diff --git a/docs/advanced-features/amp-support/amp-validation.md b/docs/advanced-features/amp-support/amp-validation.md index ac22bd5a337b388..859024330712339 100644 --- a/docs/advanced-features/amp-support/amp-validation.md +++ b/docs/advanced-features/amp-support/amp-validation.md @@ -1,3 +1,7 @@ +--- +description: AMP pages are automatically validated by Next.js during development and on build. Learn more about it here. +--- + # AMP Validation AMP pages are automatically validated with [amphtml-validator](https://www.npmjs.com/package/amphtml-validator) during development. Errors and warnings will appear in the terminal where you started Next.js. diff --git a/docs/advanced-features/amp-support/introduction.md b/docs/advanced-features/amp-support/introduction.md index 2b87e3f33bbf774..187445004764951 100644 --- a/docs/advanced-features/amp-support/introduction.md +++ b/docs/advanced-features/amp-support/introduction.md @@ -1,3 +1,7 @@ +--- +description: With minimal config, and without leaving React, you can start adding AMP and improve the performance and speed of your pages. +--- + # AMP Support
diff --git a/docs/advanced-features/amp-support/typescript.md b/docs/advanced-features/amp-support/typescript.md index c9d794c2a580556..273c943d94920f3 100644 --- a/docs/advanced-features/amp-support/typescript.md +++ b/docs/advanced-features/amp-support/typescript.md @@ -1,3 +1,7 @@ +--- +description: Using AMP with TypeScript? Extend your typings to allow AMP components. +--- + # TypeScript AMP currently doesn't have built-in types for TypeScript, but it's in their roadmap ([#13791](https://github.com/ampproject/amphtml/issues/13791)). diff --git a/docs/advanced-features/automatic-static-optimization.md b/docs/advanced-features/automatic-static-optimization.md index 0aa01b8b25121e8..c3304ed843a05c6 100644 --- a/docs/advanced-features/automatic-static-optimization.md +++ b/docs/advanced-features/automatic-static-optimization.md @@ -1,3 +1,7 @@ +--- +description: Next.js automatically optimizes your app to be static HTML whenever possible. Learn how it works here. +--- + # Automatic Static Optimization Next.js automatically determines that a page is static (can be prerendered) if it has no blocking data requirements. This determination is made by the absence of `getInitialProps` in the page. diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index 0b920c575c3cf8a..22095d635aca23a 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -1,3 +1,7 @@ +--- +description: Control page initialization and add a layout that persists for all pages by overriding the default App component used by Next.js. +--- + # Custom `App` Next.js uses the `App` component to initialize pages. You can override it and control the page initialization. Which allows you to do amazing things like: diff --git a/docs/advanced-features/custom-document.md b/docs/advanced-features/custom-document.md index 5e1c9890b963450..4408cf087f95fb4 100644 --- a/docs/advanced-features/custom-document.md +++ b/docs/advanced-features/custom-document.md @@ -1,3 +1,7 @@ +--- +description: Extend the default document markup added by Next.js. +--- + # Custom `Document` A custom `Document` is commonly used to augment your application's `` and `` tags. This is necessary because Next.js pages skip the definition of the surrounding document's markup. diff --git a/docs/advanced-features/custom-error-page.md b/docs/advanced-features/custom-error-page.md index 80279ee19b3c83e..828ecf789a23606 100644 --- a/docs/advanced-features/custom-error-page.md +++ b/docs/advanced-features/custom-error-page.md @@ -1,3 +1,7 @@ +--- +description: Override and extend the built-in Error page to handle custom errors. +--- + # Custom Error Page **404** or **500** errors are handled both client-side and server-side by the `Error` component. If you wish to override it, define the file `pages/_error.js` and add the following code: diff --git a/docs/advanced-features/custom-server.md b/docs/advanced-features/custom-server.md index 824a2393bc480b2..7b1ae1bdc22f1fd 100644 --- a/docs/advanced-features/custom-server.md +++ b/docs/advanced-features/custom-server.md @@ -1,3 +1,7 @@ +--- +description: Start a Next.js app programmatically using a custom server. +--- + # Custom Server
diff --git a/docs/advanced-features/customizing-babel-config.md b/docs/advanced-features/customizing-babel-config.md index 4e2b33cc977e37a..8bdf25a48cd971d 100644 --- a/docs/advanced-features/customizing-babel-config.md +++ b/docs/advanced-features/customizing-babel-config.md @@ -1,3 +1,7 @@ +--- +description: Extend the babel preset added by Next.js with your own configs. +--- + # Customizing Babel Config
diff --git a/docs/advanced-features/dynamic-import.md b/docs/advanced-features/dynamic-import.md index b957d886cbf704c..adf716f1501b23c 100644 --- a/docs/advanced-features/dynamic-import.md +++ b/docs/advanced-features/dynamic-import.md @@ -1,3 +1,7 @@ +--- +description: Dynamically import JavaScript modules and React Components and split your code into manageable chunks. +--- + # Dynamic Import
diff --git a/docs/advanced-features/src-directory.md b/docs/advanced-features/src-directory.md index 048d14b40a92ab5..00a162832382719 100644 --- a/docs/advanced-features/src-directory.md +++ b/docs/advanced-features/src-directory.md @@ -1,3 +1,7 @@ +--- +description: Save pages under the `src` directory as an alternative to the root `pages` directory. +--- + # `src` Directory Pages can also be added under `src/pages` as an alternative to the root `pages` directory. diff --git a/docs/advanced-features/static-html-export.md b/docs/advanced-features/static-html-export.md index 62417c64ede1690..86922903cc89575 100644 --- a/docs/advanced-features/static-html-export.md +++ b/docs/advanced-features/static-html-export.md @@ -1,3 +1,7 @@ +--- +description: Export your Next.js app to static HTML, and run it standalone without the need of a Node.js server. +--- + # Static HTML Export
diff --git a/docs/api-reference/cli.md b/docs/api-reference/cli.md index 1774f5870611b80..da3660a75e1cc9a 100644 --- a/docs/api-reference/cli.md +++ b/docs/api-reference/cli.md @@ -1,3 +1,7 @@ +--- +description: The Next.js CLI allows you to start, build, and export your application. Learn more about it here. +--- + # Next.js CLI The Next.js CLI allows you to start, build, and export your application. diff --git a/docs/api-reference/data-fetching/getInitialProps.md b/docs/api-reference/data-fetching/getInitialProps.md index f38c3aa309f157e..122ffe288804d1d 100644 --- a/docs/api-reference/data-fetching/getInitialProps.md +++ b/docs/api-reference/data-fetching/getInitialProps.md @@ -1,3 +1,7 @@ +--- +description: Enable Server-Side Rendering in a page and do initial data population with `getInitialProps`. +--- + # getInitialProps
diff --git a/docs/api-reference/next.config.js/build-target.md b/docs/api-reference/next.config.js/build-target.md index c55da8adeec4797..06651ebf01d3b1f 100644 --- a/docs/api-reference/next.config.js/build-target.md +++ b/docs/api-reference/next.config.js/build-target.md @@ -1,3 +1,7 @@ +--- +description: Learn more about the build targets used by Next.js, which decide the way your application is built and run. +--- + # Build Target Next.js supports various build targets, each changing the way your application is built and run. We'll explain each of the targets below. diff --git a/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md b/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md index ba1ced8b1cea45a..c08b9ab21900be6 100644 --- a/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md +++ b/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md @@ -1,3 +1,7 @@ +--- +description: A custom asset prefix allows you serve static assets from a CDN. Learn more about it here. +--- + # CDN Support with Asset Prefix To set up a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network), you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on. diff --git a/docs/api-reference/next.config.js/compression.md b/docs/api-reference/next.config.js/compression.md index 87a9da4d88ebe21..9f98132b1a4a659 100644 --- a/docs/api-reference/next.config.js/compression.md +++ b/docs/api-reference/next.config.js/compression.md @@ -1,3 +1,7 @@ +--- +description: Next.js provides gzip compression to compress rendered content and static files, it only works with the server target. Learn more about it here. +--- + # Compression Next.js provides [**gzip**](https://tools.ietf.org/html/rfc6713#section-3) compression to compress rendered content and static files. Compression only works with the [`server` target](/docs/api-reference/next.config.js/build-target.md#server-target). In general you will want to enable compression on a HTTP proxy like [nginx](https://www.nginx.com/), to offload load from the `Node.js` process. diff --git a/docs/api-reference/next.config.js/configuring-onDemandEntries.md b/docs/api-reference/next.config.js/configuring-onDemandEntries.md index a12c94e4ef9cfa5..8b05d1c5801ca4b 100644 --- a/docs/api-reference/next.config.js/configuring-onDemandEntries.md +++ b/docs/api-reference/next.config.js/configuring-onDemandEntries.md @@ -1,3 +1,7 @@ +--- +description: Configure how Next.js will dispose and keep in memory pages created in development. +--- + # Configuring onDemandEntries Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development. diff --git a/docs/api-reference/next.config.js/configuring-the-build-id.md b/docs/api-reference/next.config.js/configuring-the-build-id.md index 4f5eb33ce1dc279..ede037ff20f511b 100644 --- a/docs/api-reference/next.config.js/configuring-the-build-id.md +++ b/docs/api-reference/next.config.js/configuring-the-build-id.md @@ -1,3 +1,7 @@ +--- +description: Configure the build id, which is used to identify the current build in which your application is being served. +--- + # Configuring the Build ID Next.js uses a constant id generated at build time to identify which version of your application is being served. This can cause problems in multi-server deployments when `next build` is ran on every server. In order to keep a static build id between builds you can provide your own build id. diff --git a/docs/api-reference/next.config.js/custom-page-extensions.md b/docs/api-reference/next.config.js/custom-page-extensions.md index f7f1ef067acc65f..bdec8334e9cc3ef 100644 --- a/docs/api-reference/next.config.js/custom-page-extensions.md +++ b/docs/api-reference/next.config.js/custom-page-extensions.md @@ -1,3 +1,7 @@ +--- +description: Extend the default page extensions used by Next.js when resolving pages in the pages directory. +--- + # Custom Page Extensions Aimed at modules like [@next/mdx](https://github.com/zeit/next.js/tree/canary/packages/next-mdx), which adds support for pages ending with `.mdx`. You can configure the extensions looked for in the `pages` directory when resolving pages. diff --git a/docs/api-reference/next.config.js/custom-webpack-config.md b/docs/api-reference/next.config.js/custom-webpack-config.md index 6cecace2221c3e8..e3dd4af69c5f651 100644 --- a/docs/api-reference/next.config.js/custom-webpack-config.md +++ b/docs/api-reference/next.config.js/custom-webpack-config.md @@ -1,3 +1,7 @@ +--- +description: Extend the default webpack config added by Next.js. +--- + # Custom Webpack Config Some commonly asked for features are available as plugins: diff --git a/docs/api-reference/next.config.js/disabling-etag-generation.md b/docs/api-reference/next.config.js/disabling-etag-generation.md index 89329369539d72e..27ecf6660d81be2 100644 --- a/docs/api-reference/next.config.js/disabling-etag-generation.md +++ b/docs/api-reference/next.config.js/disabling-etag-generation.md @@ -1,3 +1,7 @@ +--- +description: Next.js will generate etags for every page by default. Learn more about how to disable etag generation here. +--- + # Disabling ETag Generation Next.js will generate [etags](https://en.wikipedia.org/wiki/HTTP_ETag) for every page by default. You may want to disable etag generation for HTML pages depending on your cache strategy. diff --git a/docs/api-reference/next.config.js/disabling-x-powered-by.md b/docs/api-reference/next.config.js/disabling-x-powered-by.md index cfcd4bd569d1289..a6d3db934f58eff 100644 --- a/docs/api-reference/next.config.js/disabling-x-powered-by.md +++ b/docs/api-reference/next.config.js/disabling-x-powered-by.md @@ -1,3 +1,7 @@ +--- +description: Next.js will add `x-powered-by` to the request headers by default. Learn to opt-out of it here. +--- + # Disabling x-powered-by By default Next.js will add `x-powered-by` to the request headers. To opt-out of it, open `next.config.js` and disable the `poweredByHeader` config: diff --git a/docs/api-reference/next.config.js/environment-variables.md b/docs/api-reference/next.config.js/environment-variables.md index c8d427fc4681c93..4bd74196f8b358e 100644 --- a/docs/api-reference/next.config.js/environment-variables.md +++ b/docs/api-reference/next.config.js/environment-variables.md @@ -1,3 +1,7 @@ +--- +description: Learn to add and access environment variables in your Next.js application at build time. +--- + # Environment Variables
diff --git a/docs/api-reference/next.config.js/exportPathMap.md b/docs/api-reference/next.config.js/exportPathMap.md index 9d9b3ae509ee7f6..bf367d6b31b86a9 100644 --- a/docs/api-reference/next.config.js/exportPathMap.md +++ b/docs/api-reference/next.config.js/exportPathMap.md @@ -1,3 +1,7 @@ +--- +description: Customize the pages that will be exported as HTML files when using `next export`. +--- + # exportPathMap > This feature is exclusive of `next export`. Please refer to [Static HTML export](/docs/advanced-features/static-html-export.md) if you want to learn more about it. diff --git a/docs/api-reference/next.config.js/ignoring-typescript-errors.md b/docs/api-reference/next.config.js/ignoring-typescript-errors.md index 28b45ef8b7033cc..bde16ed256ee362 100644 --- a/docs/api-reference/next.config.js/ignoring-typescript-errors.md +++ b/docs/api-reference/next.config.js/ignoring-typescript-errors.md @@ -1,3 +1,7 @@ +--- +description: Next.js reports TypeScript errors by default. Learn to opt-out of this behavior here. +--- + # Ignoring TypeScript Errors Next.js reports TypeScript errors by default. If you don't want to leverage this behavior and prefer something else instead, like your editor's integration, you may want to disable it. diff --git a/docs/api-reference/next.config.js/introduction.md b/docs/api-reference/next.config.js/introduction.md index a4af3c1cb643d1b..e9fd3f681694fb0 100644 --- a/docs/api-reference/next.config.js/introduction.md +++ b/docs/api-reference/next.config.js/introduction.md @@ -1,3 +1,7 @@ +--- +description: learn more about the configuration file used by Next.js to handle your application. +--- + # next.config.js For custom advanced behavior of Next.js, you can create a `next.config.js` in the root of your project directory (next to `package.json`). diff --git a/docs/api-reference/next.config.js/runtime-configuration.md b/docs/api-reference/next.config.js/runtime-configuration.md index 4880d9bb28402fe..b176acbb5e36189 100644 --- a/docs/api-reference/next.config.js/runtime-configuration.md +++ b/docs/api-reference/next.config.js/runtime-configuration.md @@ -1,3 +1,7 @@ +--- +description: Add client and server runtime configuration to your Next.js app. +--- + # Runtime Configuration > Generally you'll want to use [build-time environment variables](/docs/api-reference/next.config.js/environment-variables.md) to provide your configuration. The reason for this is that runtime configuration adds rendering / initialization overhead and is incompatible with [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md). diff --git a/docs/api-reference/next.config.js/setting-a-custom-build-directory.md b/docs/api-reference/next.config.js/setting-a-custom-build-directory.md index fea342c406a3f10..df5113ab88a48e3 100644 --- a/docs/api-reference/next.config.js/setting-a-custom-build-directory.md +++ b/docs/api-reference/next.config.js/setting-a-custom-build-directory.md @@ -1,3 +1,7 @@ +--- +description: Set a custom build directory to use instead of the default .next directory. +--- + # Setting a custom build directory You can specify a name to use for a custom build directory to use instead of `.next`. diff --git a/docs/api-reference/next.config.js/static-optimization-indicator.md b/docs/api-reference/next.config.js/static-optimization-indicator.md index a74d9f96bbc6c03..92ec75b66826a1b 100644 --- a/docs/api-reference/next.config.js/static-optimization-indicator.md +++ b/docs/api-reference/next.config.js/static-optimization-indicator.md @@ -1,3 +1,7 @@ +--- +description: Optimized pages include an indicator to let you know if it's being statically optimized. You can opt-out of it here. +--- + # Static Optimization Indicator When a page qualifies for [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) we show an indicator to let you know. diff --git a/docs/api-reference/next/amp.md b/docs/api-reference/next/amp.md index 5549281d97b9d15..a5fd080b2fd5d95 100644 --- a/docs/api-reference/next/amp.md +++ b/docs/api-reference/next/amp.md @@ -1,3 +1,7 @@ +--- +description: Enable AMP in a page, and control the way Next.js adds AMP to the page with the AMP config. +--- + # next/amp
diff --git a/docs/api-reference/next/head.md b/docs/api-reference/next/head.md index e083bd1cc60c9a4..802e7563b995d0d 100644 --- a/docs/api-reference/next/head.md +++ b/docs/api-reference/next/head.md @@ -1,3 +1,7 @@ +--- +description: Add custom elements to the `head` of your page with the built-in Head component. +--- + # next/head
diff --git a/docs/api-reference/next/link.md b/docs/api-reference/next/link.md index beaec48640ea9c2..560ae5c48c9ba7b 100644 --- a/docs/api-reference/next/link.md +++ b/docs/api-reference/next/link.md @@ -1,3 +1,7 @@ +--- +description: Enable client-side transitions between routes with the built-in Link component. +--- + # next/link
diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index e2a3be541e63f47..0238ef674110b42 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -1,3 +1,7 @@ +--- +description: Learn more about the API of the Next.js Router, and access the router instance in your page with the useRouter hook. +--- + # next/router > Before moving forward, we recommend you to read [Routing Introduction](/docs/routing/introduction.md) first. diff --git a/docs/api-routes/api-middlewares.md b/docs/api-routes/api-middlewares.md index 99c27971d9632cc..431e687ac01f220 100644 --- a/docs/api-routes/api-middlewares.md +++ b/docs/api-routes/api-middlewares.md @@ -1,3 +1,7 @@ +--- +description: API Routes provide built-in middlewares that parse the incoming request. Learn more about them here. +--- + # API Middlewares API routes provide built in middlewares which parse the incoming request (`req`). Those middlewares are: diff --git a/docs/api-routes/dynamic-api-routes.md b/docs/api-routes/dynamic-api-routes.md index 0624cc9ce3efa37..88aa57a7f69e967 100644 --- a/docs/api-routes/dynamic-api-routes.md +++ b/docs/api-routes/dynamic-api-routes.md @@ -1,6 +1,10 @@ +--- +description: You can add the dynamic routes used for pages to API Routes too. Learn how it works here. +--- + # Dynamic API Routes -API pages support [dynamic routes](/docs/routing/dynamic-routes.md), and follow the same file naming rules used for `pages`. +API routes support [dynamic routes](/docs/routing/dynamic-routes.md), and follow the same file naming rules used for `pages`. For example, the API route `pages/api/post/[pid].js` has the following code: diff --git a/docs/api-routes/introduction.md b/docs/api-routes/introduction.md index 6fce57779ace684..d883787531346ad 100644 --- a/docs/api-routes/introduction.md +++ b/docs/api-routes/introduction.md @@ -1,3 +1,7 @@ +--- +description: Next.js supports API Routes, which allow you to build your API without leaving your Next.js app. Learn how it works here. +--- + # API Routes
diff --git a/docs/api-routes/response-helpers.md b/docs/api-routes/response-helpers.md index 64686d3b6bbe21e..9039bd0a60e6967 100644 --- a/docs/api-routes/response-helpers.md +++ b/docs/api-routes/response-helpers.md @@ -1,3 +1,7 @@ +--- +description: API Routes include a set of Express.js-like methods for the response to help you creating new API endpoints. Learn how it works here. +--- + # Response Helpers The response (`res`) includes a set of Express.js-like methods to improve the developer experience and increase the speed of creating new API endpoints, take a look at the following example: diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index 643558a6ea25c0e..1b26fbd45b62888 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -1,3 +1,7 @@ +--- +description: Next.js includes styled-jsx by default for isolated and scoped CSS support, but you can also use any other CSS-in-JS solution!. Learn more here. +--- + # Built-in CSS Support
diff --git a/docs/basic-features/data-fetching.md b/docs/basic-features/data-fetching.md index 5345fe18bbfe934..9871ef1602a47b7 100644 --- a/docs/basic-features/data-fetching.md +++ b/docs/basic-features/data-fetching.md @@ -1,3 +1,7 @@ +--- +description: Next.js can handle data fetching in multiple ways for server-rendered and static pages. Learn how it works here. +--- + # Data fetching Next.js has 2 pre-rendering modes built-in: diff --git a/docs/basic-features/pages.md b/docs/basic-features/pages.md index f0a5ad8ad426e5e..0231a9fe434b2db 100644 --- a/docs/basic-features/pages.md +++ b/docs/basic-features/pages.md @@ -1,3 +1,7 @@ +--- +description: Next.js pages are React Components exported in a file in the pages directory. Learn how they work here. +--- + # Pages A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.ts`, or `.tsx` file in the `pages` directory. diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index a3696b71b327547..5b12ea4202d2155 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -1,3 +1,7 @@ +--- +description: Next.js allows you to serve static files, like images, in the public directory. You can learn how it works here. +--- + # Static File Serving Next.js can serve static files, like images, under a folder called `public` in the root directory. Files inside `public` can then be referenced by your code starting from the base URL (`/`). diff --git a/docs/basic-features/typescript.md b/docs/basic-features/typescript.md index 1036351b8217324..b01643cf2be3304 100644 --- a/docs/basic-features/typescript.md +++ b/docs/basic-features/typescript.md @@ -1,3 +1,7 @@ +--- +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. +--- + # TypeScript
diff --git a/docs/deployment.md b/docs/deployment.md index 4dad075468db076..c934f76986cbe4d 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,3 +1,7 @@ +--- +description: Compile and deploy your Next.js app to production with ZEIT Now and other hosting alternatives. +--- + # Deployment To go to production Next.js has a `next build` command. When ran it will compile your project and automatically apply numerous optimizations. diff --git a/docs/faq.md b/docs/faq.md index 5badcf96bb0e485..311b788828d8d9d 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,3 +1,7 @@ +--- +description: Get to know more about Next.js with the frequently asked questions. +--- + # Frequently Asked Questions
diff --git a/docs/getting-started.md b/docs/getting-started.md index 79f646c1344225b..6beb43ece86e197 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,5 +1,5 @@ --- -description: Getting started with Next.js. +description: Get started with Next.js in the official documentation, and learn more about all our features! --- # Getting Started diff --git a/docs/routing/dynamic-routes.md b/docs/routing/dynamic-routes.md index 7d5ab9381e8d48e..7ae275d3ddb9ed4 100644 --- a/docs/routing/dynamic-routes.md +++ b/docs/routing/dynamic-routes.md @@ -1,3 +1,7 @@ +--- +description: Dynamic Routes are pages that allow you to add custom params to your URLs. Start creating Dynamic Routes and learn more here. +--- + # Dynamic Routes
diff --git a/docs/routing/imperatively.md b/docs/routing/imperatively.md index 112d96ee34301a8..f555132a0c5bd72 100644 --- a/docs/routing/imperatively.md +++ b/docs/routing/imperatively.md @@ -1,3 +1,7 @@ +--- +description: Client-side navigations are also possible using the Router API instead of the Link component. Learn more here. +--- + # Imperatively
diff --git a/docs/routing/introduction.md b/docs/routing/introduction.md index 185c3bdc6ff085c..8273358ab138d7b 100644 --- a/docs/routing/introduction.md +++ b/docs/routing/introduction.md @@ -1,3 +1,7 @@ +--- +description: Next.js has a built-in, opinionated, and file-system based Router. You can learn how it works here. +--- + # Routing Next.js has a file-system based router built on the [concept of pages](/docs/basic-features/pages.md). diff --git a/docs/routing/shallow-routing.md b/docs/routing/shallow-routing.md index 390194890df1ba0..96fdb6dc4405a1b 100644 --- a/docs/routing/shallow-routing.md +++ b/docs/routing/shallow-routing.md @@ -1,3 +1,7 @@ +--- +description: You can use shallow routing to change the URL without triggering a new page change. Learn more here. +--- + # Shallow Routing