<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Diogo Oliveira</title>
    <description>The latest articles on DEV Community by Diogo Oliveira (@diogo_oliveira_81729ea4af).</description>
    <link>https://dev.to/diogo_oliveira_81729ea4af</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4217134%2F72762b1b-5b69-4486-aa6b-2b9d64733a4f.png</url>
      <title>DEV Community: Diogo Oliveira</title>
      <link>https://dev.to/diogo_oliveira_81729ea4af</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diogo_oliveira_81729ea4af"/>
    <language>en</language>
    <item>
      <title>Why Publishing in Sanity Didn’t Update Our Gatsby Site</title>
      <dc:creator>Diogo Oliveira</dc:creator>
      <pubDate>Fri, 30 Oct 2026 11:45:30 +0000</pubDate>
      <link>https://dev.to/diogo_oliveira_81729ea4af/why-publishing-in-sanity-didnt-update-our-gatsby-site-15kp</link>
      <guid>https://dev.to/diogo_oliveira_81729ea4af/why-publishing-in-sanity-didnt-update-our-gatsby-site-15kp</guid>
      <description>&lt;p&gt;I recently updated an article on the RankingPT blog. The revised text was published in Sanity, but the live website still showed the old wording and was missing a new link.&lt;/p&gt;

&lt;p&gt;The article’s URL returned 200. There was no obvious error page. The content was simply out of date.&lt;/p&gt;

&lt;p&gt;The missing step&lt;/p&gt;

&lt;p&gt;Our site uses Sanity for content, Gatsby to generate pages, and Netlify to host them. Publishing in Sanity updates the content available to Gatsby. It does not, by itself, replace the HTML that Gatsby generated during the previous production build.&lt;/p&gt;

&lt;p&gt;In development, our Gatsby configuration watches for Sanity changes. That watch mode is disabled for production. The live article therefore keeps showing the version captured by the last build until a new build runs.&lt;/p&gt;

&lt;p&gt;The sequence we needed was:&lt;/p&gt;

&lt;p&gt;Publish the article in Sanity.&lt;/p&gt;

&lt;p&gt;Run a new production build that reads the published content.&lt;/p&gt;

&lt;p&gt;Publish the resulting Gatsby pages through Netlify.&lt;/p&gt;

&lt;p&gt;We had completed step one. Nothing was triggering step two.&lt;/p&gt;

&lt;p&gt;How we diagnosed it&lt;/p&gt;

&lt;p&gt;First, we checked the published Sanity document. It contained the revised wording and the new link, so the edit had been saved.&lt;/p&gt;

&lt;p&gt;Next, we checked Netlify’s deploy history. No build had started after the Sanity publication. That explained why the live page still contained the old text: the production site was serving HTML generated before the edit.&lt;/p&gt;

&lt;p&gt;Finally, we triggered a new production build from our main branch. The Git commit was the same as in the previous build; the content Gatsby fetched from Sanity was newer. Once that deploy was published, the live article showed the corrected wording and link.&lt;/p&gt;

&lt;p&gt;This was a useful distinction: a successful CMS publication and a successful website publication are two separate events in a static site workflow.&lt;/p&gt;

&lt;p&gt;What we’ll improve&lt;/p&gt;

&lt;p&gt;For now, we know to check the production deploy after publishing an article. Longer term, we want a reliable trigger for rebuilding the site when relevant content is published.&lt;/p&gt;

&lt;p&gt;A Sanity webhook and a Netlify build hook are a common way to connect those events. We haven’t configured that automation yet. Our Netlify setup also enforces production deployments through the Git branch, so we need to verify that any proposed trigger works with that rule before relying on it.&lt;/p&gt;

&lt;p&gt;Whatever trigger we choose, the final check will be the live page: confirm the new text appears, the links work, and the production deploy completed successfully.&lt;/p&gt;

&lt;p&gt;Takeaway&lt;/p&gt;

&lt;p&gt;If Sanity says “published” but a Gatsby page still shows old content, check when the last production build ran. A working page and a 200 response tell you the page is available; they don’t tell you it contains the latest CMS content.&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>sanity</category>
      <category>netlify</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
