Adding Gatsby Cloud Extension to Sanity.io
See how to setup a preview button in Sanity
Table of Contents
Installing this Sanity Studio dashboard widget will make it easier for content editors to access Preview from Sanity. The widget triggers Gatsby Cloud instances.
The site must be set up with a Gatsby Preview instance. Please see “Getting Started with Gatsby Preview and Sanity”.
If you haven’t installed the Sanity dashboard plugin yet, you’ll need to install it to get dashboard support in Sanity Studio in general. Run this command inside the studio folder:
sanity install @sanity/dashboard
Then, install the Gatsby widget plugin by running this command inside the studio folder:
sanity install dashboard-widget-gatsby
Implement your own dashboardConfig by following these steps:
- In your
studio/sanity.jsonfile, append the following line to the
- Find the
dashboardConfig.jsfile, which should be at the path specified in the previous step. The
sanity.jsonshould point to the same location. Add the
Note: You can change the order of the widgets to change how they look in the studio dashboard. See Sanity docs here for more details.
siteUrl- The Gatsby Cloud Preview url
Now, when anyone opens Sanity Studio, they can access the button from the dashboard!