forked from CuCodersCommunity/cucoderscommunity.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
40 lines (34 loc) · 915 Bytes
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from "astro/config";
// https://astro.build/config
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
import partytown from "@astrojs/partytown";
// https://astro.build/config
import image from "@astrojs/image";
// https://astro.build/config
export default defineConfig({
site: "https://cucoders.dev/",
integrations: [
tailwind(),
sitemap({
serialize(item) {
if (/.*cucoders\.dev\/dev\/[\w-]+\/[\w-]/.test(item.url)) {
return undefined;
}
if (/.*empleos\/(\d{4}-\d{2}-\d{2})\/.*/.test(item.url)) {
const date = item.url.split("/")[4];
item.lastmod = new Date(date);
}
return item;
},
}),
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
image(),
],
});