import { defineConfig } from 'astro/config'; import sitemap from '@astrojs/sitemap'; import react from '@astrojs/react'; import { markdownSecurityPlugins } from './src/lib/markdown-security.js'; import { unified } from '@astrojs/markdown-remark'; // SITE_URL is hardcoded to ensure it's always the stable production URL. // Cloudflare Pages v3 build system doesn't reliably inject env vars to the // build process via the Variables and Secrets UI. We still pass SITE_URL // through the UI for any future tooling that reads it, but the canonical // site value lives here so RSS / sitemap / canonical / og:url are correct. const site = 'https://ai-static-blog.pages.dev'; export default defineConfig({ site, output: 'static', compressHTML: true, devToolbar: { enabled: false }, integrations: [sitemap(), react()], markdown: { processor: unified({ rehypePlugins: markdownSecurityPlugins }) } });