2024-08-24 06:28:25 +02:00
|
|
|
import { getAllBlogPostSlugs } from "@/lib/getBlogPost";
|
|
|
|
|
2024-07-28 17:20:53 +02:00
|
|
|
export default async function sitemap() {
|
2024-09-07 09:12:48 +02:00
|
|
|
const blogPostSlugs = await getAllBlogPostSlugs();
|
2024-08-24 06:28:25 +02:00
|
|
|
|
2024-09-07 09:12:48 +02:00
|
|
|
const baseRoutes = [
|
|
|
|
"/",
|
|
|
|
"/blog",
|
|
|
|
"/changelogs",
|
|
|
|
"/contact",
|
|
|
|
"/contribute",
|
|
|
|
"/downloads",
|
|
|
|
"/forum",
|
|
|
|
"/mods",
|
|
|
|
"/privacy-policy",
|
|
|
|
"/tos",
|
|
|
|
"/vulnerabilities",
|
|
|
|
"/newsletter"
|
|
|
|
].map((route) => ({
|
|
|
|
url: `https://svrjs.vercel.app${route}`,
|
|
|
|
lastModified: new Date().toISOString().split("T")[0]
|
|
|
|
}));
|
2024-08-24 06:28:25 +02:00
|
|
|
|
2024-09-07 09:12:48 +02:00
|
|
|
const blogRoutes = blogPostSlugs.map((slug) => ({
|
|
|
|
url: `https://svrjs.vercel.app/blog/${slug.slug}`,
|
|
|
|
lastModified: new Date().toISOString().split("T")[0]
|
|
|
|
}));
|
2024-07-28 17:20:53 +02:00
|
|
|
|
2024-09-07 09:12:48 +02:00
|
|
|
return [...baseRoutes, ...blogRoutes];
|
2024-07-28 17:20:53 +02:00
|
|
|
}
|