-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
33 lines (32 loc) · 853 Bytes
/
astro.config.mjs
File metadata and controls
33 lines (32 loc) · 853 Bytes
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
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import { defineConfig } from "astro/config";
import { BASE_URL } from "./src/consts.ts";
import { DEFAULT_LOCALE_SETTING, LOCALES_SETTING } from "./src/i18n/locales";
// https://astro.build/config
export default defineConfig({
site: "https://astro-cms-dpv.pages.dev", // Set your site's URL
i18n: {
defaultLocale: DEFAULT_LOCALE_SETTING,
locales: Object.keys(LOCALES_SETTING),
routing: {
prefixDefaultLocale: true,
redirectToDefaultLocale: false,
},
},
integrations: [
mdx(),
sitemap({
filter: (page) => page !== `${BASE_URL}/admin/`,
i18n: {
defaultLocale: DEFAULT_LOCALE_SETTING,
locales: Object.fromEntries(
Object.entries(LOCALES_SETTING).map(([key, value]) => [
key,
value.lang ?? key,
]),
),
},
}),
],
});