Skip to content

Commit 3fc7c6e

Browse files
nsjamesbenface
andauthored
Token API docs optimization (#1054)
* optimized tokenapi quickstart * remove bun lock * reorder sidebar to highlight most popular routes * realign translations to english * add sdk for typescript * clarify api key locations * Run `pnpm check:fix` * Replace `CodeTabs` with GDS’s `CodeBlock.Tabs` --------- Co-authored-by: benface <benoit.rouleau@icloud.com>
1 parent 21e14a3 commit 3fc7c6e

File tree

199 files changed

+2637
-1637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+2637
-1637
lines changed

nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ http {
169169
rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent;
170170
rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent;
171171
rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/mcp/cline/$ $scheme://$http_host/docs/$1/ai-suite/token-api-mcp/ permanent;
172+
rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/endpoint-pricing/$ $scheme://$http_host/docs/$1/token-api/endpoints/pricing/ permanent;
172173
# Temporary redirects (302)
173174
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/subgraphs/querying/graph-client/README/ redirect;
174175
rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/README/ redirect;

website/src/components/CodeBlock.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,25 @@ export const CodeBlock = ({ className, children, ...props }: CodeBlockProps) =>
2828
<ExperimentalCodeBlock
2929
language={language as ExperimentalCodeBlockProps['language']}
3030
lineNumbers={lineCount > 1}
31-
className={classNames(['graph-docs-not-markdown --:my-8 --:last:mb-0 -:is-[li>*]:my-4', className])}
31+
className={classNames([
32+
`graph-docs-not-markdown
33+
--:not-in-group/code-block-tabs:my-8
34+
--:not-in-group/code-block-tabs:last:mb-0
35+
-:not-in-group/code-block-tabs:is-[li>*]:my-4`,
36+
className,
37+
])}
3238
{...(props as ComponentProps<'div'>)}
3339
>
3440
{code}
3541
</ExperimentalCodeBlock>
3642
)
3743
}
44+
45+
export const CodeBlockTabs = ({ className, ...props }: ComponentProps<typeof ExperimentalCodeBlock.Tabs>) => {
46+
return (
47+
<ExperimentalCodeBlock.Tabs
48+
className={classNames(['graph-docs-not-markdown --my-8 -:is-[li>*]:my-4', className])}
49+
{...props}
50+
/>
51+
)
52+
}

website/src/layout/Layout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import {
5656
import {
5757
Callout,
5858
CodeBlock,
59+
CodeBlockTabs,
5960
DocSearch,
6061
Heading,
6162
Image,
@@ -610,6 +611,8 @@ export default function Layout({ pageOpts, children }: NextraThemeLayoutProps<Fr
610611
img: ImageWrapper,
611612
// TODO: Fix "[Shiki] X instances have been created. Shiki is supposed to be used as a singleton" warnings
612613
pre: CodeBlock,
614+
CodeBlock,
615+
CodeBlockTabs,
613616
// TODO: Build and use `ExperimentalTable`
614617
table: Table,
615618
VideoEmbed,

website/src/pages/ar/token-api/_meta.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import titles from './_meta-titles.json'
22

33
export default {
44
'quick-start': '',
5+
'svm-tokens': titles['svm-tokens'] ?? '',
6+
'svm-dexs': titles['svm-dexs'] ?? '',
57
'evm-tokens': titles['evm-tokens'] ?? '',
68
'evm-dexs': titles['evm-dexs'] ?? '',
79
'evm-nfts': titles['evm-nfts'] ?? '',
8-
'svm-tokens': titles['svm-tokens'] ?? '',
9-
'svm-dexs': titles['svm-dexs'] ?? '',
1010
'tvm-tokens': titles['tvm-tokens'] ?? '',
1111
'tvm-dexs': titles['tvm-dexs'] ?? '',
1212
monitoring: titles['monitoring'] ?? '',
13-
'endpoint-pricing': '',
13+
endpoints: titles['endpoints'] ?? '',
1414
guides: titles['guides'] ?? '',
1515
faq: '',
1616
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
pricing: '',
3+
support: '',
4+
}

website/src/pages/en/token-api/endpoint-pricing.mdx renamed to website/src/pages/ar/token-api/endpoints/pricing.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Endpoint Pricing
3+
sidebarTitle: Pricing
34
---
45

56
## Pricing Tiers
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Endpoint Feature Matrix
3+
sidebarTitle: Support Matrix
4+
---
5+
6+
import { Check } from '@edgeandnode/gds/icons'
7+
8+
## Chain and Feature Support
9+
10+
| Network | Tokens | Swaps | NFTs |
11+
| ----------------- | :-----------------------: | :-----------------------: | :-----------------------: |
12+
| Ethereum Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
13+
| BSC Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
14+
| Base Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
15+
| Unichain Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
16+
| Arbitrum One | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
17+
| Optimism Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
18+
| Polygon Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
19+
| Avalanche C-Chain | <Check alt="Supported" /> | <Check alt="Supported" /> | <Check alt="Supported" /> |
20+
| Solana Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | ❌ Unsupported |
21+
| Tron Mainnet | <Check alt="Supported" /> | <Check alt="Supported" /> | ❌ Unsupported |
22+
23+
A full list of chain support for The Graph services can be found [here](/supported-networks/).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
2+
swaps: '',
23
dexes: '',
34
'pools-ohlc': '',
45
pools: '',
5-
swaps: '',
66
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default {
2-
tokens: '',
32
transfers: '',
3+
holders: '',
4+
tokens: '',
45
balances: '',
56
'balances-native': '',
67
'balances-historical': '',
7-
holders: '',
88
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
2+
swaps: '',
23
dexes: '',
34
'pools-ohlc': '',
45
pools: '',
5-
swaps: '',
66
}

0 commit comments

Comments
 (0)