news-catalyst / tiny-news-demo

a demo of a tiny publishing system powered by gatsby + google docs
MIT License
1 stars 0 forks source link

Setup incremental builds #7

Open jacqui opened 4 years ago

jacqui commented 4 years ago

Handily enough Netlify emailed me with an actually useful tutorial on this very topic this morning:

https://www.netlify.com/blog/2020/04/23/enable-gatsby-incremental-builds-on-netlify/?utm_campaign=Gatsby+Builds+Promo+Email&utm_content=Gatsby+Builds+Promo+Email&utm_medium=email_action&utm_source=customer.io

TylerFisher commented 4 years ago

Seems simple enough to implement, this line is concerning though:

This means that changes from a supported CMS — Gatsby supports Contentful, Sanity, DatoCMS and CosmicJS at the time of writing with WordPress and Drupal support in alpha — Gatsby will only rebuild the parts of the site affected by the changed data.

Does that mean because we're using Google Docs, we won't be able to take advantage of this?

jacqui commented 4 years ago

Looking into this today as well. I'll test out how and when pages get rebuilt using incremental builds.

jacqui commented 4 years ago

Hrm... so the results are a little mixed.

On the plus side, the incremental build process is a bit faster:

It does, however, rebuild the entire site. I think further investigation is warranted here.

jacqui commented 4 years ago

Looks like the google-docs importer plugin folks are going to work on a caching solution!

https://github.com/cedricdelpoux/gatsby-source-google-docs/issues/60

jacqui commented 4 years ago

No updates yet on the google docs plugin cache, but maybe I should try the gatsby cache netlify plugin (https://app.netlify.com/teams/jacqui/plugins/netlify-plugin-gatsby-cache/install) again now that it's out of beta.

cedricdelpoux commented 4 years ago

Hi @jacqui, it should work now! Please try and let me know