d4rekanguok / netlify-ssg-cache

WIP
1 stars 0 forks source link

Netlify SSG Cache

⚠ 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.

Why

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.

How to use

Install

yarn add netlify-ssg-cache@alpha

In your package.json:

{
  "scripts": {
    "build:netlify": "SSG=gatsby netlify-ssg-cache",
    "build": "gatsby build",
  }
}

What's Next