c043b2373b
- Set output: 'static' in astro.config.mjs; remove Vercel/Netlify adapters - Remove API routes (contact, newsletter) incompatible with static mode - Add Azure SWA deploy workflow using @azure/static-web-apps-cli via npx - Add public/staticwebapp.config.json for SWA routing and 404 fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
59 lines
1.9 KiB
JavaScript
59 lines
1.9 KiB
JavaScript
import { defineConfig, envField } from 'astro/config';
|
|
import mdx from '@astrojs/mdx';
|
|
import sitemap from '@astrojs/sitemap';
|
|
import react from '@astrojs/react';
|
|
import icon from 'astro-icon';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
output: 'static',
|
|
site: process.env.SITE_URL || 'https://example.com',
|
|
|
|
env: {
|
|
schema: {
|
|
SITE_URL: envField.string({ context: 'server', access: 'public', optional: true }),
|
|
PUBLIC_GA_MEASUREMENT_ID: envField.string({ context: 'client', access: 'public', optional: true }),
|
|
PUBLIC_GTM_ID: envField.string({ context: 'client', access: 'public', optional: true }),
|
|
RESEND_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
RESEND_FROM_EMAIL: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
NEWSLETTER_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true }),
|
|
GOOGLE_SITE_VERIFICATION: envField.string({ context: 'server', access: 'public', optional: true }),
|
|
BING_SITE_VERIFICATION: envField.string({ context: 'server', access: 'public', optional: true }),
|
|
PUBLIC_GOOGLE_MAPS_API_KEY: envField.string({ context: 'client', access: 'public', optional: true, default: '' }),
|
|
PUBLIC_CONSENT_ENABLED: envField.boolean({ context: 'client', access: 'public', optional: true, default: false }),
|
|
PUBLIC_PRIVACY_POLICY_URL: envField.string({ context: 'client', access: 'public', optional: true, default: '' }),
|
|
},
|
|
},
|
|
|
|
image: {
|
|
layout: 'constrained',
|
|
},
|
|
|
|
integrations: [
|
|
react(),
|
|
mdx(),
|
|
sitemap(),
|
|
icon(),
|
|
],
|
|
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
},
|
|
|
|
i18n: {
|
|
defaultLocale: 'de',
|
|
locales: ['de', 'fr', 'it', 'en'],
|
|
routing: {
|
|
prefixDefaultLocale: false,
|
|
},
|
|
},
|
|
|
|
markdown: {
|
|
shikiConfig: {
|
|
theme: 'github-dark',
|
|
wrap: true,
|
|
},
|
|
},
|
|
|
|
});
|