-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathastro.config.ts
More file actions
88 lines (85 loc) · 2.42 KB
/
Copy pathastro.config.ts
File metadata and controls
88 lines (85 loc) · 2.42 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { defineConfig } from "astro/config";
import remarkLesetid from "remark-lesetid/astro";
import {
rehypeTitles,
rehypeCodeCopy,
rehypePreClass,
rehypeH1,
} from "./src/rehype";
import { rehypeHeadingIds, type ShikiConfig } from "@astrojs/markdown-remark";
import rehypeShiki from "@shikijs/rehype";
import { remarkAlert } from "remark-github-blockquote-alert";
import arraybuffer from "vite-plugin-arraybuffer";
import mdx from "@astrojs/mdx";
import { remarkMark } from "remark-mark-highlight";
import rehypeSectionHeadings from "@maxmmyron/rehype-section-headings";
import tailwindcss from "@tailwindcss/vite";
import { remarkCodeMeta } from "./src/remark";
// https://astro.build/config
export default defineConfig({
// your configuration options here...
// https://docs.astro.build/en/reference/configuration-reference/
integrations: [
mdx(),
// tailwind({
// applyBaseStyles: false
// }),
],
devToolbar: {
enabled: false,
},
output: "static",
site: "https://ayats.org",
markdown: {
gfm: true,
syntaxHighlight: false,
// shikiConfig: {
// // theme: 'github-dark',
// light: "github-light",
// dark: "ayu-dark",
// }
// },
remarkPlugins: [remarkMark, remarkAlert, remarkLesetid, remarkCodeMeta],
rehypePlugins: [
rehypeH1,
rehypeHeadingIds,
rehypeTitles,
rehypeCodeCopy,
[
rehypeShiki,
{
themes: {
dark: "github-dark",
light: "github-light",
},
defaultColor: false,
} as ShikiConfig,
],
rehypePreClass,
[
rehypeSectionHeadings,
{
sectionDataAttribute: "data-heading-id",
},
],
],
},
build: {
format: "file",
},
vite: {
plugins: [arraybuffer(), tailwindcss()],
optimizeDeps: {
exclude: ["@resvg/resvg-js"],
},
},
trailingSlash: "never",
// https://docs.astro.build/en/reference/experimental-flags/client-prerender
prefetch: {
// prefetchAll: true,
defaultStrategy: "viewport",
},
experimental: {
clientPrerender: true,
},
});