Sharding SSG sites in Netlify for performance - a test
This example site is intended as a proof of concept for content sharding and using an intra-build cache on Netlify.
To get your own instance of this example site cloned and deploying to Netlify very quickly, just click the button below and follow the instructions.
Good question. Here's what it will do...
Generating anf deploying the site happens automatically following any push to your site repository (once this is configure as a new site in Netlify via the steps above).
You can target which part of the site to rebuild and deploy by specifying that in the netlify.toml
file when you push. The options are:
command = "yarn run build:site"
to rebuild the entire sitecommand = "yarn run build:news"
to rebuild just the news section of site and use cached assets from the previous build for everything elsecommand = "yarn run build:docs"
to rebuild just the docs section of site and use cached assets from the previous build for everything elseA full site build must have taken place at some point on order for any of the partial builds to subsequently be successful.