Report this

What is the reason for this report?

At the moment when the gatsby build occurs, the url of the site does not work

Posted on August 9, 2021

I use Strapi cms and Gatsby, when the content changes, I get a rebuild Gatsby and at the time of rebuild the url site does not work and when the rebuild ends everything starts working correctly. can anyone come across such a problem?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

What you’re encountering is a typical scenario when using Gatsby since it is a static site generator. When you make changes in Strapi, Gatsby needs to rebuild the entire site to reflect those changes. During this rebuild process, your site may temporarily be unavailable or not work as expected.

A solution to this would be to set up a webhook in Strapi to trigger a build in a continuous integration (CI) service like Netlify or CircleCI. This way, your visitors won’t notice the downtime since the existing build won’t change until the rebuild is complete.

For more information on how to accomplish this, you can follow the guide on Strapi’s webhook documentation and Netlify’s step by step guide.

Also, you can visit this DigitalOcean tutorial to learn more about working with Strapi and Gatsby.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.