Skip to content

Commit

Permalink
Update redirects (#1579)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>
Co-authored-by: Alexandra Tran <alexandra.tran@consensys.net>
  • Loading branch information
alexandratran and Alexandra Tran committed Apr 18, 2024
1 parent 2ca9a1f commit 481cd79
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
30 changes: 24 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,14 @@ const config = {
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
from: ["/en/latest", "/en/development", "/latest", "/development"],
to: "/development/public-networks",
},
{
from: "/public-networks/how-to/configuration-file",
to: "/public-networks/how-to/use-configuration-file",
},
{
from: "/private-networks/tutorials/permissioning/onchain",
to: "/private-networks/how-to/use-permissioning/onchain",
Expand All @@ -296,13 +304,23 @@ const config = {
from: "/private-networks/tutorials/permissioning/upgrade-contracts",
to: "/private-networks/how-to/use-permissioning/onchain",
},
/*
{
from: "/public-networks/how-to/configuration-file",
to: "/public-networks/how-to/use-configuration-file",
},
*/
],
createRedirects(existingPath) {
if (existingPath.includes("/development")) {
return [
existingPath.replace("/development", "/en/development"),
existingPath.replace("/development", "/en/latest"),
existingPath.replace("/development", "/latest"),
];
}
if (existingPath.includes("/")) {
return [
existingPath.replace("/", "/en/stable"),
existingPath.replace("/", "/stable"),
];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
],
Expand Down
19 changes: 0 additions & 19 deletions vercel.json

This file was deleted.

0 comments on commit 481cd79

Please sign in to comment.