forked from EveSunMaple/Frosti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
29 lines (28 loc) · 838 Bytes
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwind from "@astrojs/tailwind";
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
export default defineConfig({
site: 'https://www.saroprock.com',
integrations: [mdx(), sitemap(), tailwind()],
markdown: {
remarkPlugins: [
remarkMath,
],
rehypePlugins: [
() => async (tree) => {
for (const node of tree.children) {
if (node.tagName === 'pre' && node.properties && node.properties.className) {
node.properties.className.push('mockup-code');
}
if (node.tagName === 'blockquote' && node.properties) {
node.properties.className = ['alert'];
}
}
},
rehypeKatex
]
}
});