-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
62 lines (61 loc) · 1.52 KB
/
astro.config.ts
File metadata and controls
62 lines (61 loc) · 1.52 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
import { defineConfig } from "astro/config";
import unpluginFavicons from "@openscript/unplugin-favicons/vite";
import { C } from "./src/site.config";
import mdx from "@astrojs/mdx";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import search from "./src/integrations/search";
import sitemap from "@astrojs/sitemap";
import nanostoresI18n from "astro-nanostores-i18n";
import de from "./src/translations/de.json";
import en from "./src/translations/en.json";
export default defineConfig({
prefetch: true,
build: {
format: "file",
},
i18n: {
defaultLocale: C.DEFAULT_LOCALE,
locales: Object.keys(C.LOCALES),
},
markdown: {
shikiConfig: {
themes: {
light: "github-light",
dark: "github-dark",
},
},
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
},
vite: {
plugins: [
unpluginFavicons({
logo: "res/icon.png",
inject: true,
favicons: {
theme_color: C.SETTINGS.BROWSER.THEME_COLOR,
icons: {
android: true,
appleIcon: true,
favicons: true,
windows: true,
yandex: true,
appleStartup: false,
},
},
}),
],
},
integrations: [
nanostoresI18n({
addMiddleware: true,
translations: {
de,
en,
},
}),
search(),
mdx(),
sitemap({ i18n: { defaultLocale: C.DEFAULT_LOCALE, locales: C.LOCALES } }),
],
});