-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathastro.config.mjs
More file actions
59 lines (55 loc) · 1.48 KB
/
Copy pathastro.config.mjs
File metadata and controls
59 lines (55 loc) · 1.48 KB
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
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import { unified } from "@astrojs/markdown-remark";
import playformCompress from "@playform/compress";
import expressiveCode from "astro-expressive-code";
import icon from "astro-icon";
import { defineConfig } from "astro/config";
import rehypeExternalLinks from "rehype-external-links";
import rehypeKatex from "rehype-katex";
import remarkMath from "remark-math";
import { CODE_THEME, USER_SITE } from "./src/config.ts";
import updateConfig from "./src/integration/updateConfig.ts";
import { remarkReadingTime } from "./src/plugins/remark-reading-time";
// https://astro.build/config
export default defineConfig({
site: USER_SITE,
output: "static",
style: {
scss: {
includePaths: ["./src/styles"],
},
},
integrations: [updateConfig(), expressiveCode({
themes: [CODE_THEME],
styleOverrides: {
borderRadius: "0.75rem",
},
}), mdx(), icon(), sitemap(), tailwind({
configFile: "./tailwind.config.mjs",
}), playformCompress()],
markdown: {
processor: unified({
remarkPlugins: [remarkMath, remarkReadingTime],
rehypePlugins: [
rehypeKatex,
[
rehypeExternalLinks,
{
content: { type: "text", value: "↗" },
},
],
],
}),
},
vite: {
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
},
},
},
});