personal-website/astro.config.js

18 lines
635 B
JavaScript

import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import keystatic from '@keystatic/astro';
import tailwind from '@astrojs/tailwind';
import flattenListItems from 'mdast-flatten-listitem-paragraphs';
import mdx from '@astrojs/mdx';
const prod = process.env.NODE_ENV === 'production';
// https://astro.build/config
export default defineConfig({
site: import.meta.env.PROD ? 'https://filipesm.eu' : 'http://localhost:1234',
integrations: [...(!prod ? [keystatic(), react()] : []), mdx(), tailwind()],
markdown: {
remarkPlugins: [flattenListItems],
},
output: prod ? 'static' : 'hybrid',
});