-
Notifications
You must be signed in to change notification settings - Fork 1
/
astro.config.mjs
63 lines (62 loc) · 1.54 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
55
56
57
58
59
60
61
62
63
import { defineConfig } from "astro/config";
import path, { dirname } from "node:path";
import { fileURLToPath } from "url";
import sitemap from "@astrojs/sitemap";
import prefetch from "@astrojs/prefetch";
import serviceWorker from "astrojs-service-worker";
import vue from "@astrojs/vue";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import mdx from "@astrojs/mdx";
import tsconfigPaths from "vite-tsconfig-paths";
import icon from "astro-icon";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// https://astro.build/config
export default defineConfig({
site: import.meta.env.DEV
? "http://localhost:4321"
: "https://publication2023.bits-und-baeume.org",
output: "static",
integrations: [
sitemap({
lastmod: new Date(),
}),
prefetch(),
serviceWorker(),
vue(),
icon(),
mdx({
rehypePlugins: [
[
rehypeSlug,
{
prefix: "h-",
},
],
// We need this to prevent IDs starting with a number
[
rehypeAutolinkHeadings,
{
behavior: "append",
},
],
],
}),
],
vite: {
plugins: [tsconfigPaths()],
css: {
devSourcemap: true,
},
resolve: {
alias: {
"@sass-butler/": `${path.resolve(
__dirname,
"node_modules/@felix_berlin/sass-butler/",
)}/`,
"@styles/": `${path.resolve(__dirname, "src/styles/")}/`,
},
},
},
});