-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
312 lines (308 loc) · 10.3 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
require("dotenv").config();
const path = require("path");
const redirectJson = require("./redirects.json");
const tutorialData = require("./tutorial-units");
/** @type {import('@docusaurus/types/src/index').DocusaurusConfig} */
const siteConfig = {
title: "Eater Planet 吃货星球",
tagline: "先进的 B2C 电商解决方案",
url: "https://docs.ch871.com/",
baseUrl: "/",
projectName: "Eater Planet 吃货星球",
organizationName: "Dejavu Tech.",
trailingSlash: true,
favicon: "img/EP_favicon.png",
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
path: "./docs",
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/Dejavu-Tech/EP-documentation",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
versions: {
current: {
label: "2023-alpha",
},
'5.x.x': {
label: '5.x.x',
path: 'versioned_docs/version-5.x.x/',
},
},
lastVersion: "5.x.x",
admonitions: {
tag: ":::",
keywords: [
"additional",
"note",
"tip",
"info-tip",
"info",
"caution",
"danger",
"sourcecode",
"create-example",
],
},
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
blog: false,
theme: {
customCss: [
require.resolve("./src/css/custom.css"),
require.resolve("./src/css/split-pane.css"),
require.resolve("./src/css/demo-page.css"),
],
},
gtag: {
trackingID: "G-27Z1WY952H",
},
},
],
],
i18n: {
defaultLocale: "zh-CN",
locales: ["en", "zh-CN"],
path: 'i18n',
localeConfigs: {
"en": {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'en',
},
"zh-CN": {
label: 'zh-CN',
direction: 'ltr',
htmlLang: 'zh-CN',
calendar: 'gregory',
path: 'zh-CN',
},
},
},
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
redirects: redirectJson.redirects,
},
],
[
"docusaurus-plugin-copy",
{
id: "Copy Workers",
path: "static/workers",
context: "workers",
include: ["**/*.{js}"],
},
],
async function tailwindcss() {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
"./plugins/checklist.js",
[
"./plugins/blog-plugin.js",
{
blogTitle: "Blog",
blogDescription: "A Docusaurus powered blog!",
routeBasePath: "/blog",
postsPerPage: 12,
blogSidebarTitle: "All posts",
blogSidebarCount: 0,
feedOptions: {
type: "all",
copyright: `Copyright © ${new Date().getFullYear()} Dejavu.Tech.`,
},
},
],
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
themeConfig: {
prism: {
theme: require("prism-react-renderer/themes/vsDark"),
darkTheme: require("prism-react-renderer/themes/vsDark"),
magicComments: [
{
className: "theme-code-block-highlighted-line",
line: "highlight-next-line",
block: { start: "highlight-start", end: "highlight-end" },
},
{
className: "code-block-hidden",
line: "hide-next-line",
block: { start: "hide-start", end: "hide-end" },
},
],
},
image: "img/new-ep.svg",
algolia: {
appId: "CJA938BLYU",
apiKey: "f702fcfcf449bc0bbe3ab85a2e5011f4",
indexName: "ch871",
"searchableAttributes": ["title", "content"],
contextualSearch: true,
},
metadata: [
{
name: "keywords",
content:
"react-admin, react-framework, internal-tool, admin-panel, ant-design, material ui, mui",
},
],
navbar: {
logo: {
alt: "吃货星球",
src: "img/EP_logo.png",
},
items: [
// { to: "blog", label: "博客", position: "left" },
{
type: "docsVersionDropdown",
position: "right",
dropdownActiveClassDisabled: true,
},
{
href: "https://github.com/Dejavu-Tech/EP-WechatApp/",
position: "right",
className: "header-icon-link header-github-link",
},
],
},
footer: {
logo: {
alt: "Eater Planet",
src: "/img/EP_logo.png",
},
links: [
{
title: "资源",
items: [
{
label: "开始",
to: "docs",
},
{
label: "部署教程",
to: "docs/tutorial/introduction/index/",
},
{
label: "社区团购文档",
to: "blog",
},
],
},
{
title: "产品",
items: [
{
label: "客户案例",
to: "examples",
},
{
label: "定制方案",
to: "integrations",
},
],
},
{
title: "Company",
items: [
{
label: "关于我们",
to: "about",
},
{
label: "EP-吃货星球主题商店",
to: "https://store.e-p.io",
},
{
label: "加入我们",
to: "join-us",
},
],
},
{
title: "__LEGAL",
items: [
{
label: "License",
to: "https://rexotech.cn/LICENSE",
},
{
label: "服务协议",
to: "/enterprise",
},
{
label: "隐私政策",
to: "/privacy-policy",
},
],
},
{
title: "__SOCIAL",
items: [
{
href: "https://github.com/Dejavu-Tech/EP-WechatApp/",
label: "github",
},
{
href: "http://wpa.qq.com/msgrd?v=3&uin=142997&site=qq&menu=yes",
label: "QQ",
},
{
href: "https://github.com/Dejavu-Tech/EP-WechatApp/",
label: "WeCom",
},
{
href: "https://github.com/Dejavu-Tech/EP-WechatApp/",
label: "linkedin",
},
],
},
],
},
},
customFields: {
/** Footer */
footerDescription:
'<strong style="font-weight:700;">Eater Planet 吃货星球</strong> 是基于 Go 和 React 开发的 100% 开源无头电子商务 B to C 解决方案。适用于社区团购、零售、餐饮、美容美发等多个行业,提供行业标准和客制化运营定制',
contactTitle: "版权所有",
contactDescription: [
"蒂佳芙科技(云南)有限公司",
"EP-Project 开源项目组",
],
contactEmail: "[email protected]",
/** ---- */
/** Live Preview */
LIVE_PREVIEW_URL:
process.env.LIVE_PREVIEW_URL ?? "http://localhost:3030/preview",
/** ---- */
tutorial: tutorialData,
},
};
module.exports = siteConfig;