⚠ Work-in-progress.
Same idea as gatsby-plugin-netlify-cache
, but doesn't hook directly into Gatsby. It wraps around build command instead, i.e you'd run netlify-ssg-cache
instead of gatsby build
.
I wrote a plugin that support remote images in markdown. It doesn't work with gatsby-plugin-netlify-cache
: Gatsby invalidates the cache on bootstrap. See the discussion here for more info.
Install
yarn add netlify-ssg-cache@alpha
In your package.json:
{
"scripts": {
"build:netlify": "SSG=gatsby netlify-ssg-cache",
"build": "gatsby build",
}
}
yarn build:netlify
as your build script on Netlify.build
script. This package will just run your build command.