From c2897a7aa99c4815b1998e79e4c2d0a03ab3c357 Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Mon, 27 Apr 2026 13:10:14 +0800 Subject: [PATCH] feat: inject markdown ast plugins into astro config --- astro.config.mjs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 508cbec..c915832 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,11 +1,16 @@ -// @ts-check import { defineConfig } from 'astro/config'; +import tailwind from '@astrojs/tailwind'; +import remarkMath from 'remark-math'; +import rehypeKatex from 'rehype-katex'; +import rehypePrettyCode from 'rehype-pretty-code'; -import tailwindcss from '@tailwindcss/vite'; - -// https://astro.build/config export default defineConfig({ - vite: { - plugins: [tailwindcss()] - } -}); \ No newline at end of file + integrations: [tailwind()], + markdown: { + remarkPlugins: [remarkMath], + rehypePlugins: [ + rehypeKatex, + [rehypePrettyCode, { theme: 'github-dark' }] + ] + } +});