website/astro.config.mjs

58 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-03-26 16:36:18 +01:00
import { defineConfig } from 'astro/config';
import { i18n, filterSitemapByDefaultLocale } from "astro-i18n-aut/integration";
import sitemap from "@astrojs/sitemap";
2024-04-06 15:20:42 +02:00
import Icons from 'unplugin-icons/vite'
2024-03-27 01:51:42 +01:00
import mdx from '@astrojs/mdx';
import glsl from 'vite-plugin-glsl';
2024-04-06 18:23:39 +02:00
import remarkToc from 'remark-toc'
2024-03-26 16:36:18 +01:00
import svelte from "@astrojs/svelte";
2024-03-28 18:30:52 +01:00
import UnoCSS from 'unocss/astro'
2024-03-26 16:36:18 +01:00
const defaultLocale = "de";
const locales = {
en: "en", // the `defaultLocale` value must present in `locales` keys
de: "de",
};
// https://astro.build/config
export default defineConfig({
site: "https://max-richter.dev",
trailingSlash: "never",
2024-03-28 18:30:52 +01:00
prefetch: true,
2024-03-26 16:36:18 +01:00
build: {
format: "file",
},
2024-03-27 01:51:42 +01:00
vite: {
plugins: [
glsl(),
2024-04-06 15:20:42 +02:00
Icons({
compiler: 'svelte',
}),
2024-03-27 01:51:42 +01:00
],
},
2024-03-26 16:36:18 +01:00
integrations: [
2024-04-06 18:23:39 +02:00
mdx({
remarkPlugins: [
remarkToc
]
}),
2024-03-26 16:36:18 +01:00
svelte(),
2024-03-28 18:30:52 +01:00
UnoCSS({
injectReset: true
}),
2024-03-26 16:36:18 +01:00
i18n({
exclude: ["pages/**/*.json.ts", "pages/api/**/*",],
locales,
defaultLocale,
}),
sitemap({
i18n: {
locales,
defaultLocale,
},
filter: filterSitemapByDefaultLocale({ defaultLocale }),
}),
]
});