-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
83 lines (77 loc) · 1.86 KB
/
Copy pathastro.config.ts
File metadata and controls
83 lines (77 loc) · 1.86 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
import { defineConfig, sharpImageService } from "astro/config";
import react from "@astrojs/react";
import mdx from "@astrojs/mdx";
import { remarkReadingTime } from "./src/remark/remarkReadingTime";
import { rehypeHeadingIds } from "@astrojs/markdown-remark";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import sitemap from "@astrojs/sitemap";
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
import expressiveCode from "astro-expressive-code";
import tailwindcss from "@tailwindcss/vite";
import cloudflare from "@astrojs/cloudflare";
// https://astro.build/config
export default defineConfig({
site: "https://www.nray.dev",
trailingSlash: "always",
prefetch: {
prefetchAll: true,
},
devToolbar: {
enabled: false,
},
image: {
service: sharpImageService(),
},
markdown: {
syntaxHighlight: false,
remarkPlugins: [remarkReadingTime],
rehypePlugins: [
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
properties: {
"aria-label": "jump link",
className: `heading-link`,
},
content: {
type: "text",
value: "",
},
},
],
],
},
integrations: [
react(),
expressiveCode({
themes: ["ayu-dark"],
styleOverrides: {
borderRadius: "0",
codeFontSize: "1rem",
},
defaultProps: {
showLineNumbers: false,
},
plugins: [pluginLineNumbers()],
}),
mdx({
smartypants: false,
}),
sitemap({
filter: (page) =>
!page.startsWith("https://www.nray.dev/rss.xml") &&
!page.includes("/demos/"),
}),
],
vite: {
plugins: [tailwindcss()],
build: {
sourcemap: true,
},
},
adapter: cloudflare({
imageService: "compile",
prerenderEnvironment: "node",
}),
});