// @ts-check
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import cloudflare from '@astrojs/cloudflare'; // Import cloudflare adapter

// https://astro.build/config
export default defineConfig({
  site: 'https://argobox.com', // Keep original site URL
  output: 'static',
  adapter: cloudflare(), // Enable cloudflare adapter
  integrations: [
    mdx(),
    sitemap(),
    tailwind(),
  ],
  markdown: { // Add markdown config
    shikiConfig: {
      theme: 'one-dark-pro',
      wrap: true
    },
    remarkPlugins: [],
    rehypePlugins: []
  },
  compressHTML: false, // Disable HTML compression to avoid parsing errors
  build: { // Add build format
    format: 'file',
  }
});