-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
28 lines (25 loc) · 769 Bytes
/
Copy pathastro.config.mjs
File metadata and controls
28 lines (25 loc) · 769 Bytes
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
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
const excludedFromSitemap = [
"/privacy",
"/cookies",
"/es/privacy",
"/es/cookies",
"/preview/home-old",
"/preview/home-v2",
];
export default defineConfig({
site: (process.env.PUBLIC_SITE_URL || "https://arcwave-integrations.pages.dev").replace(/\/+$/, ""),
integrations: [
react(),
sitemap({
filter: (page) => {
const pathname = page.startsWith("http") ? new URL(page).pathname : page;
const normalizedPathname =
pathname.endsWith("/") && pathname !== "/" ? pathname.slice(0, -1) : pathname;
return !excludedFromSitemap.includes(normalizedPathname);
},
}),
],
});