-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
118 lines (116 loc) · 2.82 KB
/
astro.config.ts
File metadata and controls
118 lines (116 loc) · 2.82 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import { defineConfig, envField, fontProviders } from "astro/config";
import mdx from "@astrojs/mdx";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";
import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse";
import {
transformerNotationDiff,
transformerNotationHighlight,
transformerNotationWordHighlight,
} from "@shikijs/transformers";
import { transformerFileName } from "./src/utils/transformers/fileName";
import { SITE } from "./src/config";
// https://astro.build/config
export default defineConfig({
site: SITE.website,
integrations: [
mdx({
extendMarkdownConfig: true,
}),
sitemap({
filter: page => SITE.showArchives || !page.endsWith("/archives"),
}),
],
markdown: {
remarkPlugins: [remarkToc, [remarkCollapse, { test: "Table of contents" }]],
shikiConfig: {
// For more themes, visit https://shiki.style/themes
themes: { light: "min-light", dark: "github-dark-default" },
defaultColor: false,
wrap: false,
transformers: [
transformerFileName({ style: "v2", hideDot: false }),
transformerNotationHighlight(),
transformerNotationWordHighlight(),
transformerNotationDiff({ matchAlgorithm: "v3" }),
],
},
},
vite: {
plugins: [tailwindcss()],
optimizeDeps: {
exclude: ["@resvg/resvg-js"],
},
},
image: {
responsiveStyles: true,
layout: "constrained",
},
env: {
schema: {
PUBLIC_GOOGLE_SITE_VERIFICATION: envField.string({
access: "public",
context: "client",
optional: true,
}),
},
},
fonts: [
{
name: "Wotfard",
cssVariable: "--font-wotfard",
fallbacks: ["sans-serif"],
provider: fontProviders.local(),
options: {
variants: [
{
src: ["./src/assets/fonts/wotfard.woff2"],
},
],
},
},
{
name: "Sriracha",
cssVariable: "--font-sriracha",
fallbacks: ["cursive"],
provider: fontProviders.local(),
options: {
variants: [
{
src: ["./src/assets/fonts/sriracha.woff2"],
},
],
},
},
{
name: "Cartograph CF",
cssVariable: "--font-cartograph",
fallbacks: ["monospace"],
provider: fontProviders.local(),
options: {
variants: [
{
src: ["./src/assets/fonts/cartograph-cf.woff2"],
},
],
},
},
{
name: "Cascadia Code",
cssVariable: "--font-cascadia-code",
fallbacks: ["monospace"],
provider: fontProviders.local(),
options: {
variants: [
{
src: ["./src/assets/fonts/cascadia-code.woff2"],
},
],
},
},
],
experimental: {
rustCompiler: true,
},
});