-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
104 lines (99 loc) · 2.2 KB
/
astro.config.ts
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// @ts-check
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwindcss from "@tailwindcss/vite";
import compressor from "astro-compressor";
import { defineConfig, envField } from "astro/config";
import rehypePresetMinify from "rehype-preset-minify";
import rehypeSlug from "rehype-slug";
import remarkToc from "remark-toc";
import { remarkReadingTime } from "./remark-reading-time.mjs";
import svelte from "@astrojs/svelte";
import sentry from "@sentry/astro";
import {
SENTRY_AUTH_TOKEN,
SENTRY_DSN,
SENTRY_PROJECT,
} from "./src/lib/utils/constants";
const integrations = [
mdx({
syntaxHighlight: "shiki",
shikiConfig: {
theme: "github-dark-default",
},
remarkPlugins: [remarkToc, remarkReadingTime],
rehypePlugins: [rehypePresetMinify, rehypeSlug],
remarkRehype: {
footnoteLabel: "Footnotes",
},
gfm: true,
optimize: true,
}),
sitemap({
changefreq: "weekly",
priority: 1,
}),
compressor({
gzip: true,
brotli: true,
}),
(await import("@playform/compress")).default(),
svelte(),
sentry({
dsn: SENTRY_DSN,
sourceMapsUploadOptions: {
project: SENTRY_PROJECT,
authToken: SENTRY_AUTH_TOKEN,
telemetry: false,
},
}),
];
const env = {
schema: {
PUBLIC_PRODUCTION_URL: envField.string({
context: "client",
access: "public",
}),
PUBLIC_DEVELOPMENT_URL: envField.string({
context: "client",
access: "public",
}),
TURSO_DATABASE_URL: envField.string({
context: "server",
access: "secret",
}),
TURSO_AUTH_TOKEN: envField.string({
context: "server",
access: "secret",
}),
SENTRY_DSN: envField.string({
context: "server",
access: "secret",
}),
SENTRY_AUTH_TOKEN: envField.string({
context: "server",
access: "secret",
}),
SENTRY_PROJECT: envField.string({
context: "server",
access: "secret",
}),
},
};
export default defineConfig({
output: "static",
site: "https://ekel.dev",
vite: {
plugins: [tailwindcss()],
},
integrations,
server: {
port: 3000,
host: true,
},
devToolbar: {
enabled: false,
},
compressHTML: true,
env,
});