diff --git a/sitemap.mjs b/sitemap.mjs index c2c4bfa72..a430fb3da 100644 --- a/sitemap.mjs +++ b/sitemap.mjs @@ -5,6 +5,10 @@ async function getRoadmapIds() { return fs.readdir(path.join(process.cwd(), 'src/roadmaps')); } +async function getBestPracticesIds() { + return fs.readdir(path.join(process.cwd(), 'src/best-practices')); +} + export function shouldIndexPage(page) { return ![ 'https://roadmap.sh/404', @@ -19,9 +23,11 @@ export async function serializeSitemap(item) { 'https://roadmap.sh', 'https://roadmap.sh/about', 'https://roadmap.sh/roadmaps', + 'https://roadmap.sh/best-practices', 'https://roadmap.sh/guides', 'https://roadmap.sh/videos', ...(await getRoadmapIds()).flatMap((id) => [`https://roadmap.sh/${id}`, `https://roadmap.sh/${id}/topics`]), + ...(await getBestPracticesIds()).map((id) => `https://roadmap.sh/best-practices/${id}`), ]; // Roadmaps and other high priority pages