forked from SumoLogic/sumologic-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
497 lines (492 loc) · 15.5 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
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// Full configuration options detailed here: https://docusaurus.io/docs/api/docusaurus-config
// Documentation page id for open source: sumo-logic-open-source-projects
const fs = require('fs')
const lightCodeTheme = require('prism-react-renderer/themes/vsLight');
const darkCodeTheme = require('prism-react-renderer/themes/vsDark');
const cidRedirects = JSON.parse(fs.readFileSync('cid-redirects.json').toString())
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Sumo Logic Docs',
tagline: '',
url: process.env.HOSTNAME || "http://localhost:3000",
trailingSlash: true,
baseUrl: process.env.BASE_URL || "/",
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'https://www.sumologic.com/favicon.ico',
organizationName: 'sumologic', // Usually your GitHub org/user name.
projectName: 'sumologic-documentation', // Usually your repo name.
stylesheets: [
'https://fonts.googleapis.com/css?family=Material+Icons',
],
scripts: [
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-CVH19TBVSL',
async: true,
},
{
src: './src/helper/google-analytics.js',
async: true,
},
],
staticDirectories: ['static'],
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
"parser": {
"syntax": "typescript",
"tsx": true
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
}
},
}),
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.ts'),
editUrl: 'https://github.com/SumoLogic/sumologic-documentation/edit/main/',
//sidebarCollapsible: true,
//sidebarCollapsed: false,
remarkPlugins: [
//https://www.npmjs.com/package/remark-code-import
require('remark-code-import'),
//https://www.npmjs.com/package/remark-import-partial
// snippet support {@import ./my-name.md} relative filepath to md file
require('remark-import-partial'),
],
showLastUpdateAuthor: true,
showLastUpdateTime: true,
admonitions: {
tag: ':::',
keywords: [
'sumo',
'secondary',
'info',
'success',
'danger',
'note',
'tip',
'warning',
'important',
'caution',
],
},
},
gtag: {
trackingID: [
'G-CVH19TBVSL',
'UA-16579649-3',
],
},
googleAnalytics: {
trackingID: 'UA-16579649-3',
},
blog: {
blogTitle: 'Sumo Logic Service Release Notes',
path: 'blog-service',
routeBasePath: 'release-notes-service',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
blogDescription: 'Latest features and bug fixes for Sumo Logic apps, alerts, security, search, observability, data collectors, and more.',
postsPerPage: 'ALL',
showReadingTime: false,
feedOptions: {
type: 'rss',
title: 'Sumo Logic Service Release Notes',
description: 'Latest features and bug fixes for Sumo Logic apps, alerts, security, search, observability, data collectors, and more.',
copyright: `Copyright ©${new Date().getFullYear()} Sumo Logic`,
},
},
theme: {
customCss: [
require.resolve('./src/css/sumo.scss'),
require.resolve('./src/css/sitesearch360.scss'),
],
},
}),
],
],
plugins: [
'docusaurus-plugin-sass',
'react-iframe',
['@docusaurus/plugin-content-docs',
{
id: 'community',
path: './community',
routeBasePath: 'hackathon',
sidebarPath: require.resolve('./sidebarsCommunity.js'),
breadcrumbs: false,
},
],
['@docusaurus/plugin-content-blog',
{
id: 'blog-cse',
routeBasePath: 'release-notes-cse',
path: './blog-cse',
archiveBasePath: 'archive',
blogTitle: 'Sumo Logic Cloud SIEM Release Notes',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
postsPerPage: 'ALL',
blogDescription: 'New and enhanced Cloud SIEM features, bug fixes, updated rules, log mappers, parsers, and more.',
showReadingTime: false,
feedOptions: {
type: 'rss',
title: 'Sumo Logic Cloud SIEM Release Notes',
description: 'New and enhanced Cloud SIEM features, bug fixes, updated rules, log mappers, parsers, and more.',
copyright: `Copyright © ${new Date().getFullYear()} Sumo Logic`,
},
},
],
['@docusaurus/plugin-content-blog',
{
id: 'blog-csoar',
routeBasePath: 'release-notes-csoar',
path: './blog-csoar',
archiveBasePath: 'archive',
blogTitle: 'Sumo Logic Cloud SOAR Release Notes',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
postsPerPage: 'ALL',
blogDescription: 'New and enhanced Cloud SOAR features, bug fixes, changes to the application, and more.',
showReadingTime: false,
feedOptions: {
type: 'rss',
title: 'Sumo Logic Cloud SOAR Release Notes',
description: 'New and enhanced Cloud SOAR features, bug fixes, changes to the application, and more.',
copyright: `Copyright © ${new Date().getFullYear()} Sumo Logic`,
},
},
],
['@docusaurus/plugin-content-blog',
{
id: 'blog-developer',
routeBasePath: 'release-notes-developer',
path: './blog-developer',
archiveBasePath: 'archive',
blogTitle: 'Sumo Logic Developer Release Notes',
blogDescription: 'The latest Sumo Logic developer features and updates to our APIs, Live Tail CLI, and more.',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
postsPerPage: 'ALL',
showReadingTime: false,
feedOptions: {
type: 'rss',
title: 'Sumo Logic Developer Release Notes',
description: 'The latest Sumo Logic developer features and updates to our APIs, Live Tail CLI, and more.',
copyright: `Copyright © ${new Date().getFullYear()} Sumo Logic`,
},
},
],
['@docusaurus/plugin-content-blog',
{
id: 'blog-collector',
routeBasePath: 'release-notes-collector',
path: './blog-collector',
archiveBasePath: 'archive',
blogTitle: 'Sumo Logic Collector Release Notes',
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
postsPerPage: 'ALL',
blogDescription: 'New Sumo Logic Collector features and relevant bug fixes for each release.',
showReadingTime: false,
feedOptions: {
type: 'rss',
title: 'Sumo Logic Collector Release Notes',
description: 'New Sumo Logic Collector features and relevant bug fixes for each release.',
copyright: `Copyright © ${new Date().getFullYear()} Sumo Logic`,
},
},
],
['@docusaurus/plugin-client-redirects',
{
redirects: Object.entries(cidRedirects).map(
([key, value]) => ({ from: key, to: value })
)
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
// SEO Global Metadata
metadata: [{name: 'keywords', content: 'sumo logic, documentation, tutorials, quickstarts'}],
imageZoom: {
selector: '.markdown :not(a) > img',
// Optional medium-zoom options
// see: https://www.npmjs.com/package/medium-zoom#options
options: {
background: 'rgba(0, 0, 0, 0.6)',
},
},
colorMode: {
defaultMode: 'light',
},
algolia: {
appId: '2SJPGMLW1Q',
apiKey: 'fb2f4e1fb40f962900631121cb365549',
indexName: 'crawler_sumodocs',
contextualSearch: false,
// Optional: path for search page that enabled by default (`false` to disable it)
//searchPagePath: false,
getMissingResultsUrl({ query }) {
return `https://github.com/SumoLogic/sumologic-documentation/issues/new?title=${query}`;
},
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['csharp', 'powershell', 'java', 'markdown', `scala`],
},
navbar: {
logo: {
alt: 'Sumo Logic logo',
srcDark: 'img/sumo-logo.svg',
src: 'img/sumo-logo-dark.svg',
},
items: [
// activeregex controls the top nav content
// icon uses Google Material name code https://fonts.google.com/icons?query=material
{
label: 'Guides',
position: 'left',
to: '#',
type: 'dropdown',
items:[
{
type: 'docSidebar',
sidebarId: 'getstarted',
label: 'Start Here',
icon: 'rocket',
},
{
type: 'docSidebar',
sidebarId: 'senddata',
label: 'Send Data (Collectors)',
icon: 'cloud_upload',
},
{
type: 'docSidebar',
sidebarId: 'searchlogs',
label: 'Log Search',
icon: 'article',
},
{
type: 'docSidebar',
sidebarId: 'integrations',
label: 'Apps and Integrations',
icon: 'apps',
},
{
type: 'docSidebar',
sidebarId: 'manage',
label: 'Manage Account',
icon: 'manage_accounts',
},
{
type: 'docSidebar',
sidebarId: 'alerts',
label: 'Alerts',
icon: 'notifications',
},
{
type: 'docSidebar',
sidebarId: 'metricslogs',
label: 'Metrics',
icon: 'stacked_line_chart',
},
{
type: 'docSidebar',
sidebarId: 'apm',
label: 'Traces, RUM, APM',
icon: 'account_tree',
},
{
type: 'docSidebar',
sidebarId: 'observability',
label: 'Observability',
icon: 'query_stats',
},
{
type: 'docSidebar',
sidebarId: 'security',
label: 'Security',
icon: 'security',
},
{
type: 'docSidebar',
sidebarId: 'dashboards',
label: 'Dashboards',
icon: 'dashboard',
},
]
},
{
label: 'API',
position: 'left',
to: '#',
type: 'dropdown',
items:[
{
type: 'docSidebar',
sidebarId: 'api',
label: 'API Docs',
icon: 'hub',
},
{
label: 'API Reference',
href: 'https://api.sumologic.com/docs/',
icon: 'code',
},
]
},
{
label: 'Release Notes',
position: 'left',
to: '/docs/release-notes',
type: 'dropdown',
items:[
{
label: 'Service',
to: 'release-notes-service',
icon: 'rss_feed',
},
{
label: 'Cloud SIEM',
to: 'release-notes-cse',
icon: 'rss_feed',
},
{
label: 'Cloud SOAR',
to: 'release-notes-csoar',
icon: 'rss_feed',
},
{
label: 'Collector',
to: 'release-notes-collector',
icon: 'rss_feed',
},
{
label: 'Developer',
to: 'release-notes-developer',
icon: 'rss_feed',
},
]
},
{
type: 'search',
position: 'left',
},
{
type: 'html',
position: 'right',
value: '<div id="google_translate_element"></div>',
},
{
to: 'https://www.sumologic.com/sign-up',
position: 'right',
className: 'header-trial',
},
{
to: 'https://support.sumologic.com/support/s/contactsupport',
position: 'right',
className: 'header-support',
},
{
position: 'right',
className: 'header-github-link',
type: 'dropdown',
'aria-label': 'GitHub repository',
to: 'https://github.com/SumoLogic/sumologic-documentation',
items:[
{
label: 'Send Feedback',
to: 'https://github.com/SumoLogic/sumologic-documentation/issues/new/choose',
icon: 'rate_review',
},
{
label: 'Contribute to Docs',
href: '/docs/contributing',
icon: 'edit_note',
},
]
},
],
},
footer: {
style: 'dark',
links: [
{
items: [
{
label: 'Training & Certifications',
href: 'https://www.sumologic.com/learn/training/',
},
{
label: 'Events & Webinars',
href: 'https://www.sumologic.com/events/',
},
{
label: 'Request Demo',
href: 'https://www.sumologic.com/request-demo',
},
],
title: 'Learn',
},
{
items: [
{
label: 'Support',
href: 'https://support.sumologic.com/hc/en-us',
},
{
label: 'Sumo Dojo Slack',
href: 'https://sumodojo.slack.com/',
},
{
label: 'Community',
href: 'https://support.sumologic.com/hc/en-us/community/topics',
},
],
title: 'Contact Us',
},
{
items: [
{
label: 'Docs GitHub',
href: 'https://github.com/SumoLogic/sumologic-documentation',
},
{
label: 'Sumo Logic GitHub',
href: 'https://github.com/SumoLogic',
},
{
label: 'Sumo Labs Projects',
href: 'https://github.com/SumoLogic-Labs',
},
],
title: 'Open Source',
},
],
copyright: `Copyright © ${new Date().getFullYear()} by Sumo Logic, Inc.`,
},
}),
};