Closed megazear7 closed 5 years ago
I have added in a more fine tuned build process which looks for changes to blog content. If the content of a blog article is changed only that blog page and the blog listing pages are changed. Otherwise the entire build is performed. I opted against doing a fine tuned Github based build process because the OOTB github netlify integration does not provide that information and I would rather rely on the OOTB integration than have a github build hook that has to reimplement already provided features.
This is good enough for now. More could be done though.
The
./build.js
file should use the information passed by the Github and Contentful build hooks in order to only build the files necessary.Github Web Hook
Currently it looks like the Github passes no information in the web hook, so that might need updated or might not be possible. For example if no changes under
/src
are changed in a commit, then no build is necessary.Contentful Web Hook
The Contentful web hook passes along information such as the JSON listed below. Blog posts tagged with the orisonjs-blog tag should produce a build with a generate path of
/blog
. Other types of Contentful updates can produce builds with vary generate paths in order to only rebuild what is necessary.