-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
90 lines (82 loc) · 2.17 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
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
import { defineConfig } from 'astro/config';
import svelte from "@astrojs/svelte";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import { loadEnv } from "vite";
import modernizr from "astro-modernizr";
import AutoImport from 'astro-auto-import';
import MDXCodeBlocks, { mdxCodeBlockAutoImport } from 'astro-mdx-code-blocks';
import absent from "./src/assets/code-themes/absent-light.json";
import readingTime from './src/remark/reading-time.mjs';
import { filterSitemap, serializeSitemap } from './src/sitemap-config';
const site = "https://www.yonic.blog"
const {
USE_CONTENT_COLLECTION_CACHE
} = loadEnv(process.env.NODE_ENV, process.cwd(), "");
// https://astro.build/config
export default defineConfig({
site,
markdown: {
remarkPlugins: [readingTime],
shikiConfig: {
theme: absent
}
},
devToolbar: {
enabled: false
},
integrations: [
svelte(),
AutoImport({
imports: [
mdxCodeBlockAutoImport("@lib/components/CodeBlock.astro"),
'@lib/components/TextBubble.astro',
'@lib/components/Chara.astro',
'@lib/components/PlayerLink.astro',
'@lib/components/ImageGrid.astro',
'@lib/components/Figure.astro',
'@lib/components/VersionBranch.astro',
'@lib/components/Ruby.astro',
{
'astro:assets': ['Image', 'Picture']
},
]
}),
MDXCodeBlocks(),
mdx(),
modernizr({
enableJSClass: false,
options: ["setClasses"],
featureDetects: [
"css/flexbox",
"img/webp",
"storage/sessionstorage"
]
}),
sitemap({
changefreq: "weekly",
filter: filterSitemap,
serialize: serializeSitemap,
customPages: [
`${site}/feeds/atom.xml`,
`${site}/feeds/atom-full.xml`,
]
})
],
scopedStyleStrategy: "class",
redirects: {
'/blog/article/biyonic-reading': '/blog/article/2023/06/biyonic-reading'
},
experimental: {
contentCollectionCache: (USE_CONTENT_COLLECTION_CACHE === "true") ?? false,
contentCollectionJsonSchema: true,
},
vite: {
build: {
target: "es2018"
},
resolve: {
preserveSymlinks: true
}
}
});