{"id":14971039,"url":"https://github.com/netlify/netlify-plugin-gatsby","last_synced_at":"2025-05-16T03:05:34.795Z","repository":{"id":36978540,"uuid":"368219145","full_name":"netlify/netlify-plugin-gatsby","owner":"netlify","description":"A build plugin to integrate Gatsby seamlessly with Netlify","archived":false,"fork":false,"pushed_at":"2025-05-14T18:58:40.000Z","size":336438,"stargazers_count":97,"open_issues_count":21,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-15T20:14:51.940Z","etag":null,"topics":["gatsby","gatsbyjs","javascript","netlify","netlify-plugin","production"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@netlify/plugin-gatsby","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-17T14:39:14.000Z","updated_at":"2025-05-14T19:50:17.000Z","dependencies_parsed_at":"2023-10-13T01:32:29.430Z","dependency_job_id":"c5bef3ee-447a-426a-aafd-84b9a1302398","html_url":"https://github.com/netlify/netlify-plugin-gatsby","commit_stats":{"total_commits":622,"total_committers":27,"mean_commits":"23.037037037037038","dds":0.3713826366559485,"last_synced_commit":"ca9a47880efe8993030070014daf65bb53aeb8fb"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":"netlify/build-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fnetlify-plugin-gatsby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fnetlify-plugin-gatsby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fnetlify-plugin-gatsby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Fnetlify-plugin-gatsby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlify","download_url":"https://codeload.github.com/netlify/netlify-plugin-gatsby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gatsby","gatsbyjs","javascript","netlify","netlify-plugin","production"],"created_at":"2024-09-24T13:44:37.941Z","updated_at":"2025-05-16T03:05:29.777Z","avatar_url":"https://github.com/netlify.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Netlify Build plugin Gatsby – Run Gatsby seamlessly on Netlify](netlify-gatsby-plugin.png)\n\n# Essential Gatsby Plugin\n\nThe Essential Gatsby build plugin enables caching of builds, SSR and DSG\n[render modes](https://v4.gatsbyjs.com/docs/conceptual/rendering-options/),\nimage CDN and Gatsby Functions. It is installed automatically for all new Gatsby\nsites.\n\n\u003e **Note:**\n\u003e\n\u003e - Essential Gatsby includes functionality from the\n\u003e   [Gatsby Cache build plugin](https://github.com/jlengstorf/netlify-plugin-gatsby-cache).\n\u003e   If you already have the Gatsby Cache plugin installed on your Netlify site,\n\u003e   you should\n\u003e   [remove it](https://docs.netlify.com/configure-builds/build-plugins/#remove-a-plugin)\n\u003e   before installing this plugin.\n\u003e - Essential Gatsby is not compatible with the Gatsby community plugin\n\u003e   [gatsby-plugin-netlify-cache](https://www.gatsbyjs.com/plugins/gatsby-plugin-netlify-cache/).\n\n## Installation\n\nGatsby sites need two plugins to support all features.\n\n1. The Netlify build plugin, called \"Essential Gatsby\" or\n   `@netlify/plugin-gatsby`. This is installed automatically for all Gatsby\n   sites deployed to Netlify.\n2. The Gatsby plugin `gatsby-plugin-netlify`. This needs to be manually\n   installed.\n\n### Installing the Netlify build plugin\n\nNew Gatsby sites on Netlify automatically install the Essential Gatsby build\nplugin. You can confirm this in the build logs. If you need to install it\nmanually, you have two options:\n\n- [The Netlify UI](https://docs.netlify.com/configure-builds/build-plugins/#ui-installation).\n  Here, you can search for \"Essential Gatsby\" and install the plugin.\n\n- [File-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation).\n  You can install the plugin as `@netlify/plugin-gatsby` in your `netlify.toml`\n  file.\n\n### Install the Gatsby Plugin\n\nYou should also install the Gatsby plugin\n[gatsby-plugin-netlify](https://www.gatsbyjs.org/plugins/gatsby-plugin-netlify/).\nThis is required for SSR and DSG pages, and adds support for Gatsby redirects and asset\ncaching rules:\n\n1. Add the package as a dependency:\n\n```shell\nnpm install -D gatsby-plugin-netlify\n```\n\n2. Then add the following to your `gatsby-config.js` file:\n\n```js\nmodule.exports = {\n  plugins: ['gatsby-plugin-netlify'],\n}\n```\n\nSee\n[the gatsby-plugin-netlify docs](https://github.com/netlify/gatsby-plugin-netlify/)\nfor more information, including optional plugin configuration.\n\n### Disabling Netlify functions\n\nIn order to support Gatsby Functions and DSG and SSR render modes, this plugin\ngenerates four Netlify Functions called `__api`, `__ssr`, `__dsg` and `_ipx`. If\nyou are not using any of these modes, then you can disable the creation of these\nfunctions. If you are using the latest version of `gatsby-plugin-netlify` then\nthis will be handled automatically, disabling functions if the site has no\nGatsby Functions, or DSG/SSR pages. Otherwise, you can do this manually by\nsetting the environment variable `NETLIFY_SKIP_GATSBY_FUNCTIONS` to `true`. Be\naware that if you do this, any DSG or SSR pages will not work, and nor will any\nGatsby Functions or the remote image CDN.\n\n### Gatsby Image CDN\n\nGatsby includes beta support for deferred image resizing using a CDN. Netlify\nincludes full support for Image CDN on all plans. For details on how to enable\nit, see\n[the image CDN docs](https://github.com/netlify/netlify-plugin-gatsby/blob/main/docs/image-cdn.md).\n\n### Caveats\n\nCurrently you cannot use `StaticImage` or `gatsby-transformer-sharp` in SSR or\nDSG pages. Support for Gatsby Image CDN is coming soon. The best workaround is\nto use an image CDN such as\n[Cloudinary](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-cloudinary-image-service/)\nor [imgix](https://github.com/imgix/gatsby) to host your images. This will give\nyou faster builds and rendering too.\n\n### Local development\n\nWhen developing Gatsby Functions it is usually easier to use the built-in\n`gatsby develop` functions server. However if you want to try the Netlify\nfunctions wrapper it will run via `netlify dev`. You should be sure to run\n`netlify build` first, so that the wrappers are generated and the functions\ncopied across.\n\n## Netlify Background and Scheduled Functions\n\nIn order to use [Netlify Background](https://docs.netlify.com/functions/background-functions/) or [Netlify Scheduled](https://docs.netlify.com/netlify-labs/experimental-features/scheduled-functions/) Functions in your Gatsby project, you will need to create a `netlify/functions` directory at the root of the project, and put the Functions in there.\n\nOnce that's completed, the Background or Scheduled Function can be invoked like an ordinary Gatsby function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fnetlify-plugin-gatsby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlify%2Fnetlify-plugin-gatsby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Fnetlify-plugin-gatsby/lists"}