Website/astro.config.mjs

43 Zeilen
1.6 KiB
JavaScript

2024-02-16 23:48:52 +01:00
import {defineConfig, sharpImageService} from "astro/config";
2023-09-20 20:52:40 +02:00
import svelte from "@astrojs/svelte";
import tailwind from "@astrojs/tailwind";
2023-11-03 20:31:27 +01:00
import configureI18n from "./astro-i18n.adapter";
2023-12-10 17:14:10 +01:00
import sitemap from "@astrojs/sitemap";
import robotsTxt from "astro-robots-txt";
2023-12-25 21:54:40 +01:00
import {resolve} from "node:url";
import path from "node:path";
2024-02-16 23:48:52 +01:00
import mdx from "@astrojs/mdx";
2023-09-20 20:52:40 +02:00
// https://astro.build/config
export default defineConfig({
2024-02-16 23:48:52 +01:00
output: "static", image: {
service: sharpImageService(),
}, compressHTML: true, site: "https://steamwar.de", integrations: [svelte(), tailwind({
configFile: "./tailwind.config.cjs",
}), configureI18n(), sitemap({
i18n: {
defaultLocale: "en", locales: {
en: "en-US", de: "de-DE",
},
},
}), robotsTxt({
policy: [{
userAgent: "*", disallow: ["/admin", "/login", "/dashboard", "/de", "/_astro"],
}],
}), mdx()], vite: {
resolve: {
alias: {
"@components": path.resolve("./src/components"),
"@pages": path.resolve("./src/pages"),
"@styles": path.resolve("./src/styles"),
"@utils": path.resolve("./src/util"),
"@type": path.resolve("./src/components/types"),
"@images": path.resolve("./src/images"),
"@layouts": path.resolve("./src/layouts"),
"@repo": path.resolve("./src/components/repo"),
"@stores": path.resolve("./src/components/stores"),
},
},
},
2023-12-03 19:31:29 +01:00
});