Skip to content

Commit 414ba1d

Browse files
committed
Fix blog sitemap
1 parent 44d0d8c commit 414ba1d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

workspaces/cms-scripts/src/sitemap.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ const parsePosts = async () => {
125125
const { filenameMap } = await getPosts();
126126
const categories: string[] = [];
127127

128-
filenameMap.forEach(({ locale, category: filenameCategory, slug, published_date, post_type, video }) => {
129-
const category = filenameCategory === 'engineering' ? 'developers' : filenameCategory;
130-
131-
if (!categories.includes(category)) {
132-
categories.push(category);
133-
134-
sitemapUrls.push({
135-
url: `/${locale}/content/category/${category}`,
136-
changefreq: 'weekly',
137-
priority: 0.8
138-
});
128+
filenameMap.forEach(({ locale, category: fileCategories, slug, published_date, post_type, video }) => {
129+
for (const category of fileCategories) {
130+
if (!categories.includes(category)) {
131+
categories.push(category);
132+
133+
sitemapUrls.push({
134+
url: `/${locale}/content/category/${category}`,
135+
changefreq: 'weekly',
136+
priority: 0.8
137+
});
138+
}
139139
}
140140

141141
let sitemapEntry: SitemapUrl = {

0 commit comments

Comments
 (0)