Files
zhaoguiyang.site/astro.config.mjs
joyzhao 398093dde9 feat(mdx): add MDX support and migrate markdown files to MDX
- Add @astrojs/mdx integration to enable MDX support
- Migrate all markdown files (.md) to MDX (.mdx) format
- Create HighlightBox component for enhanced content styling
- Update astro config to include MDX integration
- Add documentation guide for MDX integration
2025-06-20 11:36:11 +08:00

46 lines
1.0 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import tailwindcss from "@tailwindcss/vite";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import mdx from '@astrojs/mdx';
// https://astro.build/config
export default defineConfig({
site: 'https://zhaoguiyang.com',
markdown: {
shikiConfig: {
theme: 'dracula',
},
},
integrations: [
react(),
sitemap({
i18n: {
defaultLocale: 'en',
locales: {
en: 'en',
zh: 'zh'
},
},
}),
mdx()
],
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"],
// Enable routing strategy for detecting the locale from the URL path
routing: {
// URLs for the defaultLocale (en) will not have a /en/ prefix
prefixDefaultLocale: false,
}
},
});