You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -68,7 +71,7 @@ This way you can store it in one place, and pull it whenever you need it. If you
68
71
69
72
See a full description and sample usage in [Gatsby.js Tutorial Part Four](/docs/tutorial/part-4/#data-in-gatsby).
70
73
71
-
## Plugins
74
+
## plugins
72
75
73
76
Plugins are Node.js packages that implement Gatsby APIs. The config file accepts an array of plugins. Some plugins may need only to be listed by name, while others may take options (see the docs for individual plugins).
74
77
@@ -135,7 +138,7 @@ module.exports = {
135
138
136
139
See more about [Plugins](/docs/plugins/) for more on utilizing plugins, and to see available official and community plugins.
137
140
138
-
## Flags
141
+
## flags
139
142
140
143
Flags let sites enable experimental or upcoming changes that are still in testing or waiting for the next major release.
141
144
@@ -161,7 +164,17 @@ module.exports = {
161
164
162
165
See more about [Adding a Path Prefix](/docs/how-to/previews-deploys-hosting/path-prefix/).
163
166
164
-
## Polyfill
167
+
## trailingSlash
168
+
169
+
Configures the creation of URLs and whether to remove, append, or ignore trailing slashes.
170
+
171
+
-`always`: Always add trailing slashes to each URL, e.g. `/x` to `/x/`.
172
+
-`never`: Remove all trailing slashes on each URL, e.g. `/x/` to `/x`.
173
+
-`ignore`: Don't automatically modify the URL
174
+
175
+
Until Gatsby v4 it'll be set to `legacy` by default, in Gatsby v5 the default mode will be `always`. Gatsby Cloud automatically handles and supports the `trailingSlash` option, any other hosting provider (or if you're managing this on your own) should follow the "Redirects, and expected behavior from the hosting provider" section on the [initial RFC](https://github.com/gatsbyjs/gatsby/discussions/34205).
176
+
177
+
## polyfill
165
178
166
179
Gatsby uses the ES6 Promise API. Because some browsers don't support this, Gatsby includes a Promise polyfill by default.
This Cypress suite tests the `trailingSlash` option inside `gatsby-config` and its various different settings it takes. When you want to work on it, start watching packages inside the `packages` and start `gatsby-dev-cli` in this E2E test suite.
0 commit comments