-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
70 lines (67 loc) · 1.94 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import { remarkReadingTime } from "./src/utils/remark-reading-time.mjs";
import tailwind from "@astrojs/tailwind";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import {
remarkDirectivesRestoration,
starlightAsides,
} from "./src/utils/remark-admon";
import expressiveCode from "astro-expressive-code";
import { rehypeShiki } from "@astrojs/markdown-remark";
import rehypeMermaid from "rehype-mermaid";
import partytown from "@astrojs/partytown";
// import expressiveCode from "astro-expressive-code";
// import remarkMermaid from "remark-mermaidjs";
// https://astro.build/config
export default defineConfig({
site: "https://www.wjwei.blog",
integrations: [
expressiveCode(),
mdx({
remarkPlugins: [
// remarkMermaid,
remarkMath,
remarkReadingTime,
...starlightAsides(),
remarkDirectivesRestoration,
],
rehypePlugins: [rehypeKatex, rehypeMermaid, rehypeShiki],
syntaxHighlight: "shiki",
shikiConfig: {
// https://docs.astro.build/en/guides/markdown-content/#syntax-highlighting
themes: {
dark: "catppuccin-mocha",
light: "catppuccin-latte",
},
},
}),
sitemap(),
tailwind(),
partytown({
config: {
forward: ["dataLayer.push"],
},
}),
],
// NOTE: Make sure this matches your supported languages in the file: src/consts.ts
i18n: {
defaultLocale: "en",
locales: ["en"],
},
output: "static",
markdown: {
remarkPlugins: [remarkReadingTime],
rehypePlugins: [rehypeKatex, rehypeMermaid, rehypeShiki],
syntaxHighlight: "shiki",
shikiConfig: {
// https://docs.astro.build/en/guides/markdown-content/#syntax-highlighting
themes: {
dark: "catppuccin-mocha",
light: "catppuccin-latte",
},
},
},
});