import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse";
import sitemap from "@astrojs/sitemap";
import { SITE } from "./src/config";
import "@iconify-json/fa6-solid";

import icon from "astro-icon";

// https://astro.build/config
export default defineConfig({
  site: SITE.website,
  integrations: [
    react(), sitemap(),
    icon({include: {
      'fa6-solid': ["*"],
      'simple-icons': ["*"]
    }})
  ],
  markdown: {
    remarkPlugins: [remarkToc, [remarkCollapse, {
      test: "Table of contents"
    }]],
    shikiConfig: {
      theme: "one-dark-pro",
      wrap: true
    }
  },
  vite: {
    optimizeDeps: {
      exclude: ["@resvg/resvg-js"]
    }
  },
  scopedStyleStrategy: "where",
});