-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
327 lines (315 loc) · 9.35 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
327 lines (315 loc) · 9.35 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
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
import type { Config } from '@docusaurus/types';
import path from 'path';
import { themes as prismThemes } from 'prism-react-renderer';
const SENTRY_DNS = process.env.NEXT_PUBLIC_SENTRY_DNS || null;
const ALGOLIA_APP_ID = process.env.ALGOLIA_APP_ID || null;
const ALGOLIA_API_KEY = process.env.ALGOLIA_API_KEY || null;
const ALGOLIA_INDEX_NAME = process.env.ALGOLIA_INDEX_NAME || null;
const HAS_ALGOLIA_CREDENTIALS = ALGOLIA_APP_ID && ALGOLIA_API_KEY && ALGOLIA_INDEX_NAME;
require('dotenv').config();
/** @type {import('@docusaurus/types').Config} */
const config: Config = {
themes: [
[
'@easyops-cn/docusaurus-search-local',
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
{
hashed: true,
language: ['en', 'fr'],
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
docsRouteBasePath: '/',
docsDir: ['../../docs'],
docsPluginIdForPreferredVersion: 'template'
}
],
'@docusaurus/theme-mermaid'
],
plugins: [
SENTRY_DNS &&
process.env.NODE_ENV === 'production' && [
'docusaurus-plugin-sentry',
{
DSN: process.env.NEXT_PUBLIC_SENTRY_DNS
}
],
[
'@docusaurus/plugin-content-docs',
{
id: 'template',
path: '../../docs/',
routeBasePath: '/',
sidebarPath: './sidebarsTemplate.ts',
include: [
'*.{md,mdx}',
'advanced-guide/**/*.{md,mdx}',
'api/**/*.{md,mdx}',
'architecture/**/*.{md,mdx}',
'authentication/**/*.{md,mdx}',
'components/**/*.{md,mdx}',
'configuration/**/*.{md,mdx}',
'content-management/**/*.{md,mdx}',
'database/**/*.{md,mdx}',
'deployment/**/*.{md,mdx}',
'development/**/*.{md,mdx}',
'features/**/*.{md,mdx}',
'getting-started/**/*.{md,mdx}',
'guides/**/*.{md,mdx}',
'hooks/**/*.{md,mdx}',
'integrations/**/*.{md,mdx}',
'internationalization/**/*.{md,mdx}',
'payment/**/*.{md,mdx}',
'services/**/*.{md,mdx}',
'team-training/**/*.{md,mdx}',
'trigger-dev/**/*.{md,mdx}',
'types/**/*.{md,mdx}'
],
editUrl: 'https://github.com/ever-works/ever-works-docs/tree/main/'
}
]
],
// Add custom scripts here that would be placed in <script> tags.
scripts: [{ src: 'https://buttons.github.io/buttons.js', async: true }],
title: 'Ever Works', // Title for your website.
tagline: 'Modern Directory Website Solution',
favicon: 'img/favicon.ico',
// Set the production Url of your site here
url: 'https://docs.ever.works', // Your website URL
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'ever-works',
// Used for publishing and more
projectName: 'ever-works-docs',
onBrokenLinks: 'warn',
markdown: {
format: 'detect',
mermaid: true,
hooks: {
onBrokenMarkdownLinks: 'warn'
}
},
staticDirectories: ['../../docs/assets', 'static'],
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
path: 'i18n',
defaultLocale: 'en',
locales: ['en', 'fr', 'ar', 'bg', 'zh', 'nl', 'de', 'he', 'it', 'pl', 'pt', 'ru', 'es']
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
blog: false,
docs: false,
theme: {
customCss: './src/css/custom.css'
}
}
]
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
// Replace with your project's social card
image: '/overview.png',
colorMode: {
defaultMode: 'dark'
},
navbar: {
style: 'dark',
logo: {
alt: 'Ever® Works Logo',
srcDark: '/img/ever-works.svg',
src: 'img/ever-works-dark.svg'
},
items: [
{
type: 'docSidebar',
sidebarId: 'templateSidebar',
docsPluginId: 'template',
position: 'left',
label: 'Home'
},
{ to: '/help', label: 'Help', position: 'left' },
{
type: 'localeDropdown',
position: 'right',
className: 'header-locale-link'
},
{
href: 'https://github.com/ever-works',
label: 'GitHub',
position: 'right',
className: 'header-github-link'
}
]
},
footer: {
style: 'dark',
logo: {
src: '/img/ever-works.svg',
height: 40
},
links: [
{
title: 'Docs',
items: [
{
label: 'Home',
to: '/'
},
{
label: 'Getting Started',
to: '/getting-started/getting-started'
},
{
label: 'Architecture',
to: '/architecture/overview'
}
]
},
{
title: 'Community',
items: [
{
label: 'User Showcases',
href: '/users'
},
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/directory-web-template'
},
{
label: 'Discord Chat',
href: 'https://discord.gg/ever'
},
{
label: 'Twitter',
href: 'https://twitter.com/everworks'
}
]
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/ever-works/ever-works'
},
{
html: `
<div class="widget"><a class="btn" href="https://github.com/ever-works/ever-works" rel="noopener" target="_blank" aria-label="Star this project on GitHub"><svg viewBox="0 0 16 16" width="14" height="14" class="octicon octicon-star" aria-hidden="true"><path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg> <span>Star</span></a><a class="social-count" href="https://github.com/ever-works/ever-works/stargazers" rel="noopener" target="_blank" aria-label="100+ stargazers on GitHub">100</a></div>`
}
]
}
],
copyright: `Copyright © 2024-Present <a href="https://ever.co/" target="_blank" rel="noopener noreferrer" style="color: inherit; text-decoration: underline;">Ever Co. LTD.</a>`
},
algolia: HAS_ALGOLIA_CREDENTIALS
? {
// The application ID provided by Algolia
appId: process.env.ALGOLIA_APP_ID,
// Public API key: it is safe to commit it
apiKey: process.env.ALGOLIA_API_KEY,
// The index name to query
indexName: process.env.ALGOLIA_INDEX_NAME,
// Optional: see doc section below
contextualSearch: true,
// Optional: Replace parts of the item URLs from Algolia.
replaceSearchResultPathname: {
from: '/docs/',
to: '/'
},
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: false
}
: undefined,
prism: {
theme: prismThemes.oneLight,
darkTheme: prismThemes.vsDark
}
},
customFields: {
EVER_WORKS_WEBSITE_TEMPLATE_API_URL: process.env.EVER_WORKS_WEBSITE_TEMPLATE_API_URL,
footerData: {
description: 'Ever Works is an open-source modern directory website solution.',
socialLinks: [
{
title: 'GitHub',
href: 'https://github.com/ever-works',
icon: 'github'
},
{
title: 'Twitter',
href: 'https://twitter.com/everworks',
icon: 'twitter'
},
{
title: 'Discord',
href: 'https://discord.gg/ever',
icon: 'discord'
}
],
systemStatus: {
status: 'normal',
message: 'All systems operational'
},
products: [
{
name: 'Ever Gauzy',
href: 'https://gauzy.co',
description: 'Open-Source Business Management Platform',
icon: '/img/ever-works.svg'
},
{
name: 'Ever Demand',
href: 'https://ever.co/demand',
description: 'Open-Source On-Demand Commerce Platform',
icon: '/img/ever-works.svg'
},
{
name: 'Ever Teams',
href: 'https://ever.team',
description: 'Open-Source Work & Project Management Platform',
icon: '/img/ever-team.svg'
},
{
name: 'Ever Works',
href: 'https://ever.works',
description: 'Modern Directory Website Solution',
icon: '/img/ever-works.svg'
}
],
companyInfo: {
copyright: `Copyright © ${new Date().getFullYear()} Ever Co. LTD. All Rights Reserved.`,
disclaimer:
'*All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.',
legalLinks: [
{
text: 'Privacy Policy',
href: 'https://ever.co/privacy'
},
{
text: 'Terms of Service',
href: 'https://ever.co/tos'
},
{
text: 'Cookie Policy',
href: 'https://ever.co/cookies'
}
]
}
}
}
};
export default config;