Skip to content
Merged
25 changes: 7 additions & 18 deletions app/[locale]/10years/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

export default async function TenYearJsonLD({
Expand All @@ -32,22 +27,17 @@ export default async function TenYearJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
name: t("page-10-year-anniversary-meta-title"),
description: t("page-10-year-anniversary-meta-description"),
url: url,
inLanguage: locale,
author: [ethereumCommunityReference],
author: [REFERENCE.ETHEREUM_COMMUNITY],
contributor: contributorList,
isPartOf: {
"@type": "WebSite",
name: "ethereum.org",
url: "https://ethereum.org",
},
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -65,8 +55,8 @@ export default async function TenYearJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#video` },
},
{
Expand All @@ -77,8 +67,7 @@ export default async function TenYearJsonLD({
uploadDate: "2024-07-30T00:00:00Z",
duration: "PT5M30S",
embedUrl: "https://www.youtube.com/embed/gjwr-7PgpTC",
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
},
],
}
Expand Down
30 changes: 9 additions & 21 deletions app/[locale]/[...slug]/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { FileContributor, Frontmatter } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

export default async function SlugJsonLD({
Expand All @@ -29,7 +24,7 @@ export default async function SlugJsonLD({
"@type": "ListItem",
position: 1,
name: "Home",
item: `https://ethereum.org/${locale}/`,
item: normalizeUrlForJsonLd(locale, "/"),
},
]

Expand Down Expand Up @@ -57,29 +52,23 @@ export default async function SlugJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
name: frontmatter.title,
description: frontmatter.description,
url: url,
inLanguage: locale,
author: [ethereumCommunityReference],
author: [REFERENCE.ETHEREUM_COMMUNITY],
contributor: contributorList,
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: breadcrumbItems,
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#article` },
},
{
Expand All @@ -90,10 +79,9 @@ export default async function SlugJsonLD({
image: frontmatter.image
? `https://ethereum.org${frontmatter.image}`
: undefined,
author: [ethereumCommunityReference],
author: [REFERENCE.ETHEREUM_COMMUNITY],
contributor: contributorList,
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
dateModified: frontmatter.published,
mainEntityOfPage: url,
about: {
Expand Down
23 changes: 6 additions & 17 deletions app/[locale]/apps/[application]/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { AppCategory, AppData, FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd, slugify } from "@/lib/utils/url"

// Map internal app categories to schema.org enumerated applicationCategory values
Expand Down Expand Up @@ -43,8 +38,7 @@ export default async function AppsAppJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
Expand All @@ -53,13 +47,8 @@ export default async function AppsAppJsonLD({
url: url,
inLanguage: locale,
contributor: contributorList,
author: [ethereumCommunityReference],
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
author: [REFERENCE.ETHEREUM_COMMUNITY],
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -83,8 +72,8 @@ export default async function AppsAppJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#applications` },
},
{
Expand Down
23 changes: 6 additions & 17 deletions app/[locale]/apps/categories/[catetgoryName]/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { AppCategoryData, AppData, FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

export default async function AppsCategoryJsonLD({
Expand Down Expand Up @@ -40,8 +35,7 @@ export default async function AppsCategoryJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
Expand All @@ -50,13 +44,8 @@ export default async function AppsCategoryJsonLD({
url: url,
inLanguage: locale,
contributor: contributorList,
author: [ethereumCommunityReference],
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
author: [REFERENCE.ETHEREUM_COMMUNITY],
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -80,8 +69,8 @@ export default async function AppsCategoryJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#categories` },
},
{
Expand Down
23 changes: 6 additions & 17 deletions app/[locale]/apps/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

import { appsCategories } from "@/data/apps/categories"
Expand All @@ -34,8 +29,7 @@ export default async function AppsJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
Expand All @@ -44,13 +38,8 @@ export default async function AppsJsonLD({
url: url,
inLanguage: locale,
contributor: contributorList,
author: [ethereumCommunityReference],
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
author: [REFERENCE.ETHEREUM_COMMUNITY],
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -68,8 +57,8 @@ export default async function AppsJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#apps` },
},
{
Expand Down
26 changes: 7 additions & 19 deletions app/[locale]/assets/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

export default async function AssetsJsonLD({
Expand All @@ -32,8 +27,7 @@ export default async function AssetsJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
Expand All @@ -42,13 +36,8 @@ export default async function AssetsJsonLD({
url: url,
inLanguage: locale,
contributor: contributorList,
author: [ethereumCommunityReference],
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
author: [REFERENCE.ETHEREUM_COMMUNITY],
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -66,8 +55,8 @@ export default async function AssetsJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
mainEntity: { "@id": `${url}#assets` },
},
{
Expand Down Expand Up @@ -101,8 +90,7 @@ export default async function AssetsJsonLD({
url: normalizeUrlForJsonLd(locale, "/assets/#brand"),
},
],
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
},
],
}
Expand Down
23 changes: 6 additions & 17 deletions app/[locale]/bug-bounty/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { FileContributor } from "@/lib/types"

import PageJsonLD from "@/components/PageJsonLD"

import {
ethereumCommunityOrganization,
ethereumCommunityReference,
ethereumFoundationOrganization,
ethereumFoundationReference,
} from "@/lib/utils/jsonld"
import { BASE_GRAPH_NODES, REFERENCE } from "@/lib/jsonld/constants"
import { normalizeUrlForJsonLd } from "@/lib/utils/url"

export default async function BugBountyJsonLD({
Expand All @@ -32,8 +27,7 @@ export default async function BugBountyJsonLD({
const jsonLd = {
"@context": "https://schema.org",
"@graph": [
ethereumFoundationOrganization,
ethereumCommunityOrganization,
...BASE_GRAPH_NODES,
{
"@type": "WebPage",
"@id": url,
Expand All @@ -42,13 +36,8 @@ export default async function BugBountyJsonLD({
url: url,
inLanguage: locale,
contributor: contributorList,
author: [ethereumCommunityReference],
isPartOf: {
"@type": "WebSite",
"@id": "https://ethereum.org/#website",
name: "ethereum.org",
url: "https://ethereum.org",
},
author: [REFERENCE.ETHEREUM_COMMUNITY],
isPartOf: REFERENCE.ETHEREUM_ORG_WEBSITE,
breadcrumb: {
"@type": "BreadcrumbList",
itemListElement: [
Expand All @@ -66,8 +55,8 @@ export default async function BugBountyJsonLD({
},
],
},
publisher: ethereumFoundationReference,
reviewedBy: ethereumFoundationReference,
publisher: REFERENCE.ETHEREUM_FOUNDATION,
reviewedBy: REFERENCE.ETHEREUM_FOUNDATION,
},
],
}
Expand Down
Loading
Loading