-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
39 lines (32 loc) · 903 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
import { defineConfig } from "astro/config";
import { loadEnv } from "vite";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import solid from "@astrojs/solid-js";
import tailwind from "@astrojs/tailwind";
import SVGInjectPlugin from "vite-plugin-svg-inject";
import createOgImage from "./astro-integrations/create-og-image/create-og-image";
const { PUCLIC_BASE_URL } = loadEnv(import.meta.env.MODE, process.cwd(), "");
const NON_INDEXED_PATHS = ["/og/"];
export default defineConfig({
site: PUCLIC_BASE_URL,
vite: {
plugins: [SVGInjectPlugin()],
},
integrations: [
solid(),
mdx(),
createOgImage(),
sitemap({
filter: (url) => {
const isToExclude = NON_INDEXED_PATHS.some((path) =>
url.endsWith(path),
);
return !isToExclude;
},
}),
tailwind({
applyBaseStyles: false,
}),
],
});