-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
173 lines (166 loc) · 4.93 KB
/
docusaurus.config.js
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// @ts-check
const PREVIEW = process.env.PREVIEW ?? "false";
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "LeanCloud 开发者文档",
url: "https://docs.leancloud.cn",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/lc-favicon.ico",
trailingSlash: true,
customFields: {
searchUrl: "https://lc-doc-search-api.leanapp.cn/search",
upItemListIndexUrl: "https://lc-doc-search-check-log.leanapp.cn/api/check-log-up",
aiSearchUrl :"https://tds-doc-search-ai-api.ap-sg.tdsapps.com/api/ai-search?type=LC",
aiSearchEnUrl :"https://tds-doc-search-ai-api.ap-sg.tdsapps.com/api/ai-search?type=LCen",
searchProviderName: "LeanDB Elasticsearch",
searchProviderWebsite: "https://docs.leancloud.cn/sdk/engine/database/es/",
mainDomainHost: "https://www.leancloud.cn",
dcDomainHost: "https://www.leancloud.cn",
},
i18n: {
localeConfigs: {
en: {
label: "English",
},
"zh-Hans": {
label: "简体中文",
},
},
defaultLocale: "zh-Hans",
locales: ["zh-Hans", "en"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
routeBasePath: "/",
lastVersion: "current",
versions: {
current: {
label: "v3",
},
},
},
theme: {
customCss: require.resolve("./src/styles/index.scss"),
},
googleAnalytics: {
trackingID: "UA-73963350-1",
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
items: [
{
label: "文档首页",
to: "/",
position: "right",
activeBaseRegex: "^/(?!.+)",
},
{
label: 'API 文档',
position: 'right',
items: [
{
label: 'Android/Java SDK API',
href: 'https://leancloud.github.io/java-unified-sdk/',
},
{
label: 'Objective-C SDK API',
href: 'https://leancloud.github.io/objc-sdk/',
},
{
label: 'Swfit SDK API',
href: 'https://leancloud.github.io/swift-sdk/',
},
{
label: 'Flutter 数据存储 SDK API',
href: 'https://pub.dev/documentation/leancloud_storage/latest/leancloud_storage/leancloud_storage-library.html',
},
{
label: 'Flutter 即时通讯 SDK API',
href: 'https://pub.dev/documentation/leancloud_official_plugin/latest/leancloud_plugin/leancloud_plugin-library.html',
},
{
label: 'JavaScript 数据存储 SDK API',
href: 'https://leancloud.github.io/javascript-sdk/docs/',
},
{
label: 'JavaScript 即时通讯 SDK API',
href: 'https://leancloud.github.io/js-realtime-sdk/docs/',
},
{
label: 'JavaScript 多人在线对战 SDK API',
href: 'https://leancloud.github.io/Play-SDK-JS/doc/global.html',
},
{
label: 'Python SDK API',
href: 'https://leancloud.github.io/python-sdk/',
},
{
label: 'PHP SDK API',
href: 'https://leancloud.github.io/php-sdk/',
},
{
label: 'Go SDK API',
href: 'https://pkg.go.dev/github.com/leancloud/go-sdk/leancloud',
},
{
label: '.NET SDK API',
href: 'https://leancloud.github.io/csharp-sdk/html/',
}
],
},
{
label: '资源',
position: 'right',
items: [
{
label: 'SDK',
href: '/sdk/sdk-page/',
},
{
label: 'Demo',
to: '/demo',
}
],
},
{
label: "云课堂",
to: "/classroom",
position: "right",
},
{
type: "localeDropdown",
position: "right",
}
],
},
prism: {
theme: require("./src/theme/prism-taptap"),
additionalLanguages: ["csharp", "java", "php", "groovy", "swift", "dart"],
},
image: "/img/logo.svg",
metadata: [
{
name: "keywords",
content: "leancloud 开发者 文档",
},
],
colorMode: {
defaultMode: "light",
disableSwitch: true,
},
}),
plugins: ["docusaurus-plugin-sass"],
};
module.exports = config;