-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathastro.config.mjs
70 lines (69 loc) · 2.06 KB
/
astro.config.mjs
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
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import { SITE } from "./src/config";
import expressiveCode from "astro-expressive-code";
import mdx from "@astrojs/mdx";
import { remarkReadingTime } from './src/plugins/remark-reading-time.mjs';
// https://astro.build/config
export default defineConfig({
site: SITE.website,
image: {
domains: ["bucket.liruifengv.com"]
},
integrations: [
tailwind(),
react(),
sitemap(),
expressiveCode({
themes: ["material-theme-darker"],
plugins: [{
name: "custom-style",
baseStyles: () => `
.frame.is-terminal:not(.has-title) .header {display: none;}
.frame .header {border-bottom: 2px solid #313131;}
.frame.is-terminal .header::before {display: none;}
.frame.is-terminal:not(.has-title) {
--button-spacing: 0.4rem;
}
.frame.is-terminal:not(.has-title) code, .frame.is-terminal:not(.has-title) pre {
border-radius: 4px
}
.frame.is-terminal .header {
justify-content: initial;
font-weight: initial;
padding-left: 1rem;
color: #fff;
}
`,
hooks: {}
}],
useThemedScrollbars: false,
useThemedSelectionColors: false,
styleOverrides: {
uiLineHeight: "inherit",
codeFontSize: "0.875rem",
codeLineHeight: "1.25rem",
borderRadius: "4px",
borderWidth: "0px",
codePaddingInline: "1rem",
codeFontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;'
}
}),
mdx()
],
markdown: {
shikiConfig: {
theme: "material-theme-darker",
wrap: false
},
remarkPlugins: [remarkReadingTime],
},
vite: {
optimizeDeps: {
exclude: ["@resvg/resvg-js"]
}
},
scopedStyleStrategy: "where"
});