Skip to content

Commit 9efcc0c

Browse files
authored
fix(www): remove double redirect & link preload headers (#26545)
1 parent b86d3ff commit 9efcc0c

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

www/cloud-redirects.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
# slugified tags on .org had dashes that WP doesn't include
22
- fromPath: /blog/tags/a-11-y/
3-
toPath: https://gatsbyjs.com/blog/tags/a11y/
3+
toPath: https://www.gatsbyjs.com/blog/tags/a11y/
44
- fromPath: /blog/tags/i-18-n/
5-
toPath: https://gatsbyjs.com/blog/tags/i18n/
5+
toPath: https://www.gatsbyjs.com/blog/tags/i18n/
66
- fromPath: /blog/tags/s-3/
7-
toPath: https://gatsbyjs.com/blog/tags/s3/
7+
toPath: https://www.gatsbyjs.com/blog/tags/s3/
88
- fromPath: /blog/tags/v-1/
9-
toPath: https://gatsbyjs.com/blog/tags/v1/
9+
toPath: https://www.gatsbyjs.com/blog/tags/v1/
1010
- fromPath: /blog/tags/v-2/
11-
toPath: https://gatsbyjs.com/blog/tags/v2/
11+
toPath: https://www.gatsbyjs.com/blog/tags/v2/
1212
# 100days posts lived under another folder, WP doesn't support "-" in slugs
1313
- fromPath: /blog/100days/accessibility/
14-
toPath: https://gatsbyjs.com/blog/100days-accessibility/
14+
toPath: https://www.gatsbyjs.com/blog/100days-accessibility/
1515
- fromPath: /blog/100days/apps/
16-
toPath: https://gatsbyjs.com/blog/100days-apps/
16+
toPath: https://www.gatsbyjs.com/blog/100days-apps/
1717
- fromPath: /blog/100days/cms/
18-
toPath: https://gatsbyjs.com/blog/100days-cms/
18+
toPath: https://www.gatsbyjs.com/blog/100days-cms/
1919
- fromPath: /blog/100days/comments/
20-
toPath: https://gatsbyjs.com/blog/100days-comments/
20+
toPath: https://www.gatsbyjs.com/blog/100days-comments/
2121
- fromPath: /blog/100days/create-themes/
22-
toPath: https://gatsbyjs.com/blog/100days-create-themes/
22+
toPath: https://www.gatsbyjs.com/blog/100days-create-themes/
2323
- fromPath: /blog/100days/free-hosting/
24-
toPath: https://gatsbyjs.com/blog/100days-free-hosting/
24+
toPath: https://www.gatsbyjs.com/blog/100days-free-hosting/
2525
- fromPath: /blog/100days/gatsby-image/
26-
toPath: https://gatsbyjs.com/blog/100days-gatsby-image/
26+
toPath: https://www.gatsbyjs.com/blog/100days-gatsby-image/
2727
- fromPath: /blog/100days/mdx/
28-
toPath: https://gatsbyjs.com/blog/100days-mdx/
28+
toPath: https://www.gatsbyjs.com/blog/100days-mdx/
2929
- fromPath: /blog/100days/performance/
30-
toPath: https://gatsbyjs.com/blog/100days-performance/
30+
toPath: https://www.gatsbyjs.com/blog/100days-performance/
3131
- fromPath: /blog/100days/pwa/
32-
toPath: https://gatsbyjs.com/blog/100days-pwa/
32+
toPath: https://www.gatsbyjs.com/blog/100days-pwa/
3333
- fromPath: /blog/100days/react-component/
34-
toPath: https://gatsbyjs.com/blog/100days-react-component/
34+
toPath: https://www.gatsbyjs.com/blog/100days-react-component/
3535
- fromPath: /blog/100days/seo/
36-
toPath: https://gatsbyjs.com/blog/100days-seo/
36+
toPath: https://www.gatsbyjs.com/blog/100days-seo/
3737
- fromPath: /blog/100days/serverless/
38-
toPath: https://gatsbyjs.com/blog/100days-serverless/
38+
toPath: https://www.gatsbyjs.com/blog/100days-serverless/
3939
- fromPath: /blog/100days/start-blog/
40-
toPath: https://gatsbyjs.com/blog/100days-start-blog/
40+
toPath: https://www.gatsbyjs.com/blog/100days-start-blog/
4141
- fromPath: /blog/100days/use-themes/
42-
toPath: https://gatsbyjs.com/blog/100days-use-themes/
42+
toPath: https://www.gatsbyjs.com/blog/100days-use-themes/
4343
# sunsetting /ecosystem, directing to plugins makes sense
4444
- fromPath: /ecosystem
45-
toPath: https://gatsbyjs.com/plugins/
45+
toPath: https://www.gatsbyjs.com/plugins/

www/gatsby-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ module.exports = {
342342
headers.splice(1, 1)
343343
}
344344

345-
return headers
345+
return headers.filter(
346+
header => !header.toLowerCase().includes(`link:`)
347+
)
346348
},
347349
},
348350
},

www/gatsby-node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ exports.createPages = async helpers => {
151151
// splat redirects
152152
await createRedirect({
153153
fromPath: `/packages/*`,
154-
toPath: `https://gatsbyjs.com/plugins/:splat`,
154+
toPath: `https://www.gatsbyjs.com/plugins/:splat`,
155155
isPermanent: true,
156156
force: true,
157157
})
158158

159159
await createRedirect({
160160
fromPath: `/creators/*`,
161-
toPath: `https://gatsbyjs.com/partner/`,
161+
toPath: `https://www.gatsbyjs.com/partner/`,
162162
isPermanent: true,
163163
force: true,
164164
})
@@ -167,7 +167,7 @@ exports.createPages = async helpers => {
167167
// this needs to be the last redirect created or it'll match everything
168168
await createRedirect({
169169
fromPath: `/*`,
170-
toPath: `https://gatsbyjs.com/:splat`,
170+
toPath: `https://www.gatsbyjs.com/:splat`,
171171
isPermanent: true,
172172
force: true,
173173
})

www/src/components/shared/cloud-callout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const CloudCallout = ({ narrow = true, children }) => (
4646
<CloudCalloutRoot narrow={narrow}>
4747
<CloudText>{children}</CloudText>
4848
Try it on{` `}
49-
<OutboundLink href="https://gatsbyjs.com">Gatsby Cloud</OutboundLink>!
49+
<OutboundLink href="https://www.gatsbyjs.com">Gatsby Cloud</OutboundLink>!
5050
<Circles>
5151
<CirclesOrnament />
5252
</Circles>

0 commit comments

Comments
 (0)