-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
astro.config.mjs
126 lines (124 loc) · 3.07 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import tailwind from "@astrojs/tailwind";
import svelte from "@astrojs/svelte";
// https://astro.build/config
export default defineConfig({
site: "https://baomidou.com",
integrations: [
starlight({
title: "MyBatis-Plus",
logo: {
src: "./src/assets/logo.svg",
},
head: [
{
tag: 'script',
attrs: {
src: 'https://www.googletagmanager.com/gtag/js?id=G-7Y35RMZFVD',
async: true,
}
},
{
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7Y35RMZFVD');
`
},
{
tag: 'script',
content: `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?577e65b88c06c034335c395caa4b6205";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`
},
{
tag: 'script',
attrs: {
src: 'https://cdn.wwads.cn/js/makemoney.js',
async: true,
}
}
],
customCss: ["./src/styles/tailwind.css", "./src/styles/custom.css"],
components: {
Footer: "./src/components/Footer.astro",
Header: "./src/components/Header.astro",
Sidebar: "./src/components/Sidebar.astro",
PageSidebar: "./src/components/PageSidebar.astro",
},
locales: {
root: {
label: "简体中文",
lang: "zh-CN",
}
},
editLink: {
baseUrl: 'https://github.com/baomidou/mybatis-plus-doc/edit/master',
},
lastUpdated: true,
social: {
github: "https://github.com/baomidou/mybatis-plus",
},
sidebar: [
{
label: "简介",
link: "/introduce",
},
{
label: "从这里开始",
autogenerate: {
directory: "getting-started",
},
},
{
label: "指南",
autogenerate: {
directory: "guides",
},
},
{
label: "插件",
autogenerate: {
directory: "plugins",
},
},
{
label: "参考",
autogenerate: {
directory: "reference",
},
},
{
label: "资源",
autogenerate: {
directory: "resources",
},
},
],
}),
tailwind({
applyBaseStyles: false,
}),
svelte(),
],
vite: {
build: {
rollupOptions: {
output: {
entryFileNames: 'entry.[hash].mjs',
chunkFileNames: 'chunks/chunk.[hash].mjs',
assetFileNames: 'assets/asset.[hash][extname]',
},
},
},
},
});