feat: add BreadcrumbList JSON-LD to game, games, and devices pages (Task 9)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { db } from "@/lib/db/index"
|
import { db } from "@/lib/db/index"
|
||||||
import { hardware, performanceEntries, gameVersions, games } from "@/lib/db/schema"
|
import { hardware, performanceEntries, gameVersions, games } from "@/lib/db/schema"
|
||||||
import { eq, sql, desc } from "drizzle-orm"
|
import { eq, sql, desc } from "drizzle-orm"
|
||||||
|
import { buildBreadcrumbList } from "@/lib/utils/seo"
|
||||||
import { DevicesPageClient } from "./page-client"
|
import { DevicesPageClient } from "./page-client"
|
||||||
import type { Metadata } from "next"
|
import type { Metadata } from "next"
|
||||||
|
|
||||||
@@ -126,6 +127,17 @@ export default async function DevicesPage() {
|
|||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
/>
|
/>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: JSON.stringify(
|
||||||
|
buildBreadcrumbList([
|
||||||
|
{ name: "Home", url: "https://deckyvault.xyz" },
|
||||||
|
{ name: "Devices", url: "https://deckyvault.xyz/devices" },
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<DevicesPageClient devices={devices} />
|
<DevicesPageClient devices={devices} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
+13
-1
@@ -16,7 +16,7 @@ import {
|
|||||||
import { and, desc, eq, sql } from "drizzle-orm"
|
import { and, desc, eq, sql } from "drizzle-orm"
|
||||||
import { isSyncStale, syncSteamGame, ensureSteamGame } from "@/lib/steam/sync"
|
import { isSyncStale, syncSteamGame, ensureSteamGame } from "@/lib/steam/sync"
|
||||||
import { getR2PublicUrl } from "@/lib/storage"
|
import { getR2PublicUrl } from "@/lib/storage"
|
||||||
import { smartTruncate } from "@/lib/utils/seo"
|
import { smartTruncate, buildBreadcrumbList } from "@/lib/utils/seo"
|
||||||
import { GamePageClient } from "./game-page-client"
|
import { GamePageClient } from "./game-page-client"
|
||||||
|
|
||||||
// This page needs live data — skip static generation at build time
|
// This page needs live data — skip static generation at build time
|
||||||
@@ -379,6 +379,18 @@ export default async function GamePage({
|
|||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: JSON.stringify(
|
||||||
|
buildBreadcrumbList([
|
||||||
|
{ name: "Home", url: "https://deckyvault.xyz" },
|
||||||
|
{ name: "Games", url: "https://deckyvault.xyz/games" },
|
||||||
|
{ name: game.title, url: `https://deckyvault.xyz/game/${game.id}` },
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<Suspense fallback={<div className="min-h-screen" />}>
|
<Suspense fallback={<div className="min-h-screen" />}>
|
||||||
<GamePageClient
|
<GamePageClient
|
||||||
game={serializedGame}
|
game={serializedGame}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
} from "@/lib/db/schema"
|
} from "@/lib/db/schema"
|
||||||
import { sql, eq, and, desc, inArray } from "drizzle-orm"
|
import { sql, eq, and, desc, inArray } from "drizzle-orm"
|
||||||
import { isSyncStale, syncSteamGame } from "@/lib/steam/sync"
|
import { isSyncStale, syncSteamGame } from "@/lib/steam/sync"
|
||||||
|
import { buildBreadcrumbList } from "@/lib/utils/seo"
|
||||||
import { GamesPageClient } from "./games-page-client"
|
import { GamesPageClient } from "./games-page-client"
|
||||||
|
|
||||||
// This page needs live data — skip static generation at build time
|
// This page needs live data — skip static generation at build time
|
||||||
@@ -276,6 +277,17 @@ export default async function GamesPage() {
|
|||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
/>
|
/>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: JSON.stringify(
|
||||||
|
buildBreadcrumbList([
|
||||||
|
{ name: "Home", url: "https://deckyvault.xyz" },
|
||||||
|
{ name: "Games", url: "https://deckyvault.xyz/games" },
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<GamesPageClient
|
<GamesPageClient
|
||||||
initialGames={initialGames}
|
initialGames={initialGames}
|
||||||
totalCount={totalCount}
|
totalCount={totalCount}
|
||||||
|
|||||||
Reference in New Issue
Block a user