📆 Don't miss our Sanity Showcase virtual meetup on March 20th!

Can content be added without rebuilding in GatsbyJS on Netlify? Discussion of using Contentful and Sanity.io for triggering rebuilds and improving dev experience.

11 replies
Last updated: Apr 26, 2020
Hi, maybe this is a dumb question but I’m wondering if it is possible to add and update content without deploy/building? I’m using GatsbyJS to build my portfolio and hosting on netlify
Apr 25, 2020, 10:41 PM
Nope, you have to rebuild. You can use netlify deploy hooks so that anytime data is published it triggers a rebuild
Apr 26, 2020, 4:19 AM
With Contentful, there’s a way where you can choose what type of changes can only trigger a web hook. Is that what you’re looking for? Like only publish would deploy/build an app but not necessarily an update or create
Apr 26, 2020, 5:50 AM
Thank you for the answers!
Apr 26, 2020, 8:39 AM
Maybe we should make an example of a netlify function that makes it easy to selectively rebuild on content updates too. I mean, so that people don't need to recommend Contentful here 😛
Apr 26, 2020, 9:57 AM
And maybe a FAQ section? 🙂 Sanity is a great service but it can be a bit confusing to get started
Apr 26, 2020, 12:40 PM
Understandable! The reason we don't have a FAQ section is because we think it's better to structure that information into where it belongs in the documentation. In this case, what was unclear to you? How Gatsby worked as a static site generator? Or what choices you have in triggering a rebuild?
Apr 26, 2020, 12:43 PM
It was the choices to trigger a rebuild 🙂 I found the answer after I played a bit with the templates.
IMO, I think it is better to have an FAQ and link some of the answers to the specific parts in the documentation. Anyhow, I think Sanity is a great service
Apr 26, 2020, 12:50 PM
Gotcha! I'll make sure that we add some more material on hosting and rebuilding on Netlify/Vercel
Apr 26, 2020, 12:52 PM
Didn’t mean to recommend contentful! 😂 Just used it for referenced haha
Not trying to pander but I’ve been using Contentful for a year and I’m never starting a new project there after using Sanity for 2 weeks!

Dev and author experience is soooo much better.
Apr 26, 2020, 1:58 PM
Haha – no worries 🙌
Apr 26, 2020, 1:58 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
Clarification on creating drafts from a published document in Sanity.io.Dec 14, 2023
Trouble updating Sanity version, seeking help and guidance.Jan 24, 2024
GROQ query for getting references from arrays in another array in Sanity.ioApr 9, 2020
Upgrading to Sanity v3 causing ECONNRESET error, resolved by updating Node versionMay 23, 2023
How to fetch an array of images using groq in Sanity.ioMay 21, 2023
Discussion about using Sanity.io as a backend solution for small projects and its featuresApr 18, 2020
Clarification on obtaining image orientation and aspect ratio in Sanity.ioJul 22, 2020
Isolating datasets in different studios using Spaces in Sanity.ioJul 21, 2020
Issue setting value of JSON field with document action in Sanity StudioApr 22, 2020
Getting the average color of an image in Sanity CMS using metadata palette info.Dec 3, 2020

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle