-
Notifications
You must be signed in to change notification settings - Fork 2
/
astro.config.mjs
36 lines (34 loc) · 1.34 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
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import astroExpressiveCode from 'astro-expressive-code';
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections';
import icon from "astro-icon";
import react from "@astrojs/react";
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import remarkMermaidToHtml from './src/plugins/remarkMermaidToHtml.mjs';
// https://astro.build/config
export default defineConfig({
site: 'https://example.com', // should be same as `site.url` in src/config.yml
markdown: {
remarkPlugins: [remarkMath, remarkMermaidToHtml],
rehypePlugins: [rehypeKatex],
syntaxHighlight: false
},
integrations: [astroExpressiveCode({
// You can use any of the themes bundled with Shiki by name,
// specify a path to JSON theme file, or pass an instance
// of the `ExpressiveCodeTheme` class here:
themes: ['dracula', 'dracula'],
shiki: {
// You can pass additional plugin options here,
// e.g. to load custom language grammars:
langs: [
// import('./some-exported-grammar.mjs'),
// JSON.parse(fs.readFileSync('./some-json-grammar.json', 'utf-8'))
]
},
plugins: [pluginCollapsibleSections()]
}), mdx(), sitemap(), icon(), react()],
});