forked from RomanHauksson/academic-project-astro-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
61 lines (57 loc) · 1.38 KB
/
Copy pathastro.config.ts
File metadata and controls
61 lines (57 loc) · 1.38 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
60
61
import { defineConfig, fontProviders } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import icon from "astro-icon";
import mdx from "@astrojs/mdx";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import rehypeCitation from "rehype-citation";
import react from "@astrojs/react";
import astroExpressiveCode from "astro-expressive-code";
// https://astro.build/config
export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [
rehypeKatex,
[
rehypeCitation,
{
bibliography: "bibliography.bib",
linkCitations: true,
},
],
],
},
integrations: [
icon(),
astroExpressiveCode({
styleOverrides: {
borderRadius: "0.5rem",
borderWidth: "0",
codeBackground: ({ theme }) =>
`var(--color-zinc-${theme.type === "dark" ? "800" : "200"})`,
frames: {
shadowColor: "transparent",
},
},
themeCssSelector: (theme) =>
theme.type === "dark" ? `[data-theme="dark"]` : `[data-theme="light"]`,
}),
mdx(),
react(),
],
fonts: [
{
provider: fontProviders.google(),
name: "Noto Sans",
cssVariable: "--font-noto-sans",
weights: ["100 900"],
},
],
image: {
responsiveStyles: true,
},
});