import { defineConfig } from 'astro/config'
import preact from '@astrojs/preact'

import mdx from '@astrojs/mdx'
import remarkMath from 'remark-math'

import yaml from '@rollup/plugin-yaml'

// https://astro.build/config
export default defineConfig({
    vite: {
        plugins: [yaml()],
    },
    server: {
        port: 3000,
    },
    markdown: {
        remarkPlugins: [remarkMath],
        shikiConfig: {
            theme: 'github-light',
        },
    },
    integrations: [
        preact({
            compat: true,
        }),
        mdx({
            remarkPlugins: [remarkMath],
        }),
    ],
    output: 'static',
})
