-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
36 lines (33 loc) · 1005 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
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import vercel from "@astrojs/vercel/static";
import qwikdev from "@qwikdev/astro";
import robotsTxt from "astro-robots-txt";
import { defineConfig } from "astro/config";
import { loadEnv } from "vite";
const { PUBLIC_VERCEL_URL, PUBLIC_VERCEL_ENV } = loadEnv(
process.env.NODE_ENV,
process.cwd(),
"",
);
const vercelUrl = PUBLIC_VERCEL_URL ?? "localhost:4231";
const vercelEnv = PUBLIC_VERCEL_ENV ?? "local";
// https://astro.build/config
export default defineConfig({
site: `${vercelEnv === "local" ? "http" : "https"}://${vercelEnv === "production" ? "thesobercoder.in" : vercelUrl}`,
integrations: [qwikdev(), mdx(), tailwind(), sitemap(), robotsTxt()],
output: "static",
adapter: vercel({
webAnalytics: {
enabled: true,
},
imageService: true,
devImageService: "sharp",
}),
markdown: {
shikiConfig: {
theme: "dracula",
},
},
});