// @ts-check
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import preact from "@astrojs/preact";
import node from "@astrojs/node";
import icon from "astro-icon";
import mdx from "@astrojs/mdx";

// https://astro.build/config
export default defineConfig({
  site: "https://atri.dad",
  redirects: {
    "/feed": "/rss.xml",
  },
  output: "server",
  vite: {
    plugins: [tailwindcss()],
  },

  // Configure default image behavior
  image: {
    responsiveStyles: true,
    layout: "constrained",
    objectFit: "cover",
    objectPosition: "center",
  },

  integrations: [
    preact(),
    mdx(),
    icon({
      include: {
        mdi: [
          "clock",
          "tag",
          "arrow-right",
          "link",
          "email",
          "rss",
          "download",
          "web",
          "arrow-left",
        ],
        "simple-icons": [
          "gitea",
          "bluesky",
          "react",
          "typescript",
          "astro",
          "go",
          "postgresql",
          "redis",
          "docker",
          "github",
          "linkedin",
        ],
      },
    }),
  ],

  adapter: node({
    mode: "standalone",
  }),
});
