-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
285 lines (272 loc) · 8.41 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
285 lines (272 loc) · 8.41 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
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { themes as prismThemes } from 'prism-react-renderer';
import npm2yarn from '@docusaurus/remark-plugin-npm2yarn';
import replace from './plugins/remark/replace-variables';
import apiDocs from './plugins/remark/api-docs';
// SDK version: exact build referenced by CodePreview's CDN URL — must match a real release.
const sdkVersion = "2.2.0";
const sdkVersion_v1 = "1.8.4";
// Docs version: human-readable label shown in the page version badge ("Version: X").
// Bump this as the 2.x docs evolve — no need to archive the version.
const docsVersion = "2.2";
const docsVersion_v1 = "1.8.4";
// The AI search plugin lives in a private @igniteui GitHub Packages feed, so most
// contributors cannot install it (it is an optionalDependency and is simply skipped).
// Load it only when present, so the docs build and run for everyone; the deploy
// workflow verifies it IS installed before publishing to staging/production.
function revealAIPlugin(): any[] {
try {
require.resolve("@igniteui/reveal-ai-plugin");
return [["@igniteui/reveal-ai-plugin", {}]];
} catch {
console.warn(
"[docs] @igniteui/reveal-ai-plugin is not installed - AI search is disabled for this build. " +
"This is expected without private registry access; all other docs functionality is unaffected."
);
return [];
}
}
const config: Config = {
title: 'Reveal',
tagline: 'Embedded Analytics & Business Intelligence Tools',
url: 'https://help.revealbi.io',
baseUrl: '/',
onBrokenAnchors: 'warn',
onBrokenLinks: 'throw',
favicon: 'img/favicon.ico',
trailingSlash: true,
// Per-version values exposed to client components. Keyed by docs version id ("current" or the snapshot label).
customFields: {
sdkVersion: sdkVersion,
sdkVersions: {
current: sdkVersion,
"1.8.4": sdkVersion_v1,
},
// Used by the swizzled DocVersionBadge to show "Version: <docsVersion>" on each page.
docsVersions: {
current: docsVersion,
"1.8.4": docsVersion_v1,
},
},
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'RevealBi', // Usually your GitHub org/user name.
projectName: 'Documentation', // Usually your repo name.
plugins: [
["docusaurus-node-polyfills", { onlyAliases: ["process"] }],
["@docusaurus/plugin-google-tag-manager", { containerId: "GTM-WXWCMQZ" }],
...revealAIPlugin(),
],
i18n: {
defaultLocale: 'en',
locales: ['en', 'ja'],
localeConfigs: {
en: {
label: "English",
htmlLang: 'en-US',
},
ja: {
label: "日本語",
htmlLang: 'ja-JP',
path: 'ja'
}
},
},
presets: [
[
'classic',
{
docs: {
routeBasePath: "/",
breadcrumbs: false,
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/RevealBi/documentation/tree/master/',
lastVersion: 'current',
versions: {
current: {
label: 'Current',
path: '',
badge: false, // hide the "Version: X" badge (also disabled on 1.8.4 below)
},
'1.8.4': {
label: '1.8.4',
path: '1.8.4',
badge: false,
},
},
beforeDefaultRemarkPlugins: [
[apiDocs, {}]
],
remarkPlugins: [
[npm2yarn, { sync: true }],
[replace, {
variablesByVersion: {
current: [
{ name: "sdkVersion", value: sdkVersion }
],
"1.8.4": [
{ name: "sdkVersion", value: sdkVersion_v1 }
],
},
}],
],
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
image: 'img/reveal-social-black-font-preview.png',
algolia: {
appId: 'QBVJ183IXZ',
apiKey: '2637a7e021356df827f773d64378034d',
indexName: 'help-revealbi',
},
navbar: {
title: 'Reveal',
logo: {
alt: 'Reveal',
src: 'img/logo.png',
},
items: [
{
label: "Documentation",
position: "left",
items: [
{ label: "Web", to: "web" },
{ label: "AI", to: "ai/overview" },
{ label: "User", to: "user" },
]
},
{
label: "API",
position: "left",
items: [
{ label: "ASP.NET", to: "https://help.revealbi.io/api/aspnet/latest/Reveal.Sdk.html", target: "blank" },
{ label: "JAVA", to: "https://help.revealbi.io/api/java/latest/", target: "blank" },
{ label: "JavaScript", to: "https://help.revealbi.io/api/javascript/latest/", target: "blank" },
]
},
{
label: "Learn",
position: "left",
items: [
{ label: "Blogs", to: "https://www.revealbi.io/blog" },
// { label: "Developer Playground", to: "playground" },
{ label: "Samples", to: "https://github.com/RevealBi/sdk-samples-javascript" },
{ label: "Videos", to: "https://www.youtube.com/@RevealBI" }
]
},
{
type: "docsVersionDropdown",
position: "right",
},
{
type: "localeDropdown",
position: "right"
},
],
},
footer: {
style: "dark",
links: [
{
title: 'Documentation',
items: [
{
label: 'Web SDK',
to: 'web',
},
{
label: 'AI SDK',
to: 'ai/overview',
},
{ label: "User", to: "user" },
],
},
{
title: 'Company',
items: [
{
label: 'Who are We',
href: 'https://www.revealbi.io/about-us',
"href_jp": "https://www.revealbi.io/jp/about-us",
},
{
label: 'Contact Us',
href: 'https://www.revealbi.io/about-us?#request-demo',
"href_jp": "https://www.revealbi.io/jp/about-us#request-demo",
},
{
label: 'Global Offices',
href: 'https://www.revealbi.io/about-us?#connect',
"href_jp": "https://www.revealbi.io/jp/about-us#connect",
},
],
},
{
title: 'Resources',
items: [
{
label: 'Support',
href: 'https://github.com/RevealBi/Reveal.Sdk/issues',
"href_jp": "https://jp.infragistics.com/my-account/submit-support-request/reveal",
},
{
label: 'Glossary',
href: 'https://www.revealbi.io/glossary',
},
{
label: 'FAQs',
href: 'https://www.revealbi.io/faq',
"href_jp": "https://www.revealbi.io/jp/faq",
},
{
label: 'Blogs',
href: 'https://www.revealbi.io/blog',
},
],
},
{
title: "Legal",
items: [
{
label: "Privacy Policy",
href: "https://www.infragistics.com/legal/privacy",
"href_jp": "https://jp.infragistics.com/legal/privacy",
},
{
label: "Cookies",
href: "https://www.infragistics.com/legal/cookie-policy",
"href_jp": "https://jp.infragistics.com/legal/cookie-policy",
},
{
label: "Terms of Use",
href: "https://www.infragistics.com/legal/terms-of-use",
"href_jp": "https://jp.infragistics.com/legal/terms-of-use",
},
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} Infragistics. All Rights Reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.vsDark,
additionalLanguages: ["csharp", "java", "bash", "typescript"],
},
} satisfies Preset.ThemeConfig,
markdown: {
mermaid: true,
hooks: {
onBrokenMarkdownLinks: 'throw',
onBrokenMarkdownImages: 'throw',
}
},
themes: ['@docusaurus/theme-mermaid']
};
export default config;