Files
freno-dev/src/lib/sitemap-routes.ts
2026-07-23 21:54:52 -04:00

82 lines
2.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Centralized sitemap route registry per site.
*
* Each entry describes a URL path that should appear in the corresponding
* site's `sitemap.xml`, along with SEO metadata (change frequency and
* relative priority).
*
* This module is pure — no imports of server-side code — so it can be
* used in unit tests and from both server and client contexts.
*/
import type { SiteId } from "./site-context";
export interface SitemapEntry {
/**
* Absolute path on the site's domain (must start with `/`).
*/
path: string;
/**
* Expected change frequency.
*/
changefreq:
| "always"
| "hourly"
| "daily"
| "weekly"
| "monthly"
| "yearly"
| "never";
/**
* Relative priority (0.01.0).
*/
priority: number;
}
/**
* Per-site sitemap route definitions.
*
* Entries for subdomain pages (contact, privacy, downloads, etc.) are
* populated as those pages are built.
*/
export const SITEMAP_ROUTES: Record<SiteId, SitemapEntry[]> = {
main: [
{ path: "/", changefreq: "weekly", priority: 1.0 },
{ path: "/blog", changefreq: "daily", priority: 0.9 },
{ path: "/contact", changefreq: "monthly", priority: 0.7 },
{ path: "/login", changefreq: "monthly", priority: 0.5 },
{ path: "/resume", changefreq: "yearly", priority: 0.6 },
{ path: "/downloads", changefreq: "weekly", priority: 0.8 }
],
// ── Subdomain sites ──────────────────────────────────────────────────
// Populated as pages land.
nessa: [
{ path: "/", changefreq: "weekly", priority: 1.0 },
{ path: "/contact", changefreq: "monthly", priority: 0.6 },
{ path: "/privacy", changefreq: "yearly", priority: 0.4 }
],
lineage: [
{ path: "/", changefreq: "weekly", priority: 1.0 },
{ path: "/contact", changefreq: "monthly", priority: 0.6 },
{ path: "/privacy", changefreq: "yearly", priority: 0.4 },
{ path: "/downloads", changefreq: "weekly", priority: 0.8 },
{ path: "/deletion", changefreq: "yearly", priority: 0.3 }
],
gaze: [
{ path: "/", changefreq: "weekly", priority: 1.0 },
{ path: "/contact", changefreq: "monthly", priority: 0.6 },
{ path: "/privacy", changefreq: "yearly", priority: 0.4 }
],
inputhalo: [
{ path: "/", changefreq: "weekly", priority: 1.0 },
{ path: "/contact", changefreq: "monthly", priority: 0.6 },
{ path: "/privacy", changefreq: "yearly", priority: 0.4 }
]
};