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.
The article’s URL returned 200. There was no obvious error page. The content was simply out of date.
The missing step
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.
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.
The sequence we needed was:
Publish the article in Sanity.
Run a new production build that reads the published content.
Publish the resulting Gatsby pages through Netlify.
We had completed step one.…