diff --git a/README.md b/README.md index 5b8d8140..2c83ce16 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,10 @@ ![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, 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 +17,40 @@ 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 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: -- [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) +- [The Netlify UI](https://docs.netlify.com/configure-builds/build-plugins/#ui-installation). Here, you can search for "Essential Gatsby" and install the plugin. -### Install the Netlify build plugin +- [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. + -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 = { @@ -103,10 +82,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