- Removed `/services` and `/zh/services` pages. Migrated content to updated pages: `/uses`, `/about#contact-card`, and `/hire`. - Removed Framer Motion for better performance and simpler animations in `LanguageSwitcher`, `GlassHeader`, and other components. - Updated font sources to WOFF2 for better compression and added preload links for critical fonts. - Optimized Vite configuration with manual chunking for React libraries. - Replaced `client:load` with `client:idle` for non-critical client-side components like `GlassHeader`, `Footer`, and `BackToTop`.
56 lines
1.2 KiB
JavaScript
56 lines
1.2 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()],
|
|
build: {
|
|
cssCodeSplit: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'vendor-react': ['react', 'react-dom'],
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
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,
|
|
}
|
|
},
|
|
}); |