-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
92 lines (83 loc) · 2.68 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
import { defineConfig, envField } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import vercel from "@astrojs/vercel";
import astroExpressiveCode, { setAlpha } from "astro-expressive-code";
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
import rehypeUnwrapImages from "rehype-unwrap-images";
import { SITE_NAME } from "./src/scripts/util";
const config = defineConfig({
site: SITE_NAME,
integrations: [
sitemap(),
tailwind({
applyBaseStyles: false,
}),
astroExpressiveCode({
plugins: [pluginCollapsibleSections()],
themes: ["rose-pine-moon"],
useThemedSelectionColors: true,
frames: {
showCopyToClipboardButton: false,
},
styleOverrides: {
borderWidth: "0px",
borderRadius: "0.5rem",
uiFontFamily: "Atkinson Hyperlegible",
uiFontSize: "1rem",
codeFontFamily: "Berkeley Mono Variable",
codeFontWeight: "120",
codeFontSize: "13px",
frames: {
editorActiveTabBackground: ({ theme }) => theme.colors["editor.background"],
editorActiveTabForeground: "#C3BDFF",
editorActiveTabIndicatorHeight: "2px",
editorActiveTabIndicatorTopColor: "#C3BDFF",
editorTabBarBackground: ({ theme }) => setAlpha(theme.colors["editor.background"], 0.5),
editorTabBorderRadius: "0.3rem",
shadowColor: "transparent",
},
textMarkers: {
markBackground: ({ resolveSetting }) =>
`lch(23.59% 18.75 ${resolveSetting("textMarkers.markHue")} / ${resolveSetting("textMarkers.backgroundOpacity")})`,
markBorderColor: ({ resolveSetting }) =>
`lch(23.59% 18.75 ${resolveSetting("textMarkers.markHue")} / ${resolveSetting("textMarkers.borderOpacity")})`,
markHue: "293.7",
},
collapsibleSections: {
closedBackgroundColor: "#393552",
},
},
}),
mdx(),
],
markdown: {
rehypePlugins: [rehypeUnwrapImages],
},
output: "static",
adapter: vercel({
imageService: true,
webAnalytics: {
enabled: true,
},
includeFiles: [
"./public/_fonts/AtkinsonHyperlegible-Regular.woff",
"./public/_fonts/AtkinsonHyperlegible-Bold.woff",
],
}),
env: {
schema: {
LASTFM_API_KEY: envField.string({ context: "server", access: "secret", optional: false }),
},
},
// See https://noahflk.com/blog/trailing-slashes-astro
trailingSlash: "never",
redirects: {
"/resume": {
status: 307,
destination: "/_files/resume.pdf",
},
},
});
export default config;