-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
317 lines (304 loc) · 9.72 KB
/
docusaurus.config.js
File metadata and controls
317 lines (304 loc) · 9.72 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const ghUrl = `${process.env.GITHUB_SERVER_URL || 'https://github.com'}/${process.env.GITHUB_REPOSITORY || 'qodly/docs'}`;
//const isProduction = process.env.GITHUB_REPOSITORY_OWNER === 'qodly';
const isProduction = process.env.GITHUB_REPOSITORY_OWNER === '4d';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '4D Qodly Pro Documentation',
tagline: 'Easily build powerful, low-code web interfaces to elevate your 4D applications.',
url: isProduction ? "https://developer.4d.com" : "https://doc4d.github.io",
baseUrl: isProduction ? "/qodly/" : "/docQodlyPro/",
// baseUrl: "/qodly/",
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.svg',
trailingSlash: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'docQodly', // Usually your GitHub org/user name.
projectName: 'qodly', // Usually your repo name.
noIndex: !isProduction,
future: {
experimental_faster: {
swcJsLoader: true,
swcJsMinimizer: true,
swcHtmlMinimizer: true,
lightningCssMinimizer: true,
rspackBundler: true,
mdxCrossCompilerCache: true,
},
},
markdown: {
format: 'mdx',
mermaid: true,
mdx1Compat: {
comments: true,
admonitions: true,
headingIds: true,
},
anchors: {
maintainCase: false,
},
},
// Even if you don't use internalization, 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: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
[require.resolve('@cmfcmf/docusaurus-search-local'), {
// Options here
}],
function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
}
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
includeCurrentVersion: isProduction ? false : true, // false for prod only
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl: isProduction ? `${ghUrl}/edit/main`: undefined,
//editUrl: `${ghUrl}/edit/main`,
editUrl: function edit(info) {
// const lang = info.locale;
// const version = info.version;
// const permalink = info.permalink;
const title = `Comment on ${info.docPath} (${info.version})`;
const body = `Share any feedback about this page — report issues, suggest improvements, or tell us what’s helpful.
If it’s an issue:
- What’s the issue? (e.g., typo, incorrect information, unclear explanation)
- Where is it? (e.g., section name, specific paragraph, or line)
Thank you for helping us improve! 🚀
`;
return `https://github.com/qodly/docs/issues/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`
},
includeCurrentVersion: isProduction ? false : true, // false for prod only
versions:
{
'21-R3': {label: '21 R3 BETA', banner: 'none',},
'21-R2': {label: '21 R2', banner: 'none',},
'21': {label: '21', banner: 'none',},
},
},
blog: {
// showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: ghUrl,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
gtag: isProduction ? {
trackingID: 'G-391275429',
anonymizeIP: true,
} : null,
}),
],
],
scripts: isProduction ? [
{
src: "/docs/" + 'js/analytics/analytics.js', //depends on baseUrl
async: true,
},
] : [],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// docs: {
// sidebar: {
// hideable: true,
// },
// },
metadata: [
{name: 'keywords', content: 'qodly documentation, qodly doc, documentation qodly, doc qodly, qodly Developer, qodly guide, qodly tutorial, qodly low-code development'},
{name: 'description', content: 'Official documentation for Qodly. Learn how to use Qodly Studio, desing Qodly pages and more with detailed guides and tutorials.'},
],
navbar: {
title: 'Docs', //Docs
logo: {
alt: 'Qodly',
src: 'img/4DQodlyPro-black-on-transp.png',
srcDark: 'img/4DQodlyPro-light-on-transp.png',
//src: 'img/qodly-light-version.svg',
//srcDark: 'img/qodly-dark-version.svg',
},
items: [
//
{
type: "doc",
docId: "4DQodlyPro/gettingStarted",
position: "left",
label: "Getting Started",
},
// Qodly 4D Pro
{
type: 'doc',
docId: '4DQodlyPro/qodlyStudioInterface',
position: 'left',
label: 'Develop',
},
{
type: 'doc',
docId: '4DQodlyPro/deploy',
position: 'left',
label: 'Render & Deploy',
},
// Custom Component
{
type: 'doc',
docId: 'Integrations/customComponent/overview',
position: 'left',
label: 'Custom Components',
},
// Qodly Cloud
/*
{
type: 'doc',
docId: 'QodlyinCloud/quickstart',
position: 'left',
label: 'Qodly Cloud',
},
*/
//
{
type: 'docsVersionDropdown',
position: 'right',
//dropdownItemsAfter: [{to: '/versions', label: 'All versions'}],
dropdownActiveClassDisabled: true,
// versions:
// {
// current: {label: 'test'},
// '21-R2': {label: '21 R2 BETA'},
// '21': {label: '21'},
// },
/*
dropdownItemsAfter: [
{
type: 'html',
value: '<hr class="dropdown-separator">',
},
{
type: 'html',
className: 'dropdown-archived-versions',
value: '<b>Archived versions</b>',
},
{
label: '1.1.0',
href: 'https://developer.qodly.com/docs-archive/get-started/quickstart',
},
{
label: '1.0.0',
href: 'https://developer.qodly.com/docs-archive/1.0.0/get-started/quickstart',
},
],
*/
},
],
},
footer: {
style: "dark",
links: [
{
title: "Support",
items: [
{
label: "Tutorials",
to: "https://qodly.com/tutorials",
},
{
label: "Get Support",
to: "https://support.4d.com/",
},
//{
//label: "Release Notes",
//to: "notes/1.0.0",
//},
],
},
{
title: "Company",
items: [
{
label: "About Qodly",
to: "https://qodly.com/about-us",
},
{
label: "About 4D",
to: "https://us.4d.com/about-us",
},
{
label: "Contact us",
to: "mailto:contact@qodly.com",
},
{
label: "License",
to: "https://qodly.com/qodly-platform-license",
},
{
label: "SLA",
to: "https://qodly.com/qodly-beta-service-level-agreement",
}
],
},
{
title: "Follow Us",
items: [
{
label: "Slack",
to: "https://join.slack.com/t/qodly/shared_invite/zt-20ieeffts-NU57SOXcbakmWgIMnJpStQ",
src: 'slack',
},
{
label: "Facebook",
to: "https://www.facebook.com/qodlyby4d",
src: 'facebook',
},
{
label: "Twitter",
to: "https://twitter.com/qodlyby4d",
src: 'twitter',
},
{
label: "Youtube Channels",
to: "https://www.youtube.com/channel/UCLNHKvjJQZ_5D1ziskba6jg",
src: 'youtube',
},
{
label: "Linkedin",
to: "https://linkedin.com/showcase/qodly",
src: 'linkedin',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} 4D SAS - All rights reserved`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;