Skip to content

Commit

Permalink
tweak redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Feb 7, 2024
1 parent 58effc9 commit 2a98361
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,17 +576,19 @@ const config = {
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/build/smart-contracts/overview',
from: '/build/basics/smart-contracts',
},
],
createRedirects(existingPath) {
if (existingPath === '/build/basics/smart-contracts') {
return '/build/smart-contracts/overview';
}
if (existingPath.includes('/cadence')) {
// Redirect from /docs/team/X to /community/X and /docs/support/X to /community/X
return [
existingPath.replace('https://cadence-lang.org/docs', '/cadence'),
];
}
return undefined; // Return a falsy value: no redirect created
return undefined;
},
},
],
Expand Down

0 comments on commit 2a98361

Please sign in to comment.