diff --git a/apps/site/app/robots.ts b/apps/site/app/robots.ts new file mode 100644 index 0000000..f570b5b --- /dev/null +++ b/apps/site/app/robots.ts @@ -0,0 +1,12 @@ +import type { MetadataRoute } from "next"; + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: "*", + allow: "/", + disallow: ["/api/", "/account", "/orders", "/library", "/checkout/", "/claim/"], + }, + sitemap: "https://nightcell7.com/sitemap.xml", + }; +} diff --git a/apps/site/app/sitemap.ts b/apps/site/app/sitemap.ts new file mode 100644 index 0000000..d28eb0e --- /dev/null +++ b/apps/site/app/sitemap.ts @@ -0,0 +1,40 @@ +import type { MetadataRoute } from "next"; + +const ORIGIN = "https://nightcell7.com"; + +/** + * Public, indexable pages only. Account, checkout, claim and password pages + * are per-visitor and stay out; /characters/[side] lists the two dossiers. + */ +const PATHS = [ + "/", + "/episodes/false-dawn", + "/multiplayer", + "/downloads", + "/system-requirements", + "/yards", + "/gallery", + "/characters", + "/characters/rook", + "/characters/leila", + "/news", + "/faq", + "/support", + "/status", + "/press", + "/careers", + "/credits", + "/privacy", + "/terms", + "/refunds", + "/licenses", + "/community-guidelines", +]; + +export default function sitemap(): MetadataRoute.Sitemap { + return PATHS.map((path) => ({ + url: `${ORIGIN}${path}`, + changeFrequency: path === "/" || path === "/news" ? "weekly" : "monthly", + priority: path === "/" ? 1 : path === "/episodes/false-dawn" ? 0.9 : 0.5, + })); +}