Skip to content

Commit 98509d6

Browse files
committed
And for build website
1 parent 2ba5a9c commit 98509d6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gatsby-browser.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ function checkRedirect(inPath) {
1010
window.location.replace(`https://postgraphile.org${parts.join("/")}`);
1111
}
1212
}
13+
if (path === "/graphile-build" || path.startsWith("/graphile-build/")) {
14+
const parts = path.split("/");
15+
if (!parts[2]) {
16+
window.location.replace(`https://build.graphile.org`);
17+
} else {
18+
if (parts[2] === "introduction") parts.length = 2;
19+
parts.splice(2, 0, "4");
20+
window.location.replace(`https://build.graphile.org${parts.join("/")}`);
21+
}
22+
}
1323
}
1424

1525
exports.onRouteUpdate = ({ location, prevLocation }) => {

0 commit comments

Comments
 (0)