The straight-forward plugin to integrate Strapi with Gatsby Cloud
The straight-forward plugin to integrate Strapi with Gatsby Cloud
This plugin does:
yarn add @relate-app/strapi-plugin-gatsby
npm install --save @relate-app/strapi-plugin-gatsby
In the Settings page enable the preview on all the Content Types that are used in your Gatsby application and set the Build Webhook, Preview Webhook and Content Sync URL that you can find in your Gatsby Cloud Site Settings.
You can also configure headers for the request to Gatsby in the config, like the following example to make Gatsby Cloud only rebuild for a specific source.
1
2
3
4
5
6
7
8
9
10
module.exports = {
...
gatsby: {
enabled: true,
headers: {
'x-gatsby-cloud-data-source': '@relate-app/gatsby-source-strapi',
},
},
...
};
You can also change the default source plugin for the preview on Gatsby in the config, like the following example.
1
2
3
4
5
6
7
8
module.exports = {
...
gatsby: {
enabled: true,
sourcePlugin: '@relate-app/gatsby-source-strapi',
},
...
};
npm install @relate-app/strapi-plugin-gatsby
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.