-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
526 lines (520 loc) · 20.7 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
526 lines (520 loc) · 20.7 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
const devServerPlugin = require('./src/plugins/devServer/index.js');
import versionsArchived from './versionsArchived.json';
const baseArchivedURL = "https://archived-docs.tooljet.com/docs/";
const lastFiveArchivedVersions = versionsArchived
.slice(0, 5)
.map((version, index) => ({
version,
url: index === 0 ? baseArchivedURL : `${baseArchivedURL}${version}`
}));
const isProd = process.env.NODE_ENV === 'production';
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'ToolJet',
tagline: 'Low-code framework to Build internal tools and business apps.',
url: 'https://docs.tooljet.com',
baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/tooljet-ai-favicon.svg',
organizationName: 'ToolJet', // Usually your GitHub org/user name.
projectName: 'ToolJet', // Usually your repo name.
themeConfig: {
image: 'img/tooljet-ai-og-image.png',
announcementBar: {
id: 'support_us',
content:
'Star our repository on <a target="_blank" rel="noopener noreferrer" href="https://github.com/ToolJet/ToolJet">GitHub</a> to stay updated with new features and contribute to our platform!',
backgroundColor: '#ECF0FE',
textColor: '#4368E3',
isCloseable: true,
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true
}
},
colorMode: {
},
navbar: {
logo: {
href: '/docs/',
alt: 'ToolJet Logo',
src: 'img/docs_logo.svg',
srcDark: `img/docs_logo_dark.svg`,
width: 120
},
items: [
{
type: 'docsVersionDropdown',
position: 'left',
},
{
type: 'search',
position: 'right',
},
{
href: 'https://www.tooljet.com/',
position: 'right',
label: 'Website',
className: 'navbar-signin',
'aria-label': 'Visit ToolJet Website',
},
{
href: 'https://www.tooljet.com/login',
position: 'right',
label: 'Sign in',
className: 'navbar-signin',
'aria-label': 'Signin to ToolJet',
},
{
href: 'https://www.tooljet.com/create-account',
position: 'right',
label: 'Try for free',
className: 'navbar-website',
'aria-label': 'Try ToolJet for free',
},
],
},
footer: {
style: 'light',
logo: {
alt: 'ToolJet Logo',
src: '/img/docs_logo.svg',
srcDark: '/img/docs_logo_dark.svg',
},
links: [
{
title: 'Platform',
items: [
{ label: 'App builder', to: 'https://www.tooljet.com/visual-app-builder' },
{ label: 'AI Agent builder', to: 'https://www.tooljet.com/ai-agent-builder' },
{ label: 'ToolJet Database', to: 'https://www.tooljet.com/database' },
{ label: 'Trust Center', to: 'https://trust.tooljet.com/' },
],
},
{
title: 'Solutions',
items: [
{ label: 'Back office tools', to: 'https://www.tooljet.com/building-back-office-apps' },
{ label: 'Business applications', to: 'https://www.tooljet.com/business-applications' },
],
},
{
title: 'Developers',
items: [
{ label: 'Blogs', to: 'https://blog.tooljet.com/' },
{ label: 'Events', to: 'https://www.tooljet.com/events' },
{ label: 'GitHub', href: 'https://github.com/ToolJet/ToolJet' },
{ label: 'Slack', href: 'https://tooljet.com/slack' },
],
},
{
title: 'Templates',
items: [
{ label: 'Lead management', to: 'https://www.tooljet.com/templates/lead-management-system' },
{ label: 'KPI management', to: 'https://www.tooljet.com/templates/kpi-management-dashboard' },
{ label: 'Inventory management', to: 'https://www.tooljet.com/templates/inventory-management-system' },
{ label: 'Leave management', to: 'https://www.tooljet.com/templates/leave-management-portal' },
{ label: 'Applicant tracking', to: 'https://www.tooljet.com/templates/applicant-tracking-system' },
],
},
{
title: 'Contact us',
items: [
{ label: 'hello@tooljet.com', href: 'mailto:hello@tooljet.com' },
{ label: 'support@tooljet.com', href: 'mailto:support@tooljet.com' },
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} ToolJet Solutions, Inc. All rights reserved.
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=4f00afac-ae1f-4cf6-8c53-8a2c7b3ca206" />
<script>window.faitracker=window.faitracker||function(){this.q=[];var t=new CustomEvent("FAITRACKER_QUEUED_EVENT");return this.init=function(t,e,a){this.TOKEN=t,this.INIT_PARAMS=e,this.INIT_CALLBACK=a,window.dispatchEvent(new CustomEvent("FAITRACKER_INIT_EVENT"))},this.call=function(){var e={k:"",a:[]};if(arguments&&arguments.length>=1){for(var a=1;a<arguments.length;a++)e.a.push(arguments[a]);e.k=arguments[0]}this.q.push(e),window.dispatchEvent(t)},this.message=function(){window.addEventListener("message",function(t){"faitracker"===t.data.origin&&this.call("message",t.data.type,t.data.message)})},this.message(),this.init("c4rgfujgx6jef4722rcjfhj7dlmcipih",{host:"https://api.factors.ai"}),this}(),function(){var t=document.createElement("script");t.type="text/javascript",t.src="https://app.factors.ai/assets/factors.js",t.async=!0,(d=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,d)}();</script>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-5L8R522S');</script>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5L8R522S" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
(function () {
const hubspotKeys = ['__hstc', '__hssc', '__hsfp'];
const marketingKeys = ['utm_', '_hs', '_gl', 'li'];
const exactKeys = ['gclid', '_ga', '_gid', 'msclkid', 'fbclid', 'li_fat_id', 'gbraid'];
function getStoredParams() {
const keys = JSON.parse(localStorage.getItem("storedQueryParamsKeys") || "[]");
const params = {};
keys.forEach(key => {
const val = localStorage.getItem(key);
if (val) params[key] = val;
});
return params;
}
function storeUTMParams() {
try {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const storedParams = {};
const keysToStore = [];
for (const [key, value] of params.entries()) {
const isMatch = exactKeys.includes(key) || marketingKeys.some(prefix => key.startsWith(prefix)) || hubspotKeys.includes(key);
if (isMatch && value && value !== '[object Object]') {
localStorage.setItem(key, value);
storedParams[key] = value;
keysToStore.push(key);
}
}
if (keysToStore.length > 0) {
localStorage.setItem("storedQueryParamsKeys", JSON.stringify(keysToStore));
}
} catch (e) {
console.warn('UTM store error:', e);
}
}
function appendTrackingToLinks() {
const utmParams = getStoredParams();
const links = document.querySelectorAll('a[href]');
const allowedDomains = ['tooljet.ai', 'tooljet.com', 'tooljet.webflow.io', 'docs.tooljet.ai'];
links.forEach(link => {
const href = link.getAttribute('href');
if (!href || href.startsWith('#') || href.startsWith('mailto:') || href.startsWith('tel:')) return;
const tempA = document.createElement('a');
tempA.href = href;
const isInternal = allowedDomains.some(domain => tempA.hostname.includes(domain));
if (!isInternal) return;
const linkParams = new URLSearchParams(tempA.search);
Object.entries(utmParams).forEach(([key, value]) => {
if (!linkParams.has(key)) linkParams.set(key, value);
});
const newHref = tempA.origin + tempA.pathname + (linkParams.toString() ? '?' + linkParams.toString() : '') + tempA.hash;
link.setAttribute('href', newHref);
});
}
// NEW: Function to build URL with stored UTM parameters
function buildUrlWithStoredParams(baseUrl) {
try {
const storedParams = getStoredParams();
if (Object.keys(storedParams).length === 0) {
return baseUrl;
}
const url = new URL(baseUrl, window.location.origin);
const urlParams = new URLSearchParams(url.search);
// Add stored parameters that don't already exist in the URL
Object.entries(storedParams).forEach(([key, value]) => {
if (!urlParams.has(key)) {
urlParams.set(key, value);
}
});
const finalUrl = url.origin + url.pathname +
(urlParams.toString() ? '?' + urlParams.toString() : '') +
url.hash;
return finalUrl;
} catch (e) {
console.warn('Error building URL with params:', e);
return baseUrl;
}
}
function clearStoredUTMParams() {
try {
const storedKeys = JSON.parse(localStorage.getItem("storedQueryParamsKeys") || "[]");
storedKeys.forEach(key => {
localStorage.removeItem(key);
});
localStorage.removeItem("storedQueryParamsKeys");
} catch (e) {
console.warn('Error clearing UTM params:', e);
}
}
// Run when the page loads
window.addEventListener('load', () => {
clearStoredUTMParams();
storeUTMParams();
appendTrackingToLinks();
});
// Run before the user leaves the page
window.addEventListener('beforeunload', () => {
clearStoredUTMParams();
});
// Expose functions for manual use
window.clearStoredUTMParams = clearStoredUTMParams;
window.getStoredUTMParams = getStoredParams; // NEW: Access stored params
window.buildUrlWithStoredParams = buildUrlWithStoredParams; // NEW: Build URLs with UTM params
})();
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
console.log("Script for cookie called");
var cookieName = "source_page";
var domain = ".tooljet.ai";
var maxAge = 7 * 24 * 60 * 60; // 7 days
var currentHost = window.location.hostname;
var fullUrl = window.location.href;
// Helper: read cookie
function getCookie(name) {
var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return match ? decodeURIComponent(match[2]) : null;
}
// Helper: set cookie
function setCookie(name, value, maxAgeSeconds, domain) {
document.cookie =
name + "=" + encodeURIComponent(value) +
"; path=/; domain=" + domain +
"; max-age=" + maxAgeSeconds + ";";
}
// If user is on blog.tooljet.ai → always update cookie with latest blog URL
// Else → do not overwrite, just keep existing one
if (currentHost.includes("blog.tooljet.ai")) {
setCookie(cookieName, fullUrl, maxAge, domain);
console.log("Updated source_page cookie with latest blog URL: " + fullUrl);
} else {
console.log("Not on blog domain — keeping existing source_page: " + getCookie(cookieName));
}
});
</script>
<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/39494431.js"></script>
<!-- End of HubSpot Embed Code -->
`,
},
algolia: {
appId: 'O8HQRLI0WA',
apiKey: process.env.ALGOLIA_API_KEY || 'development', // Public API key: it is safe to commit it
indexName: 'tooljet',
contextualSearch: true,
insights: true,
externalUrlRegex: 'external\\.com|domain\\.com',
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/ToolJet/Tooljet/blob/develop/docs/',
includeCurrentVersion: false, // Set to true if you want to include the beta version in the sidebar
lastVersion: '3.16.0-LTS',
versions: {
// Uncomment the following line to include the beta version in the sidebar
// current: {
// label: 'beta 🚧',
// path: 'beta',
// banner: 'none',
// badge: false,
// },
"2.50.0-LTS": {
label: '2.50.0-LTS (Legacy)',
banner: 'none',
badge: false
},
"3.0.0-LTS": {
banner: 'none',
badge: false
},
"3.5.0-LTS": {
banner: 'none',
badge: false
},
"3.16.0-LTS": {
label: '3.16 - 3.20 LTS',
banner: 'none',
badge: false
}
}
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/docs/1.x.x/**'],
filename: 'sitemap.xml',
},
googleTagManager: isProd
? {
containerId: process.env.GTM || 'development',
}
: undefined,
},
],
[
'redocusaurus',
{
openapi: {
path: 'openapi', // scans all folders inside openapi/, e.g., scim, tj-api
routeBasePath: '/api', // pages will be /api/scim, /api/tj-api
},
theme: {
primaryColor: '#1890ff', // customize the color
},
},
],
],
plugins: [
devServerPlugin,
'plugin-image-zoom',
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/docs/',
from: '/',
},
{
to: 'https://join.slack.com/t/tooljet/shared_invite/zt-38298nyhf-hK7tNkKNPwYSg1BhRU5mTA',
from: '/docs/slack',
},
{
to: '/docs/security/constants/',
from: '/docs/org-management/workspaces/workspace_constants/',
},
{
to: '/docs/development-lifecycle/gitsync/overview',
from: '/docs/gitsync',
},
{
to: '/docs/user-management/role-based-access/access-control',
from: '/docs/tutorial/manage-users-groups',
},
{
to: '/docs/security/constants/variables',
from: '/docs/org-management/workspaces/workspace-variables-migration',
},
{
to: '/docs/tj-setup/smtp-setup/configuration',
from: '/docs/org-management/smtp-configuration/',
},
{
to: '/docs/user-management/authentication/self-hosted/instance-login',
from: '/docs/enterprise/superadmin',
},
{
to: '/docs/user-management/sso/oidc/setup',
from: '/docs/category/openid-connect',
},
{
to: '/docs/development-lifecycle/release/share-app',
from: '/docs/dashboard',
},
{
to: '/docs/security/audit-logs',
from: '/docs/enterprise/audit_logs/',
},
{
to: '/docs/tj-setup/org-branding/white-labeling',
from: '/docs/enterprise/white-label',
},
{
to: '/docs/tj-setup/licensing/self-hosted',
from: '/docs/org-management/licensing/self-hosted',
},
{
to: '/docs/user-management/role-based-access/access-control',
from: '/docs/org-management/permissions/',
},
{
to: '/docs/tj-setup/workspaces',
from: '/docs/org-management/workspaces/workspace_overview',
},
{
to: '/docs/security/constants/variables',
from: '/docs/org-management/workspaces/workspace-variables',
},
{
to: '/docs/development-lifecycle/gitsync/delete-gitsync',
from: '/docs/release-management/gitsync/delete-gitsync',
},
// Commenting out the following redirects to resolve the build error during the 3.16.0-LTS release [Time Constraint]
// {
// to: '/docs/development-lifecycle/gitsync/connect-to-git-repo/ssh/ssh-config',
// from: '/docs/release-management/gitsync/ssh-config',
// },
// {
// to: '/docs/development-lifecycle/gitsync/connect-to-git-repo/ssh/gitsync-config',
// from: '/docs/release-management/gitsync/tj-config',
// },
{
to: '/docs/development-lifecycle/environment/self-hosted/multi-environment',
from: '/docs/release-management/multi-environment',
},
{
to: '/docs/security/compliance',
from: '/docs/security/',
},
{
to: '/docs/setup/try-tooljet/',
from: '/docs/setup/client/',
},
{
to: '/docs/build-with-ai/overview',
from: '/docs/tooljet-ai/overview',
},
{
to: '/docs/tooljet-api',
from: '/docs/tutorial/tooljet-api',
},
{
to: '/docs/user-management/authentication/self-hosted/overview',
from: '/docs/user-authentication/general-settings',
},
{
to: '/docs/user-management/authentication/self-hosted/instance-login',
from: '/docs/user-authentication/password-login',
},
{
to: '/docs/user-management/sso/github',
from: '/docs/user-authentication/sso/github',
},
{
to: '/docs/user-management/sso/google',
from: '/docs/user-authentication/sso/google',
},
{
to: '/docs/user-management/sso/oidc/setup',
from: '/docs/user-authentication/sso/oidc',
},
{
to: '/docs/user-management/sso/oidc/azuread',
from: '/docs/user-authentication/sso/openid/azuread/',
},
{
to: '/docs/user-management/sso/oidc/google',
from: '/docs/user-authentication/sso/openid/google-openid',
},
{
to: '/docs/user-management/sso/oidc/okta',
from: '/docs/user-authentication/sso/openid/okta',
},
{
to: '/docs/user-management/sso/oidc/setup',
from: '/docs/user-authentication/sso/openid/setup',
},
{
to: '/docs/user-management/sso/saml/setup',
from: '/docs/user-authentication/sso/saml',
},
{
to: '/docs/user-management/onboard-users/overview',
from: '/docs/user-authentication/user-lifecycle/',
},
{
to: '/docs/user-management/authentication/self-hosted/workspace-login',
from: '/docs/user-authentication/workspace-login',
},
{
to: '/docs/widgets/table/',
from: '/docs/widgets/table/table-properties',
},
{
to: '/docs/setup/upgrade-to-v3',
from: '/docs/setup/cloud-v3-migration',
},
// {
// to: '/docs/workflows/how-to/trigger-workflow-from-app',
// from: '/docs/workflows/trigger-workflow-from-app',
// }
],
},
],
],
};