Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for Studio hosted with Sanity #24

Open
ecupaio opened this issue Sep 8, 2022 · 1 comment
Open

Docs for Studio hosted with Sanity #24

ecupaio opened this issue Sep 8, 2022 · 1 comment

Comments

@ecupaio
Copy link

ecupaio commented Sep 8, 2022

I was able to follow the documentation for setting up the plugin and connecting my Gatsby site hosted with Netlify in the dashboardConfig file. The point of confusion for me was when I needed to connect the Sanity Studio. I am not hosting my studio on Netlify, but rather Sanity itself so I wasn't clear on what configs to add to this object:

{
  title: 'Sanity Studio',
  apiId: 'xxxxx-yyyy-zzzz-xxxx-yyyyyyyy',
  buildHookId: 'xxxyyyxxxyyyyxxxyyy',
  name: 'sanity-gatsby-blog-20-studio',
}

I took a wild stab and got it right that I didn't need that object and needed to set up a webhook that connected to my netlify build hook I set up. Below is a set by step guide on how to achieve this assuming the user has already created and configured their netlify build hook:

  1. Select your studio in the management dashboard
  2. Select API > Webhooks > Create Webhook
  3. Add a name and use the URL from your netlify build hook as the URL: https://api.netlify.com/build_hooks/XXXXXXX
  4. Make sure Create, Update, and Delete are checked under Trigger on
  5. Hit save and make a test edit in your Studio to ensure the deploy is triggered.
@ecupaio
Copy link
Author

ecupaio commented Sep 8, 2022

It appears from this guide the plugin might not even be necessary. Some clarification would really be helpful here on how I would trigger deploys whenever content is modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant