-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
42 lines (39 loc) · 1.08 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";
import mdx from "@astrojs/mdx";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import remarkToc from 'remark-toc';
// https://astro.build/config
export default defineConfig({
// Enable React to support React JSX components.
site: "https://nkd.red",
compressHTML: true,
integrations: [react(), tailwind(), mdx()],
markdown: {
remarkPlugins: [
remarkMath,
remarkToc,
],
rehypePlugins: [
[rehypeKatex, {
macros: {
'\\d': '\\mathrm{d}',
'\\E': '\\mathbb{E}',
'\\C': '\\mathbb{C}',
'\\R': '\\mathbb{R}',
'\\N': '\\mathbb{N}',
'\\Q': '\\mathbb{Q}',
'\\bigO': '\\mathcal{O}',
'\\abs': '|#1|',
'\\set': '\\{ #1 \\}',
'\\indep': "{\\perp\\mkern-9.5mu\\perp}",
'\\nindep': "{\\not\\!\\perp\\!\\!\\!\\perp}",
"\\latex": "\\LaTeX",
"\\katex": "\\KaTeX",
},
}]
]
}
});