Files
zhaoguiyang.site/astro.config.mjs
joyzhao c698d1ae45 feat: add sitemap integration and configure site URL
- Add @astrojs/sitemap dependency and configure it in astro.config.mjs
- Set site URL and markdown theme in astro config
- Remove unused theme variables from global.css
2025-06-19 21:17:01 +08:00

39 lines
876 B
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import tailwindcss from "@tailwindcss/vite";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
site: 'https://zhaoguiyang.com',
markdown: {
shikiConfig: {
theme: 'dracula',
},
},
vite: {
plugins: [tailwindcss()],
},
i18n: {
// The default locale to fall back to if a page isn't available in the active locale
defaultLocale: "en",
// A list of all locales supported by the site
locales: ["en", "zh"],
routing: {
// URLs for the defaultLocale (en) will not have a /en/ prefix
prefixDefaultLocale: false,
}
},
integrations: [react(), sitemap({
i18n: {
defaultLocale: 'en',
locales: {
en: 'en',
zh: 'zh'
},
},
})]
});