From d2cd9b98f3b4d237c953e31506426b2f15fbd2e9 Mon Sep 17 00:00:00 2001 From: PedroBailaAndrade Date: Wed, 3 Jan 2024 14:15:40 +0000 Subject: [PATCH] Update posts category on sitemap --- workspaces/cms-scripts/src/sitemap.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workspaces/cms-scripts/src/sitemap.ts b/workspaces/cms-scripts/src/sitemap.ts index 6c8458a006..3399720302 100644 --- a/workspaces/cms-scripts/src/sitemap.ts +++ b/workspaces/cms-scripts/src/sitemap.ts @@ -95,7 +95,9 @@ const parsePosts = async () => { const { filenameMap } = await getPosts(); const categories: string[] = []; - filenameMap.forEach(({ locale, category, slug, published_date }) => { + filenameMap.forEach(({ locale, category: filenameCategory, slug, published_date }) => { + const category = filenameCategory === 'engineering' ? 'developers' : filenameCategory; + if (!categories.includes(category)) { categories.push(category);