Openstatus www.openstatus.dev

๐ŸŒ better sitemap (#595)

authored by

Thibault Le Ouay and committed by
GitHub
39ce0106 7faa3d72

+12 -2
+12 -2
apps/web/src/app/sitemap.ts
··· 1 1 import type { MetadataRoute } from "next"; 2 - import { allPosts } from "contentlayer/generated"; 2 + import { allChangelogs, allPosts } from "contentlayer/generated"; 3 3 4 4 const addPathToBaseURL = (path: string) => `https://www.openstatus.dev${path}`; 5 5 ··· 7 7 const blogs = allPosts.map((post) => ({ 8 8 url: `https://www.openstatus.dev/blog/${post.slug}`, 9 9 lastModified: post.publishedAt, // date format should be YYYY-MM-DD 10 + })); 11 + 12 + const changelogs = allChangelogs.map((post) => ({ 13 + url: `https://www.openstatus.dev/changelog/${post.slug}`, 14 + lastModified: post.publishedAt, // date format should be YYYY-MM 10 15 })); 11 16 12 17 const routes = [ 13 18 "/", 14 19 "/play", 20 + "/play/checker", 21 + "/oss-friends", 22 + "/pricing", 23 + "/blog", 24 + "/changelog", 15 25 "/app/sign-in", 16 26 "/app/sign-up", 17 27 "/monitor/openstatus", ··· 20 30 lastModified: new Date(), 21 31 })); 22 32 23 - return [...routes, ...blogs]; 33 + return [...routes, ...blogs, ...changelogs]; 24 34 }