Skip to content

Commit 9b1f647

Browse files
committed
Update all CardList links to absolute and add guidance
1 parent 2940a54 commit 9b1f647

File tree

28 files changed

+96
-69
lines changed

28 files changed

+96
-69
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ To contribute changes:
7171

7272
> **Notes:**
7373
>
74-
> - All documentation content is located in the `wallet`, `sdk`, `snaps`, `services`, and
75-
> `developer-tools` directories.
76-
> - If you add a new documentation page, edit `wallet-sidebar.js`, `sdk-sidebar.js`, `snaps-sidebar.js`,
77-
> `services-sidebar.js`, or `dashboard-sidebar.js` to add the page to the
74+
> - All documentation content is located in the `sdk`, `wallet`, `embedded-wallets`, `smart-accounts-kit`, `services`,
75+
> `developer-tools`, `snaps`, and `src/pages` directories.
76+
> - If you add a new documentation page, edit `sdk-sidebar.js`, `wallet-sidebar.js`, `ew-sidebar.js`, `gator-sidebar.js`,
77+
> `services-sidebar.js`, `dashboard-sidebar.js`, or `snaps-sidebar.js` to add the page to the
7878
> [sidebar](https://docs-template.consensys.io/create/configure-docusaurus#sidebar).
7979
> - If you delete, rename, or move a documentation file, add a
8080
> [redirect](https://vercel.com/docs/edge-network/redirects#configuration-redirects).
@@ -116,10 +116,37 @@ To contribute changes:
116116

117117
Refer to the [Consensys documentation style guide](https://docs-template.consensys.net/contribute/style-guide).
118118

119+
## Format links
120+
121+
Most links in the Markdown pages use *relative file paths*, for example:
122+
123+
```md title="Relative file path in Smart Accounts Kit docs"
124+
You can enable users to create a [MetaMask smart account](../../concepts/smart-accounts.md) directly in your dapp.
125+
```
126+
127+
However, when linking between different product sections or using the `CardList` component, use *absolute URL paths*. For example:
128+
129+
```md title="Absolute URL path in Wallet API docs"
130+
When a dapp requests to submit a batch of transactions atomically, MetaMask may prompt users to upgrade their externally owned account (EOA) to a [MetaMask smart account](/smart-accounts-kit/concepts/smart-accounts).
131+
```
132+
133+
```md title="Absolute URL path in Snaps docs"
134+
<CardList
135+
items={[
136+
{
137+
href: '/snaps/learn/about-snaps',
138+
title: 'About Snaps',
139+
description: 'See a high-level, technical overview of the Snaps system.',
140+
},
141+
...
142+
]}
143+
/>
144+
```
145+
119146
## Add images
120147

121-
All images are located in the `wallet/assets`, `sdk/_assets`, `snaps/assets`, `services/images`, and
122-
`developer-tools/images` directories.
148+
All images are located in the `sdk/_assets`, `wallet/assets`, `smart-accounts-kit/assets`, `services/images`,
149+
`developer-tools/images`, `snaps/assets`, and `static/img` directories.
123150
When adding a new image, such as a screenshot or diagram, make sure the image has a white or
124151
`#1b1b1d` color background in order for it to be compatible with the site's light and dark modes.
125152

developer-tools/dashboard/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ Select one of the cards below to learn more about using the dashboard.
2424
<CardList
2525
items={[
2626
{
27-
href: "./get-started/create-api",
27+
href: "/developer-tools/dashboard/get-started/create-api",
2828
title: "Create an API key",
2929
description: "Learn how to create an API key that allows you to make API calls."
3030
},
3131
{
32-
href: "./how-to/secure-an-api/api-key",
32+
href: "/developer-tools/dashboard/how-to/secure-an-api/api-key",
3333
title: "Secure your API key",
3434
description: "Learn how to secure your API key to avoid unwanted costs and unauthorized access."
3535
},
3636
{
37-
href: "./how-to/dashboard-stats",
37+
href: "/developer-tools/dashboard/how-to/dashboard-stats",
3838
title: "Monitor API call stats",
3939
description: "Learn how to use the dashboard to view API call stats."
4040
}

gator_versioned_docs/version-0.1.0/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Delegation is powered by the [Delegation Framework](https://github.com/metamask/
2222

2323
<CardList items={[
2424
{
25-
href: "get-started/smart-account-quickstart",
25+
href: "/smart-accounts-kit/get-started/smart-account-quickstart",
2626
title: "Smart account quickstart",
2727
description: "Create a MetaMask smart account and send a user operation.",
2828
},
2929
{
30-
href: "guides/delegation/execute-on-smart-accounts-behalf",
30+
href: "/smart-accounts-kit/guides/delegation/execute-on-smart-accounts-behalf",
3131
title: "Delegation guide",
3232
description: "Execute on the behalf of MetaMask Smart Accounts.",
3333
}
@@ -40,7 +40,7 @@ Advanced Permissions allow you to perform executions on the behalf of MetaMask u
4040

4141
<CardList items={[
4242
{
43-
href: "guides/advanced-permissions/execute-on-metamask-users-behalf",
43+
href: "/smart-accounts-kit/guides/advanced-permissions/execute-on-metamask-users-behalf",
4444
title: "Advanced Permissions (ERC-7715) guide",
4545
description: "Execute on the behalf of MetaMask users.",
4646
}
@@ -54,12 +54,12 @@ Check out the following documentation from these partners:
5454
<CardList
5555
items={[
5656
{
57-
href: "get-started/use-scaffold-eth/smart-accounts",
57+
href: "/smart-accounts-kit/get-started/use-scaffold-eth/smart-accounts",
5858
title: "Smart Accounts with Scaffold-ETH 2",
5959
description: "Install the MetaMask Smart Accounts extension for Scaffold-ETH 2.",
6060
},
6161
{
62-
href: "get-started/use-scaffold-eth/advanced-permissions",
62+
href: "/smart-accounts-kit/get-started/use-scaffold-eth/advanced-permissions",
6363
title: "Advanced Permissions with Scaffold-ETH 2",
6464
description: "Install the MetaMask Advanced Permissions (ERC-7715) extension for Scaffold-ETH 2.",
6565
},

gator_versioned_docs/version-0.13.0/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ Check out the following guides to get started with the MetaMask Delegation Toolk
4343
<CardList
4444
items={[
4545
{
46-
href: "get-started/install",
46+
href: "/smart-accounts-kit/0.13.0/get-started/install",
4747
title: "Install and set up",
4848
description: "Install and set up the MetaMask Delegation Toolkit.",
4949
},
5050
{
51-
href: "get-started/smart-account-quickstart",
51+
href: "/smart-accounts-kit/0.13.0/get-started/smart-account-quickstart",
5252
title: "MetaMask Smart Accounts quickstart",
5353
description: "Create a MetaMask smart account and send a user operation.",
5454
},
5555
{
56-
href: "get-started/smart-account-quickstart/eip7702",
56+
href: "/smart-accounts-kit/0.13.0/get-started/smart-account-quickstart/eip7702",
5757
title: "EIP-7702 quickstart",
5858
description: "Upgrade an externally owned account to a smart account.",
5959
},
6060
{
61-
href: "get-started/use-the-cli",
61+
href: "/smart-accounts-kit/0.13.0/get-started/use-the-cli",
6262
title: "Use the CLI",
6363
description: "Use the Delegation Toolkit CLI to bootstrap a project.",
6464
}

services/reference/arbitrum/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ Select one of the following options to get started with the Arbitrum network:
3333
<CardList
3434
items={[
3535
{
36-
href: "./quickstart",
36+
href: "/services/reference/arbitrum/quickstart",
3737
title: "Quickstart",
3838
description: "Learn how to quickly connect to Arbitrum and make calls to the network."
3939
},
4040
{
41-
href: "./json-rpc-methods",
41+
href: "/services/reference/arbitrum/json-rpc-methods",
4242
title: "JSON-RPC APIs",
4343
description: "View the APIs available for communicating with the Arbitrum network."
4444
},

services/reference/avalanche-c-chain/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ Select one of the following options to get started with the Avalanche C-Chain ne
3939
<CardList
4040
items={[
4141
{
42-
href: "./quickstart",
42+
href: "/services/reference/avalanche-c-chain/quickstart",
4343
title: "Quickstart",
4444
description: "Learn how to quickly connect to Avalanche C-Chain and make calls to the network."
4545
},
4646
{
47-
href: "./json-rpc-methods",
47+
href: "/services/reference/avalanche-c-chain/json-rpc-methods",
4848
title: "JSON-RPC APIs",
4949
description: "View the APIs available for communicating with the Avalanche C-Chain network."
5050
},

services/reference/base/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Select an option below to get started with the Base network.
2525
<CardList
2626
items={[
2727
{
28-
href: "./quickstart",
28+
href: "/services/reference/base/quickstart",
2929
title: "Quickstart",
3030
description: "Learn how to quickly connect and make calls to the Base network."
3131
},
3232
{
33-
href: "./json-rpc-methods",
33+
href: "/services/reference/base/json-rpc-methods",
3434
title: "JSON-RPC APIs",
3535
description: "View the APIs available for communicating with the Base network."
3636
},

services/reference/blast/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ Select one of the following options to get started with the Blast network:
3232
<CardList
3333
items={[
3434
{
35-
href: "./quickstart",
35+
href: "/services/reference/blast/quickstart",
3636
title: "Quickstart",
3737
description: "Learn how to quickly connect and make calls to the Blast network."
3838
},
3939
{
40-
href: "./json-rpc-methods",
40+
href: "/services/reference/blast/json-rpc-methods",
4141
title: "JSON-RPC APIs",
4242
description: "View the APIs available for communicating with the Blast network."
4343
},

services/reference/bnb-smart-chain/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Select an option below to get started with the BSC network.
3636
<CardList
3737
items={[
3838
{
39-
href: "./quickstart",
39+
href: "/services/reference/bnb-smart-chain/quickstart",
4040
title: "Quickstart",
4141
description: "Learn how to quickly connect and make calls to the BNB Smart Chain network."
4242
},
4343
{
44-
href: "./json-rpc-methods",
44+
href: "/services/reference/bnb-smart-chain/json-rpc-methods",
4545
title: "JSON-RPC APIs",
4646
description: "View the APIs available for communicating with the BNB Smart Chain network."
4747
},

services/reference/celo/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Select an option below to get started with the Celo network.
1919
<CardList
2020
items={[
2121
{
22-
href: "./quickstart",
22+
href: "/services/reference/celo/quickstart",
2323
title: "Quickstart",
2424
description: "Learn how to quickly connect and make calls to the Celo network."
2525
},
2626
{
27-
href: "./json-rpc-methods",
27+
href: "/services/reference/celo/json-rpc-methods",
2828
title: "JSON-RPC APIs",
2929
description: "View the APIs available for communicating with the Celo network."
3030
},

0 commit comments

Comments
 (0)