-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
executable file
·67 lines (66 loc) · 1.71 KB
/
Copy pathastro.config.ts
File metadata and controls
executable file
·67 lines (66 loc) · 1.71 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
import { defineConfig, envField } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";
import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse";
import { SITE } from "./src/config";
// https://astro.build/config
export default defineConfig({
site: SITE.website,
integrations: [
sitemap({
filter: page => SITE.showArchives || !page.endsWith("/archives"),
}),
],
markdown: {
remarkPlugins: [
[
remarkToc,
{
// 使用标题“目录”来定位并生成目录
heading: "目录",
tight: true, // 紧凑列表
ordered: false, // 使用无序列表
maxDepth: 3, // 仅包含到 h3
},
],
[
remarkCollapse,
{
test: "目录",
summary: "展开", // 改成中文 summary
open: false, // 默认收起;想展开就设 true
},
],
],
shikiConfig: {
// For more themes, visit https://shiki.style/themes
themes: { light: "github-light-default", dark: "github-dark" },
wrap: true,
},
},
vite: {
plugins: [tailwindcss()],
optimizeDeps: {
exclude: ["@resvg/resvg-js"],
},
},
image: {
// Used for all Markdown images; not configurable per-image
// Used for all `<Image />` and `<Picture />` components unless overridden with a prop
experimentalLayout: "constrained",
},
env: {
schema: {
PUBLIC_GOOGLE_SITE_VERIFICATION: envField.string({
access: "public",
context: "client",
optional: true,
}),
},
},
experimental: {
responsiveImages: true,
preserveScriptOrder: true,
},
});