Repository Public
1import type { MetadataRoute } from "next";2import { getCourse } from "@/lib/content";3import { env } from "@/lib/env";4import { sitemapPaths } from "@/lib/seo";5import { canonical } from "@/modules/content-schema";67// Follows the live publications: a session's watch page enters the sitemap when it is published, and leaves it when withdrawn.8export const dynamic = "force-dynamic";910export default async function sitemap(): Promise<MetadataRoute.Sitemap> {11 return sitemapPaths(await getCourse()).map((path) => ({ url: canonical(env.publicUrl, path), changeFrequency: "weekly", priority: path === "/" ? 1 : path.startsWith("/seances/") ? 0.7 : 0.5 }));12}13