Skip to content

Commit 042bcf2

Browse files
Merge branch 'main' into mk/ga-readme
2 parents 6d345af + 9a52e29 commit 042bcf2

File tree

17 files changed

+2504
-461
lines changed

17 files changed

+2504
-461
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ See
6262
[the gatsby-plugin-netlify docs](https://github.com/netlify/gatsby-plugin-netlify/)
6363
for more information, including optional plugin configuration.
6464

65+
### Disabling Netlify functions
66+
67+
In order to support Gatsby Functions and DSG and SSR render modes, this plugin
68+
generates three Netlify Functions called `__api`, `__ssr` and `__dsg`. If you
69+
are not using any of these modes, then you can disable the creation of these
70+
functions. If you are using the latest version of `gatsby-plugin-netlify` then
71+
this will be handled automatically, disabling functions if the site has no
72+
Gatsby Functions, or DSG/SSR pages. Otherwise, you can do this manually by
73+
setting the environment variable `NETLIFY_SKIP_GATSBY_FUNCTIONS` to `true`. Be
74+
aware that if you do this, any DSG or SSR pages will not work, and nor will any
75+
Gatsby Functions.
76+
6577
### Caveats
6678

6779
Currently you cannot use `StaticImage` or `gatsby-transformer-sharp` in SSR or

demo/netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build]
22
command = "npm run build"
33
publish = "public/"
4-
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../plugin/"
54

5+
# ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../plugin/"
66
[[plugins]]
77
package = "../plugin/src/index.ts"
88

0 commit comments

Comments
 (0)