Skip to content

Commit 757cabb

Browse files
authored
[Docs Site] Fix sitemap filter (#23603)
1 parent 3aa58c0 commit 757cabb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

astro.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,15 @@ export default defineConfig({
167167
icon(),
168168
sitemap({
169169
filter(page) {
170-
return (
171-
!page.startsWith("https://developers.cloudflare.com/style-guide/") ||
172-
!page.endsWith("/404/")
173-
);
170+
if (page.includes("/style-guide/")) {
171+
return false;
172+
}
173+
174+
if (page.endsWith("/404/")) {
175+
return false;
176+
}
177+
178+
return true;
174179
},
175180
serialize(item) {
176181
item.lastmod = new Date().toISOString();

0 commit comments

Comments
 (0)