From 9381791bf5fbee3d1c227a250598b4817513a8ac Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 25 Jan 2022 09:43:48 +0000 Subject: [PATCH 1/2] chore: update readme for GA --- README.md | 78 ++++++++++++++++++++----------------------------------- 1 file changed, 28 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 037a98ff..6eb1224d 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ ![Netlify Build plugin Gatsby – Run Gatsby seamlessly on Netlify](netlify-gatsby-plugin.png) -# Essential Gatsby Plugin - v2 beta +# Essential Gatsby Plugin - v2 -This version of the Essential Gatsby build plugin is a beta release, supporting -the new features of Gatsby 4 including the SSR and DSG -[render modes](https://v4.gatsbyjs.com/docs/conceptual/rendering-options/). For -older versions of Gatsby, please use -[version 1.x of the build plugin](https://github.com/netlify/netlify-plugin-gatsby/tree/v1), -which is installed automatically for new Gatsby sites. +The Essential Gatsby build plugin enables caching of builds, and adds supports +for SSR and DSG +[render modes](https://v4.gatsbyjs.com/docs/conceptual/rendering-options/) and +Gatsby Functions. It is installed automatically for all new Gatsby sites. > **Note:** > @@ -20,58 +18,42 @@ which is installed automatically for new Gatsby sites. > - Essential Gatsby is not compatible with the Gatsby community plugin > [gatsby-plugin-netlify-cache](https://www.gatsbyjs.com/plugins/gatsby-plugin-netlify-cache/). -## Installation and Configuration +## Installation - +### Installing the Netlify build plugin -There are three steps to enable support for Gatsby 4 in your Netlify site. This -includes installing _two_ plugins: a Netlify build plugin called "Essential -Gatsby Plugin", and a Gatsby plugin called "gatsby-plugin-netlify": +New Gatsby sites will have the Essential Gatsby build plugin installed +automatically. You can confirm this in the build logs. If you need to install it +manually, you have two options: -- [Install version 2 beta of `@netlify/plugin-gatsby`](#install-the-netlify-build-plugin) - (the Netlify build plugin) -- [Install version 4 beta of `gatsby-plugin-netlify`](#install-the-gatsby-plugin) - (the Gatsby plugin) +1. Search for "Essential Gatsby" and install the plugin + [from the Netlify UI](https://docs.netlify.com/configure-builds/build-plugins/#ui-installation) -### Install the Netlify build plugin +2. Install the plugin as `@netlify/plugin-gatsby` using + [file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation). -1. Create a `netlify.toml` in the root of your project. Your file should include - the plugins section below: +### Install the Gatsby Plugin -```toml -[[plugins]] -package = "@netlify/plugin-gatsby" -``` +You should also install the Gatsby plugin +[gatsby-plugin-netlify](https://www.gatsbyjs.org/plugins/gatsby-plugin-netlify/). +This is required for SSR pages, and adds support for Gatsby redirects and asset +caching rules: -2. From your project's base directory, add this plugin to `devDependencies` in - `package.json`. +1. Add the package as a dependency: ```shell -npm install -D @netlify/plugin-gatsby@^2.0.0-beta +npm install -D gatsby-plugin-netlify ``` -Read more about -[file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation) -in our docs. - -## Install the Gatsby Plugin - -To use SSR pages you must install the beta version of -[gatsby-plugin-netlify](https://www.gatsbyjs.org/plugins/gatsby-plugin-netlify/): - -```shell -npm install -D gatsby-plugin-netlify@next -``` - -Then add the following to your `gatsby-config.js` file: +2. Then add the following to your `gatsby-config.js` file: ```js module.exports = { @@ -91,10 +73,6 @@ DSG pages. The best workaround is to use an image CDN such as or [imgix](https://github.com/imgix/gatsby) to host your images. This will give you faster builds and rendering too. -### Beta feedback - -TODO: forums link - ### Local development When developing Gatsby Functions it is usually easier to use the built-in From 6d345afd6b521bc25d5109d8499ee990b6ff563a Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 26 Jan 2022 17:06:22 +0000 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Kyle Rollins --- README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6eb1224d..0c6fe574 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ # Essential Gatsby Plugin - v2 -The Essential Gatsby build plugin enables caching of builds, and adds supports -for SSR and DSG +The Essential Gatsby build plugin enables caching of builds, SSR and DSG [render modes](https://v4.gatsbyjs.com/docs/conceptual/rendering-options/) and Gatsby Functions. It is installed automatically for all new Gatsby sites. @@ -25,20 +24,18 @@ Gatsby sites need two plugins to support all features. 1. The Netlify build plugin, called "Essential Gatsby" or `@netlify/plugin-gatsby`. This is installed automatically for all Gatsby sites deployed to Netlify. -2. The Gatsby plugin `gatsby-plugin-netlify`, which needs to be manually +2. The Gatsby plugin `gatsby-plugin-netlify`. This needs to be manually installed. ### Installing the Netlify build plugin -New Gatsby sites will have the Essential Gatsby build plugin installed -automatically. You can confirm this in the build logs. If you need to install it +New Gatsby sites on Netlify automatically install the Essential Gatsby build plugin. You can confirm this in the build logs. If you need to install it manually, you have two options: -1. Search for "Essential Gatsby" and install the plugin - [from the Netlify UI](https://docs.netlify.com/configure-builds/build-plugins/#ui-installation) +- [The Netlify UI](https://docs.netlify.com/configure-builds/build-plugins/#ui-installation). Here, you can search for "Essential Gatsby" and install the plugin. -2. Install the plugin as `@netlify/plugin-gatsby` using - [file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation). +- [File-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation). You can install the plugin as `@netlify/plugin-gatsby` in your `netlify.toml` file. + ### Install the Gatsby Plugin