Skip to content

Commit 26443db

Browse files
committed
update metadata
1 parent a896e05 commit 26443db

File tree

6 files changed

+424
-18
lines changed

6 files changed

+424
-18
lines changed

src/components/CCIP/Chain/Chain.astro

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import CcipLayout from "~/layouts/CcipLayout.astro"
2+
import CcipDirectoryLayout from "~/layouts/CcipDirectoryLayout.astro"
33
import { getEntry, render } from "astro:content"
44
import {
55
Environment,
@@ -14,6 +14,8 @@ import ChainHero from "~/components/CCIP/ChainHero/ChainHero"
1414
import ChainTable from "~/components/CCIP/Tables/ChainTable"
1515
import { getTokenIconUrl } from "~/features/utils"
1616
import ChainTokenGrid from "./ChainTokenGrid"
17+
import { generateChainStructuredData } from "~/utils/ccipStructuredData"
18+
import StructuredData from "~/components/StructuredData.astro"
1719
1820
interface Props {
1921
environment: Environment
@@ -44,16 +46,41 @@ const lanes = await getAllNetworkLanes({
4446
})
4547
4648
const searchLanes = getSearchLanes({ environment })
49+
50+
// Generate dynamic metadata for this specific chain
51+
const environmentText = environment === Environment.Mainnet ? "Mainnet" : "Testnet"
52+
const chainMetadata = {
53+
title: `${network.name} CCIP Network - ${environmentText} Cross-Chain Configuration`,
54+
description: `CCIP configuration for ${network.name} on ${environmentText}. View ${allTokens.length} supported tokens, active cross-chain lanes, fees, and technical specifications.`,
55+
image: network.logo,
56+
excerpt: `${network.name} CCIP network configuration ${environmentText.toLowerCase()} cross-chain interoperability ${network.chainType.toLowerCase()} supported tokens lanes fees technical specifications`,
57+
}
58+
59+
// Generate structured data for this chain
60+
const currentURL = new URL(Astro.request.url).href
61+
const chainStructuredData = generateChainStructuredData(
62+
network,
63+
environment,
64+
allTokens.length,
65+
lanes.length,
66+
currentURL
67+
)
4768
---
4869

49-
<CcipLayout
70+
<CcipDirectoryLayout
5071
frontmatter={{
51-
title: `CCIP Supported Networks - ${network.name}`,
72+
title: chainMetadata.title,
5273
section: "ccip",
74+
metadata: {
75+
description: chainMetadata.description,
76+
image: chainMetadata.image,
77+
excerpt: chainMetadata.excerpt,
78+
},
5379
}}
5480
{headings}
5581
environment={environment}
5682
>
83+
<StructuredData data={chainStructuredData} />
5784
<ChainHero
5885
chains={networks}
5986
tokens={allTokens}
@@ -96,7 +123,7 @@ const searchLanes = getSearchLanes({ environment })
96123
<ChainTokenGrid tokens={allTokens} network={network} client:only="react" environment={environment} />
97124
</div>
98125
</section>
99-
</CcipLayout>
126+
</CcipDirectoryLayout>
100127

101128
<style scoped="false">
102129
.layout {

src/components/CCIP/Chain/DecommissionedChain.astro

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
import CcipLayout from "~/layouts/CcipLayout.astro"
2+
import CcipDirectoryLayout from "~/layouts/CcipDirectoryLayout.astro"
33
import { getEntry, render } from "astro:content"
44
import { Environment, DecommissionedNetwork, getAllDecommissionedNetworks } from "~/config/data/ccip"
55
import Breadcrumb from "~/components/CCIP/Breadcrumb/Breadcrumb"
66
import Aside from "~/components/Aside.astro"
77
import CopyValue from "~/components/CCIP/CopyValue/CopyValue"
8+
import { generateDecommissionedChainStructuredData } from "~/utils/ccipStructuredData"
9+
import StructuredData from "~/components/StructuredData.astro"
810
911
interface Props {
1012
environment: Environment
@@ -24,16 +26,35 @@ const ccipExplorerUrl = `https://ccip.chain.link/`
2426
2527
// Get all networks for potential search context
2628
const allDecommissionedNetworks = getAllDecommissionedNetworks({ filter: environment })
29+
30+
// Generate dynamic metadata for this decommissioned chain
31+
const environmentText = environment === Environment.Mainnet ? "Mainnet" : "Testnet"
32+
const chainMetadata = {
33+
title: `${network.name} CCIP Network (Decommissioned) - ${environmentText}`,
34+
description: `Decommissioned CCIP network for ${network.name} on ${environmentText}. This chain is no longer active but historical transaction data remains accessible via CCIP Explorer.`,
35+
image: network.logo,
36+
excerpt: `${network.name} decommissioned CCIP network ${environmentText.toLowerCase()} historical data chain selector ${network.chainSelector} blockchain interoperability`,
37+
}
38+
39+
// Generate structured data for this decommissioned chain
40+
const currentURL = new URL(Astro.request.url).href
41+
const decommissionedChainStructuredData = generateDecommissionedChainStructuredData(network, environment, currentURL)
2742
---
2843

29-
<CcipLayout
44+
<CcipDirectoryLayout
3045
frontmatter={{
31-
title: `CCIP Decommissioned Network - ${network.name}`,
46+
title: chainMetadata.title,
3247
section: "ccip",
48+
metadata: {
49+
description: chainMetadata.description,
50+
image: chainMetadata.image,
51+
excerpt: chainMetadata.excerpt,
52+
},
3353
}}
3454
{headings}
3555
environment={environment}
3656
>
57+
<StructuredData data={decommissionedChainStructuredData} />
3758
<!-- Hero Section - Consistent with ChainHero pattern -->
3859
<section class="ccip-decom-hero">
3960
<div class="ccip-decom-hero__content">
@@ -122,7 +143,7 @@ const allDecommissionedNetworks = getAllDecommissionedNetworks({ filter: environ
122143
</div>
123144
</div>
124145
</section>
125-
</CcipLayout>
146+
</CcipDirectoryLayout>
126147

127148
<style scoped="false">
128149
/* Hero Section - Consistent with ChainHero */

src/components/CCIP/Landing/ccip-landing.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import CcipLayout from "~/layouts/CcipLayout.astro"
2+
import CcipDirectoryLayout from "~/layouts/CcipDirectoryLayout.astro"
33
import { getEntry, render } from "astro:content"
44
import Hero from "~/components/CCIP/Hero/Hero"
55
import {
@@ -43,7 +43,7 @@ const allTokens = tokens.map((token) => {
4343
const searchLanes = getSearchLanes({ environment })
4444
---
4545

46-
<CcipLayout frontmatter={entry.data} {headings} environment={environment}>
46+
<CcipDirectoryLayout frontmatter={entry.data} {headings} environment={environment}>
4747
<Hero chains={networks} tokens={allTokens} environment={environment} client:load lanes={searchLanes} />
4848
<section class="layout">
4949
<div>
@@ -60,7 +60,7 @@ const searchLanes = getSearchLanes({ environment })
6060
<TokenGrid tokens={allTokens} environment={environment} client:load />
6161
</div>
6262
</section>
63-
</CcipLayout>
63+
</CcipDirectoryLayout>
6464

6565
<style>
6666
.layout {

src/components/CCIP/Token/Token.astro

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import CcipLayout from "~/layouts/CcipLayout.astro"
2+
import CcipDirectoryLayout from "~/layouts/CcipDirectoryLayout.astro"
33
import { getEntry, render } from "astro:content"
44
import {
55
getAllNetworks,
@@ -22,6 +22,8 @@ import {
2222
getTokenIconUrl,
2323
} from "~/features/utils"
2424
import Drawer from "~/components/CCIP/Drawer/Drawer"
25+
import { generateTokenStructuredData } from "~/utils/ccipStructuredData"
26+
import StructuredData from "~/components/StructuredData.astro"
2527
2628
interface Props {
2729
token: string
@@ -72,12 +74,29 @@ const tokenLanes = getAllTokenLanes({
7274
})
7375
7476
const searchLanes = getSearchLanes({ environment })
77+
78+
// Generate dynamic metadata for this specific token
79+
const environmentText = environment === Environment.Mainnet ? "Mainnet" : "Testnet"
80+
const tokenMetadata = {
81+
title: `${token} Cross-Chain Token - CCIP ${environmentText} Networks`,
82+
description: `${token} token availability across CCIP ${environmentText} networks. View ${chainsOfToken.length} supported chains, pool types, rate limits, and cross-chain transfer mechanisms.`,
83+
image: logo,
84+
excerpt: `${token} cross-chain token CCIP ${environmentText.toLowerCase()} supported networks pool types rate limits transfer mechanisms blockchain interoperability`,
85+
}
86+
87+
// Generate structured data for this token page
88+
const tokenStructuredData = generateTokenStructuredData(token, environment, chainsOfToken.length, Astro.url.href)
7589
---
7690

77-
<CcipLayout
91+
<CcipDirectoryLayout
7892
frontmatter={{
79-
title: `CCIP Supported Tokens - ${token}`,
93+
title: tokenMetadata.title,
8094
section: "ccip",
95+
metadata: {
96+
description: tokenMetadata.description,
97+
image: tokenMetadata.image,
98+
excerpt: tokenMetadata.excerpt,
99+
},
81100
}}
82101
{headings}
83102
environment={environment}
@@ -137,7 +156,9 @@ const searchLanes = getSearchLanes({ environment })
137156
/>
138157
</div>
139158
</section>
140-
</CcipLayout>
159+
</CcipDirectoryLayout>
160+
161+
<StructuredData data={tokenStructuredData} />
141162

142163
<style scoped="false">
143164
.layout {
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ const formattedContentTitle = `${frontmatter.title} | ${SITE.title}`
3232
3333
const includeLinkToWalletScript = !!Astro.props.frontmatter.metadata?.linkToWallet
3434
35+
// Only set default metadata if not already provided by the component
3536
frontmatter.metadata = frontmatter.metadata || {}
36-
frontmatter.metadata.image = "/files/ccip-directory.jpg"
37-
frontmatter.metadata.description =
38-
"Access real-time information and operational statuses for Chainlink Cross-Chain Interoperability Protocol (CCIP) networks, lanes, and tokens."
37+
if (!frontmatter.metadata.image) {
38+
frontmatter.metadata.image = "/files/ccip-directory.jpg"
39+
}
40+
if (!frontmatter.metadata.description) {
41+
frontmatter.metadata.description =
42+
"Access real-time information and operational statuses for Chainlink Cross-Chain Interoperability Protocol (CCIP) networks, lanes, and tokens."
43+
}
3944
---
4045

4146
<BaseLayout title={formattedContentTitle} metadata={frontmatter.metadata}>

0 commit comments

Comments
 (0)