--- trunk/docs/app/sitemap.ts 2024/08/20 09:29:23 602 +++ trunk/docs/app/sitemap.ts 2024/09/07 09:38:45 626 @@ -1,10 +1,13 @@ import urls from "@/sitemap.json"; +import { absoluteURL } from "@/utils/utils"; import { MetadataRoute } from "next"; export default function Sitemap(): MetadataRoute.Sitemap { - return urls.map(url => ({ - url: `https://${process.env.NEXT_PUBLIC_BASE_DOMAIN}${url.loc}`, - lastModified: url.lastmod, - priority: url.priority, - })); + return urls + .filter(url => url.loc !== "/blog" && !url.loc.startsWith("/blog/")) + .map(url => ({ + url: absoluteURL(url.loc), + lastModified: url.lastmod, + priority: url.priority === 1 ? 1 : undefined, + })); }