Skip to content

Commit 367b81c

Browse files
committed
feat: filter out the pages that start with /docs/13 and /docs/14
1 parent 7741792 commit 367b81c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

apps/docs/src/app/sitemap.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,18 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
2727
},
2828

2929
...(await Promise.all(
30-
[docs.getPages(), learn.getPages(), blog.getPages()]
30+
[
31+
docs
32+
.getPages()
33+
// We filter out the pages that start with /docs/13 and /docs/14
34+
.filter((page) =>
35+
['/docs/13', '/docs/14'].every(
36+
(prefix) => !page.url.startsWith(prefix),
37+
),
38+
),
39+
learn.getPages(),
40+
blog.getPages(),
41+
]
3142
.flat()
3243
.map(async (page) => {
3344
const { 'translation-updated-at': lastModified } = page.data;

0 commit comments

Comments
 (0)