astro.config.mjs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @ts-check
  2. import { defineConfig } from 'astro/config';
  3. import sitemap from '@astrojs/sitemap';
  4. import { fileURLToPath } from 'url';
  5. const SITE_URL = 'https://fmode.cn';
  6. const __dirname = fileURLToPath(new URL('.', import.meta.url));
  7. export default defineConfig({
  8. site: SITE_URL,
  9. integrations: [
  10. sitemap({
  11. i18n: {
  12. defaultLocale: 'zh',
  13. locales: {
  14. zh: 'zh-CN',
  15. en: 'en-US',
  16. },
  17. },
  18. }),
  19. ],
  20. vite: {
  21. resolve: {
  22. alias: {
  23. '@': fileURLToPath(new URL('./src', import.meta.url)),
  24. '@components': fileURLToPath(new URL('./src/components', import.meta.url)),
  25. '@layouts': fileURLToPath(new URL('./src/layouts', import.meta.url)),
  26. '@i18n': fileURLToPath(new URL('./src/i18n', import.meta.url)),
  27. '@data': fileURLToPath(new URL('./src/data', import.meta.url)),
  28. '@utils': fileURLToPath(new URL('./src/utils', import.meta.url)),
  29. '@assets': fileURLToPath(new URL('./src/assets', import.meta.url)),
  30. },
  31. },
  32. },
  33. markdown: {
  34. shikiConfig: {
  35. theme: 'github-dark',
  36. },
  37. },
  38. });