diff --git a/app/[locale]/wallets/find-wallet/page-jsonld.tsx b/app/[locale]/wallets/find-wallet/page-jsonld.tsx index 1bfbdcd7be0..4195c8f3734 100644 --- a/app/[locale]/wallets/find-wallet/page-jsonld.tsx +++ b/app/[locale]/wallets/find-wallet/page-jsonld.tsx @@ -1,6 +1,6 @@ import { getTranslations } from "next-intl/server" -import { FileContributor, Lang } from "@/lib/types" +import { FileContributor, Lang, WalletData } from "@/lib/types" import PageJsonLD from "@/components/PageJsonLD" @@ -13,12 +13,14 @@ import { normalizeUrlForJsonLd } from "@/lib/utils/url" export default async function FindWalletPageJsonLD({ locale, contributors, + wallets, }: { locale: Lang | undefined contributors: FileContributor[] + wallets: WalletData[] }) { const t = await getTranslations({ - namespace: "page-find-wallet", + namespace: "page-wallets-find-wallet", }) const url = normalizeUrlForJsonLd(locale, `/wallets/find-wallet/`) @@ -29,14 +31,28 @@ export default async function FindWalletPageJsonLD({ url: contributor.html_url, })) + const platforms = (wallet: WalletData): string[] => { + const os: string[] = [] + if (wallet.ios) os.push("iOS") + if (wallet.android) os.push("Android") + if (wallet.linux) os.push("Linux") + if (wallet.windows) os.push("Windows") + if (wallet.macOS) os.push("macOS") + if (wallet.chromium) os.push("Chromium (Extension)") + if (wallet.firefox) os.push("Firefox") + if (wallet.hardware) os.push("Hardware") + return os + } + const jsonLd = { "@context": "https://schema.org", "@graph": [ { - "@type": "WebPage", + "@type": "CollectionPage", "@id": url, name: t("page-find-wallet-meta-title"), description: t("page-find-wallet-meta-description"), + image: "https://ethereum.org/images/wallets/wallet-hero.png", url: url, inLanguage: locale, contributor: contributorList, @@ -72,24 +88,62 @@ export default async function FindWalletPageJsonLD({ }, publisher: ethereumFoundationOrganization, reviewedBy: ethereumFoundationOrganization, - mainEntity: { "@id": `${url}#find-wallet` }, + mainEntity: { "@id": `${url}#wallet-list` }, }, { - "@type": "Article", - "@id": `${url}#find-wallet`, - headline: t("page-find-wallet-title"), + "@type": "ItemList", + "@id": `${url}#wallet-list`, + name: t("page-find-wallet-title"), description: t("page-find-wallet-meta-description"), - image: "https://ethereum.org/images/wallets/wallet-hero.png", - author: [ethereumCommunityOrganization], - publisher: ethereumFoundationOrganization, - contributor: contributorList, - reviewedBy: ethereumFoundationOrganization, - about: { - "@type": "Thing", - name: "Ethereum Wallet Finder", - description: - "Tool to find and compare Ethereum wallets based on features and requirements", - }, + numberOfItems: wallets.length, + itemListElement: wallets.map((wallet, index) => ({ + "@type": "ListItem", + position: index + 1, + item: { + "@type": "SoftwareApplication", + name: wallet.name, + url: wallet.url, + applicationCategory: "Cryptocurrency Wallet", + operatingSystem: platforms(wallet).join(", "), + offers: { + "@type": "Offer", + price: "0", + priceCurrency: "USD", + }, + additionalProperty: [ + { + "@type": "PropertyValue", + name: "Open Source", + value: wallet.open_source ? "Yes" : "No", + }, + { + "@type": "PropertyValue", + name: "Self Custody", + value: wallet.non_custodial ? "Yes" : "No", + }, + { + "@type": "PropertyValue", + name: "Hardware Wallet Support", + value: wallet.hardware_support ? "Yes" : "No", + }, + { + "@type": "PropertyValue", + name: "Layer 2 Support", + value: wallet.layer_2 ? "Yes" : "No", + }, + { + "@type": "PropertyValue", + name: "Staking", + value: wallet.staking ? "Yes" : "No", + }, + { + "@type": "PropertyValue", + name: "NFT Support", + value: wallet.nft_support ? "Yes" : "No", + }, + ], + }, + })), }, ], } diff --git a/app/[locale]/wallets/find-wallet/page.tsx b/app/[locale]/wallets/find-wallet/page.tsx index acfbe4f1cfb..4d911d30bc6 100644 --- a/app/[locale]/wallets/find-wallet/page.tsx +++ b/app/[locale]/wallets/find-wallet/page.tsx @@ -61,7 +61,11 @@ const Page = async ({ params }: { params: PageParams }) => { return ( <> - +