generated from openscript-ch/gatsby-starter-dogmatism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
59 lines (58 loc) · 1.59 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
import { defineConfig } from "astro/config";
import unpluginFavicons from "@anolilab/unplugin-favicons/vite";
import { C } from "./src/configuration";
import mdx from "@astrojs/mdx";
import { remarkGitInfo } from "./src/remark/remark-git-info";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import { remarkExcerpt } from "./src/remark/remark-excerpt";
import search from "./src/integrations/search";
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
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",
},
},
remarkPlugins: [
[remarkExcerpt, { length: C.SETTINGS.BLOG.EXCERPT_LENGTH }],
[remarkGitInfo, { remoteUrlBase: C.SETTINGS.REMOTE.BASE_URL }],
],
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
},
vite: {
plugins: [
unpluginFavicons({
logo: "res/brand/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: [
search(),
mdx(),
sitemap({ i18n: { defaultLocale: C.DEFAULT_LOCALE, locales: C.LOCALES } }),
],
});