Skip to content

Commit

Permalink
Merge pull request #552 from onflow/nialexsan/smart-contracts-redirect
Browse files Browse the repository at this point in the history
redirects
  • Loading branch information
nialexsan authored Feb 8, 2024
2 parents 7b86454 + 5ec37e3 commit 36e633e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/build/basics/accounts.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
sidebar_position: 2
title: Accounts
---

:::info

Are you a EVM developer looking for information about Accounts on FlowEVM? If so, check out the EVM specific documentation [here](../../evm/Build/accounts.md)
Are you an EVM developer looking for information about Accounts on FlowEVM? If so, check out the EVM specific documentation [here](../../evm/Build/accounts.md)

:::

Expand Down
3 changes: 2 additions & 1 deletion docs/build/basics/fees.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
sidebar_position: 5
title: Fees
---

:::info

Are you a EVM developer looking for information about Accounts on FlowEVM? If so, check out the EVM specific documentation [here](../../evm/Build/fees.md)
Are you an EVM developer looking for information about Accounts on FlowEVM? If so, check out the EVM specific documentation [here](../../evm/Build/fees.md)

:::

Expand Down
13 changes: 13 additions & 0 deletions docs/build/basics/smart-contracts.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
slug: /build/basics/smart-contracts
redirect: /build/smart-contracts/overview
title: Smart Contracts
---

# Smart Contracts

Go to [Smart Contracts](../../build/smart-contracts/overview.md)

import {Redirect} from '@docusaurus/router';

<Redirect to="/build/smart-contracts/overview" />;
9 changes: 7 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,19 @@ const config = {
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/build/smart-contracts/overview',
from: '/build/basics/smart-contracts',
},
],
createRedirects(existingPath) {
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
7 changes: 6 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,12 @@
},
{
"source": "/community-resources/:path*",
"destination": "/ecosystem/:path*"
"destination": "/ecosystem/:path*",
"permanent": true
},
{
"source": "/build/basics/smart-contracts",
"destination": "/build/smart-contracts/overview"
}
]
}

0 comments on commit 36e633e

Please sign in to comment.