Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: sitemap

Blue Mouse9919c894b3d0
diff --git a/docs/app/sitemap.ts b/docs/app/sitemap.ts
new file mode 100644
index 000000000..dec3fd6ec
--- /dev/null
+++ b/docs/app/sitemap.ts
@@ -0,0 +1,11 @@
+import type { MetadataRoute } from "next";
+import { source } from "@/lib/source";
+
+const BASE_URL = "https://swetrix.com/docs";
+
+export default function sitemap(): MetadataRoute.Sitemap {
+ return source.getPages().map((page) => ({
+ url: `${BASE_URL}${page.url}`,
+ lastModified: new Date(),
+ }));
+}