forked from withastro/astro.build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
54 lines (51 loc) · 1.33 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import db from "@astrojs/db";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import solid from "@astrojs/solid-js";
import tailwind from "@astrojs/tailwind";
import vercel from "@astrojs/vercel/serverless";
import webVitals from "@astrojs/web-vitals";
import astroExpressiveCode from "astro-expressive-code";
import { defineConfig } from "astro/config";
import houston from "./houston.theme.json";
import { rehypePrettyCode } from "rehype-pretty-code";
/* https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables */
const VERCEL_PREVIEW_SITE =
process.env.VERCEL_ENV !== "production" &&
process.env.VERCEL_URL &&
`https://${process.env.VERCEL_URL}`;
// https://astro.build/config
export default defineConfig({
site: VERCEL_PREVIEW_SITE || "https://astro.build",
markdown: {
syntaxHighlight: false,
rehypePlugins: [[rehypePrettyCode, {}]],
},
integrations: [
tailwind({
applyBaseStyles: false,
}),
solid(),
astroExpressiveCode({
themes: [houston],
frames: false,
}),
mdx(),
sitemap(),
db(),
webVitals(),
],
image: {
domains: ["v1.screenshot.11ty.dev", "storage.googleapis.com"],
},
vite: {
ssr: {
noExternal: ["smartypants"],
},
},
output: "hybrid",
adapter: vercel({
imageService: true,
functionPerRoute: false,
}),
});