From f1fef943e6c984efb6c52ddc5864d8c91a2fd45f Mon Sep 17 00:00:00 2001 From: rstavchansky Date: Tue, 8 Jun 2021 10:04:51 -0500 Subject: [PATCH 1/2] Adds context for docs Added mentions of Essential Next.js plugin for users coming to these docs pages from links outside this repo. --- docs/caveats.md | 2 +- docs/cli-usage.md | 2 +- docs/custom-functions.md | 2 +- docs/custom-redirects.md | 3 ++- docs/faq.md | 2 +- docs/image-handling.md | 2 +- docs/local-files-in-runtime.md | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/caveats.md b/docs/caveats.md index ec6e964ec8..e0b5205c10 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -2,7 +2,7 @@ ### Versions -You can check our `package.json` for supported Node versions. +You can check the Essential Next.js plugin's `package.json` for supported Node versions. For breaking Next.js releases, all Next.js versions before the breaking release will be locked to the last working plugin version: diff --git a/docs/cli-usage.md b/docs/cli-usage.md index 38bbc576c4..49e47fbf65 100644 --- a/docs/cli-usage.md +++ b/docs/cli-usage.md @@ -1,6 +1,6 @@ ## CLI Usage -If you'd like to build and deploy your project using the [Netlify CLI](https://docs.netlify.com/cli/get-started/), we recommend this workflow to manage git tracking plugin-generated files: +If you'd like to build and deploy your project using the [Netlify CLI](https://docs.netlify.com/cli/get-started/), we recommend this workflow to manage git tracking for files generated by the Essential Next.js plugin: 1. Make sure all your project's files are committed before running a build with the CLI 2. Run any number of builds and deploys freely (i.e. `netlify build`, `netlify deploy --build`, `netlify deploy --prod`) diff --git a/docs/custom-functions.md b/docs/custom-functions.md index 74854d490e..26b998b5c8 100644 --- a/docs/custom-functions.md +++ b/docs/custom-functions.md @@ -1,6 +1,6 @@ ## Custom Netlify Functions -This plugin creates one Netlify Function for each Next.js page that requires one. +This Essential Next.js plugin creates one Netlify Function for each Next.js page that requires one. To use custom Netlify Functions in addition to what the plugin generates, add a path to your functions folder in `netlify.toml`: ```toml diff --git a/docs/custom-redirects.md b/docs/custom-redirects.md index 1627bfc68d..3062b13307 100644 --- a/docs/custom-redirects.md +++ b/docs/custom-redirects.md @@ -1,6 +1,7 @@ ## Custom Netlify Redirects -You can define custom redirects in a `_redirects` file. +You can define custom redirects in a `_redirects` file for apps using the Essential Next.js plugin. + The precedence of these rules are: - `_redirects` diff --git a/docs/faq.md b/docs/faq.md index 48bf0313eb..1b39be6fb4 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,6 +1,6 @@ ## FAQ -**Q: What can I do if my builds fail suddenly from a broken plugin release or plugin dependency?** +**Q: What can I do if my builds fail suddenly from a broken Essential Next.js plugin release or plugin dependency?** A: Check out the plugin's [releases](https://github.com/netlify/netlify-plugin-nextjs/releases). You can manually install `npm install --save @netlify/plugin-nextjs@3.x.x` at the last working version. Once a new working release is out, you can uninstall the plugin at this locked version (`npm uninstall --save @netlify/plugin-nextjs`), which will re-enable Netlify's build system to use the latest plugin version by default. diff --git a/docs/image-handling.md b/docs/image-handling.md index fd404bbbc6..adda634968 100644 --- a/docs/image-handling.md +++ b/docs/image-handling.md @@ -1,6 +1,6 @@ ## Image Handling -The plugin includes a function to generate images for `next/image`. The images are resized on the fly, so the first request will have a short delay. However because the function uses [On-Demand Builders](https://docs.netlify.com/configure-builds/on-demand-builders/), any subsequent requests for that image are served from the edge cache and are super-fast. +The Essential Next.js plugin includes a function to generate images for `next/image`. The images are resized on the fly, so the first request will have a short delay. However because the function uses [On-Demand Builders](https://docs.netlify.com/configure-builds/on-demand-builders/), any subsequent requests for that image are served from the edge cache and are super-fast. By default, images are returned in the same format as the source image if they are in JPEG, PNG, WebP or AVIF format. If you are only targeting modern browsers and want to live life on the edge, you can [set the environment variable](https://docs.netlify.com/configure-builds/environment-variables/) `FORCE_WEBP_OUTPUT` to `"true"`, and it will return all images in WebP format. This will often lead to significant improvements in file size. However you should not use this if you need to support older browsers, as `next/image` does not support picture tag source fallback and images will appear broken. Check [browser support](https://caniuse.com/webp) to see if you are happy to do this. diff --git a/docs/local-files-in-runtime.md b/docs/local-files-in-runtime.md index 22cf5ebbfd..92aa6b823d 100644 --- a/docs/local-files-in-runtime.md +++ b/docs/local-files-in-runtime.md @@ -2,7 +2,7 @@ A common requirement for Next.js projects is to require local files in Next.js pages (see [markdown issue](https://github.com/netlify/netlify-plugin-nextjs/issues/153) and [i18next issue](https://github.com/netlify/netlify-plugin-nextjs/issues/223) as examples). -In this case, you can configure your netlify.toml to make sure these files are included in the function runtime environment. This is necessary for pages that use fallback: true, SSR, preview mode, etc. For example: +When using the Essential Next.js plugin, you can configure your `netlify.toml` to make sure these files are included in the function runtime environment. This is necessary for pages that use fallback: true, SSR, preview mode, etc. For example: ```toml [build] From c8d65a6fed1a754efb5086c99730df8fa92109ff Mon Sep 17 00:00:00 2001 From: rstavchansky Date: Tue, 8 Jun 2021 11:11:27 -0500 Subject: [PATCH 2/2] chore: edits redirects item --- docs/custom-redirects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/custom-redirects.md b/docs/custom-redirects.md index 3062b13307..294a50293a 100644 --- a/docs/custom-redirects.md +++ b/docs/custom-redirects.md @@ -5,7 +5,7 @@ You can define custom redirects in a `_redirects` file for apps using the Essent The precedence of these rules are: - `_redirects` -- `next-on-netlify` redirects +- `Essential Next.js` redirects - `netlify.toml` redirects Read more about [Netlify redirects](https://docs.netlify.com/routing/redirects/) in our docs.