-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
39 lines (37 loc) · 1.05 KB
/
astro.config.ts
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
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import tailwindcss from "@tailwindcss/vite";
import expressiveCode, { ExpressiveCodeTheme } from "astro-expressive-code";
import { defineConfig } from "astro/config";
import fs from "node:fs";
import path from "node:path";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeSlug from "rehype-slug";
const jsoncString = fs.readFileSync(
path.join(import.meta.dirname, "./src/lib/theme.jsonc"),
"utf-8"
);
const myTheme = ExpressiveCodeTheme.fromJSONString(jsoncString);
// https://astro.build/config
export default defineConfig({
vite: {
plugins: [tailwindcss()]
},
prefetch: {
defaultStrategy: "tap"
},
markdown: {
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings]
},
integrations: [
sitemap(),
expressiveCode({
themes: [myTheme],
frames: {
showCopyToClipboardButton: true
}
}),
mdx()
],
site: "https://navithecoderboi.me"
});