Newer
Older
hello-programmer-world / astro.config.mjs
@h.sakamoto h.sakamoto on 29 Jan 665 bytes commit
// @ts-check

import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import tailwindcss from '@tailwindcss/vite';
import expressiveCode from 'astro-expressive-code';
import { defineConfig } from 'astro/config';
import remarkToc from 'remark-toc';
import remarkCodeFile from './src/plugins/remarkCodeFile';

// https://astro.build/config
export default defineConfig({
  vite: {
    plugins: [tailwindcss()]
  },

  integrations: [
    expressiveCode({
      themes: ["github-dark", "github-light"],
    }),
    mdx({
      remarkPlugins: [remarkToc, remarkCodeFile],
    }),
    react()
  ],

  markdown: {
    remarkPlugins: [remarkCodeFile],
  },
});