Skip to content

Commit e770e9a

Browse files
excludin devs subpages from sitemap.xml
1 parent 3514dc8 commit e770e9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

astro.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ export default defineConfig({
1919
tailwind(),
2020
sitemap({
2121
serialize(item) {
22+
if (/.*cucoders\.dev\/dev\/[\w-]+\/[\w-]/.test(item.url)) {
23+
return undefined;
24+
}
25+
2226
if (/.*empleos\/(\d{4}-\d{2}-\d{2})\/.*/.test(item.url)) {
23-
const date = item.url.split("/")[4]
27+
const date = item.url.split("/")[4];
2428
item.lastmod = new Date(date);
2529
}
2630
return item;

0 commit comments

Comments
 (0)