-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
51 lines (47 loc) · 1.09 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
// @ts-check
import mdx from "@astrojs/mdx";
import tailwind from "@astrojs/tailwind";
import icon from "astro-icon";
import { defineConfig } from "astro/config";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeSlug from "rehype-slug";
import emoji from "remark-emoji";
import { loadEnv } from "vite";
import sitemap from "@astrojs/sitemap";
import expressiveCode from "astro-expressive-code";
const { BASE_URL } = loadEnv(
process.env.NODE_ENV ?? "development",
process.cwd(),
"",
);
if (!BASE_URL) {
throw new Error("BASE_URL is required");
}
// https://astro.build/config
export default defineConfig({
site: BASE_URL,
integrations: [
tailwind(),
icon(),
expressiveCode({
themes: ["github-dark-default"],
}),
mdx({
remarkPlugins: [[emoji, { accessible: true }]],
}),
sitemap({
i18n: {
defaultLocale: "en",
locales: {
en: "en-US",
},
},
}),
],
markdown: {
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings],
},
experimental: {
responsiveImages: true,
},
});