diff --git a/app/devices/[slug]/page.tsx b/app/devices/[slug]/page.tsx
index 14d86b8..0fff0bf 100644
--- a/app/devices/[slug]/page.tsx
+++ b/app/devices/[slug]/page.tsx
@@ -17,6 +17,7 @@ export async function generateMetadata({ params }: { params: Promise<{ slug: str
return {
title: `${device.name} — DeckyVault`,
description: `Benchmark data and performance stats for ${device.name} on DeckyVault`,
+ alternates: { canonical: `https://deckyvault.xyz/devices/${slug}` },
}
}
@@ -37,5 +38,18 @@ export default async function DevicePage({ params }: { params: Promise<{ slug: s
notFound()
}
- return
+ const jsonLd = {
+ "@context": "https://schema.org",
+ "@type": "Product",
+ name: device.name,
+ category: device.deviceType,
+ url: `https://deckyvault.xyz/devices/${device.slug}`,
+ }
+
+ return (
+ <>
+
+
+ >
+ )
}
diff --git a/app/devices/page.tsx b/app/devices/page.tsx
index f99b99c..c9c49ed 100644
--- a/app/devices/page.tsx
+++ b/app/devices/page.tsx
@@ -1,10 +1,31 @@
+import { db } from "@/lib/db/index"
+import { hardware } from "@/lib/db/schema"
import { DevicesPageClient } from "./page-client"
export const metadata = {
- title: "Devices — DeckyVault",
- description: "Browse handheld and console devices with benchmark data on DeckyVault",
+ title: "Devices — DeckyVault",
+ description: "Browse handheld and console devices with benchmark data on DeckyVault",
+ alternates: { canonical: "https://deckyvault.xyz/devices" },
}
-export default function DevicesPage() {
- return
+export default async function DevicesPage() {
+ const devices = await db.select({ slug: hardware.slug, name: hardware.name }).from(hardware)
+
+ const jsonLd = {
+ "@context": "https://schema.org",
+ "@type": "ItemList",
+ itemListElement: devices.map((d, i) => ({
+ "@type": "ListItem",
+ position: i + 1,
+ name: d.name,
+ url: `https://deckyvault.xyz/devices/${d.slug}`,
+ })),
+ }
+
+ return (
+ <>
+
+
+ >
+ )
}
diff --git a/app/page.tsx b/app/page.tsx
index 86cddad..55d43ee 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -116,6 +116,23 @@ export default function Landing() {
Github.
+
)
}
diff --git a/app/search/layout.tsx b/app/search/layout.tsx
new file mode 100644
index 0000000..641ca36
--- /dev/null
+++ b/app/search/layout.tsx
@@ -0,0 +1,12 @@
+import type { Metadata } from "next"
+
+export const metadata: Metadata = {
+ title: "Search Games",
+ description: "Search for games and find benchmarks, settings, and performance data on DeckyVault.",
+ alternates: { canonical: "https://deckyvault.xyz/search" },
+ robots: { index: false },
+}
+
+export default function SearchLayout({ children }: { children: React.ReactNode }) {
+ return children
+}
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 625e5a3..4359b81 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -1,21 +1,34 @@
import type { MetadataRoute } from "next"
+import { db } from "@/lib/db/index"
+import { games, hardware } from "@/lib/db/schema"
const BASE_URL = "https://deckyvault.xyz"
-export default function sitemap(): MetadataRoute.Sitemap {
+export default async function sitemap(): Promise {
+ const [allGames, allDevices] = await Promise.all([
+ db.select({ id: games.id, updatedAt: games.updatedAt }).from(games),
+ db.select({ slug: hardware.slug, updatedAt: hardware.updatedAt }).from(hardware),
+ ])
+
+ const gameEntries: MetadataRoute.Sitemap = allGames.map((game) => ({
+ url: `${BASE_URL}/game/${game.id}`,
+ lastModified: game.updatedAt,
+ changeFrequency: "weekly",
+ priority: 0.8,
+ }))
+
+ const deviceEntries: MetadataRoute.Sitemap = allDevices.map((device) => ({
+ url: `${BASE_URL}/devices/${device.slug}`,
+ lastModified: device.updatedAt,
+ changeFrequency: "monthly",
+ priority: 0.6,
+ }))
+
return [
- {
- url: BASE_URL,
- lastModified: new Date(),
- changeFrequency: "weekly",
- priority: 1,
- },
- // Future dynamic routes can be added here:
- // {
- // url: `${BASE_URL}/games/${game.slug}`,
- // lastModified: game.updatedAt,
- // changeFrequency: "weekly",
- // priority: 0.8,
- // },
+ { url: BASE_URL, lastModified: new Date(), changeFrequency: "weekly", priority: 1 },
+ { url: `${BASE_URL}/search`, lastModified: new Date(), changeFrequency: "weekly", priority: 0.7 },
+ { url: `${BASE_URL}/devices`, lastModified: new Date(), changeFrequency: "monthly", priority: 0.6 },
+ ...gameEntries,
+ ...deviceEntries,
]
}