forked from SumoLogic/sumologic-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
578 lines (571 loc) · 18.9 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
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
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
// @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 lightCodeTheme = require('prism-react-renderer/themes/vsLight');
const darkCodeTheme = require('prism-react-renderer/themes/vsDark');
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Sumo Logic Docs',
tagline: '',
url: process.env.HOSTNAME || "http://localhost:3000",
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://js.sitesearch360.com/plugin/bundle/3113.js',
async: true,
},
],
i18n: {
// https://docusaurus.io/docs/i18n/tutorial
defaultLocale: 'en',
locales: ['en', 'ja'],
localeConfigs: {
en: { label: 'English' },
ja: { label: '日本語' },
},
},
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',
],
},
},
googleAnalytics: {
trackingID: 'UA-16579649-3',
},
theme: {
customCss: require.resolve('./src/css/sumo.scss'),
},
}),
],
[
'redocusaurus',
{
specs: [
{
id: 'sumoapi',
//specUrl: 'https://api.sumologic.com/docs/sumologic-api.yaml',
spec: 'sumologic-api.yaml',
route: '/sumoapi/',
},
],
},
],
],
plugins: [
'docusaurus-plugin-sass',
'plugin-image-zoom',
'react-iframe',
['@docusaurus/plugin-client-redirects',
{
redirects: [
{
//CID REDIRECTS: Enter a from: of the /cid=##### with the path to the file for to: for each CID!
to: '/docs/contributing/markdown-cheat-sheet',
from: '/cid=1234',
},
]
},
],
],
/* // Optional: See this site to configure - live editor https://github.com/jlvandenhout/docusaurus-plugin-docs-editor
// Requires adding OAUTH app https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app
[
'@jlvandenhout/docusaurus-plugin-docs-editor',
{
// REQUIRED - The base route to the editor
route: 'edit',
docs: {
// The username that owns the docs, defaults to siteConfig.organizationName
owner: '',
// The repository that contains the docs, defaults to siteConfig.projectName
repo: '',
// The path to the docs section in your repository
path: 'docs',
},
static: {
// The path to the static content section in your repository
path: 'static',
},
// GitHub OAuth Application settings
github: {
// REQUIRED - The Client ID you got from the GitHub OAuth App setup
clientId: '',
// REQUIRED - The plugin will append the authorization code to this URL
tokenUrl: '',
// The request method to use (GET or POST), defaults to GET
method: '',
},
}
] */
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'}],
announcementBar: {
id: 'announcementBar',
content: `⭐️ Welcome to the new Sumo Logic Doc Site! ⭐️`,
},
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: 'dark',
},
//algolia: {
// The application ID provided by Algolia
//appId: 'YKDUX9XT89',
// Public API key: it is safe to commit it
//apiKey: '72699d7d65c635f1fb1505dec1bedc51',
//indexName: 'sumo-docs-staging',
// Optional: see doc section below
//contextualSearch: true,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
//externalUrlRegex: 'external\\.com|domain\\.com',
// Optional: Algolia search parameters
//searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
//searchPagePath: 'search',
//... other Algolia params
//},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['csharp', 'powershell', 'java', 'markdown', `scala`],
},
navbar: {
logo: {
alt: 'My Site Logo',
srcDark: 'img/sumo-logo.svg',
src: 'img/sumo-logo-dark.svg',
},
items: [
{
label: 'Guides',
to: '#',
// Map of content into the Guides mega-drop-down, Number associated to the doc links in this section
// activeregex controls the top nav content, icon uses Google Material name code https://fonts.google.com/icons?query=material
layout: [
'0 1 3 4',
'0 1 3 4',
'0 1 3 4',
'0 1 3 4',
'0 2 3 5',
'0 2 3 5',
'0 2 3 5',
'0 2 3 5',
'0 2 3 5',
'0 2 3 5',
],
items_: [
{
// 0
label: 'Getting Started',
items: [
{
className: 'horizontal-rule',
label: 'Get Started',
sublabel: 'Accounts, concepts, & more',
to: '/docs/get-started',
icon: 'fact_check',
activeBaseRegex: '^/docs/get-started/.*',
},
{
label: 'Send Data',
sublabel: 'Set up collectors, data sources',
to: '/docs/send-data',
icon: 'open_in_new',
activeBaseRegex: '^/docs/send-data/.*',
},
{
label: 'Apps and Integrations',
sublabel: 'Insights from data sources',
to: 'docs/integrations',
icon: 'apps',
activeBaseRegex: '^/docs/integrations/.*',
},
{
label: 'Manage Sumo',
sublabel: 'Set up and manage Sumo',
to: '/docs/manage',
icon: 'start',
activeBaseRegex: '^/docs/manage/.*',
},
{
label: 'Quickstart Tutorials',
sublabel: 'Fast-track Sumo setup',
to: '/docs/quickstart',
icon: 'backup_table',
activeBaseRegex: '^/docs/quickstart/.*',
},
],
},
{
// 1
label: 'Search, Metrics, Logs',
items: [
{
className: 'horizontal-rule',
label: 'Search and Logs',
sublabel: 'Find data with queries',
to: '/docs/search',
icon: 'view_day',
activeBaseRegex: '^/docs/search/.*',
},
{
label: 'Alerts and Dashboards',
sublabel: 'Visualize data and set alerts',
to: '/docs/alerts',
icon: 'dashboard',
activeBaseRegex: '^/docs/(dashboards|dashboards-new|alerts)',
},
{
label: 'Metrics',
sublabel: 'Assess & track performance',
to: '/docs/metrics',
icon: 'timeline',
activeBaseRegex: '^/docs/metrics/.*',
},
],
},
{
// 2
label: 'App Performance',
items: [
{
className: 'horizontal-rule',
label: 'Traces',
sublabel: 'Review traces and spans',
to: '/docs/apm/traces',
icon: 'view_timeline',
activeBaseRegex: '^/docs/apm/traces/.*',
},
{
label: 'Real User Monitoring',
sublabel: 'Monitor user activity',
to: '/docs/apm/rum',
icon: 'contacts',
activeBaseRegex: '^/docs/apm/rum/.*',
},
],
},
{
// 3
label: 'Observability',
items: [
{
className: 'horizontal-rule',
label: 'About Observability',
sublabel: 'Learn about Observability',
to: '/docs/observability',
icon: 'data_exploration',
activeBaseRegex: '^/docs/observability/about',
},
{
label: 'Kubernetes Observability',
sublabel: 'Deploy and monitor K8s',
to: '/docs/observability/kubernetes',
icon: 'settings_suggest',
activeBaseRegex: '^/docs/observability/kubernetes/.*',
},
{
label: 'AWS Observability',
sublabel: 'Monitor AWS data',
to: '/docs/observability/aws',
icon: 'polyline',
activeBaseRegex: '^/docs/observability/aws/.*',
},
{
label: 'Root Cause Explorer',
sublabel: 'Troubleshoot apps & services',
to: '/docs/observability/root-cause-explorer',
icon: 'widgets',
activeBaseRegex: '^/docs/observability/root-cause-explorer',
},
// Links to Sensu docs currently
{
label: 'Sensu',
sublabel: 'Investigate issues',
to: 'https://docs.sensu.io/sensu-go/latest/',
icon: 'model_training',
activeBaseRegex: '^/docs/(incidents)/.*',
},
],
},
{
// 4 - What would this link to?
label: 'Security and Incidents',
items: [
{
className: 'horizontal-rule',
label: 'Cloud SIEM Enterprise',
sublabel: 'Security event management',
to: '/docs/cse',
icon: 'security',
activeBaseRegex: '^/docs/(cse)/.*',
},
// When SOAR is added, you can update to: to the docs
{
label: 'Sumo Logic SOAR',
sublabel: 'Automate incident response',
to: 'https://www.sumologic.com/solutions/cloud-soar/',
icon: 'grid_4x4',
activeBaseRegex: '^/docs/security/.*',
},
],
},
{
// 4
label: 'Other Solutions',
items: [
{
className: 'horizontal-rule',
label: 'Global Intelligence',
sublabel: 'Review security issues',
to: '/docs/global-intelligence',
icon: 'format_list_bulleted',
activeBaseRegex: '^/docs/(global-intelligence)/.*',
},
{
label: 'Software Dev Optimization',
sublabel: 'DevOps pipeline integration',
to: '/docs/sdo',
icon: 'code',
activeBaseRegex: '^/docs/(sdo)/.*',
},
],
},
],
},
{
label: 'API',
position: 'left',
// Redocusaurus
to: '/sumoapi',
//type: 'dropdown',
//items:[
//{
//label: 'Docs',
//to: '/docs/api',
//},
//{
//label: 'Reference',
//href: 'https://api.sumologic.com/docs/',
//},
//]
},
{
label: 'Release Notes',
to: '/docs/releasenotes',
position: 'left',
},
{
label: 'Contribute',
to: '/docs/contributing',
position: 'left',
},
{
label: 'Support',
to: 'https://support.sumologic.com/hc/en-us',
position: 'left',
},
{
//Trial button
label: 'Start a Free Trial',
href: 'https://www.sumologic.com/sign-up/',
position: 'right',
className: 'navbar-trial',
},
// {
// i18n -- add this back when we are ready for translations
// type: 'localeDropdown',
// position: 'right',
// },
{
className: 'header-github-link',
'aria-label': 'GitHub repository',
position: 'right',
to: 'https://github.com/SumoLogic/sumologic-documentation',
},
// items:[
// {
// label: 'Docs GitHub',
// href: 'https://github.com/SumoLogic/sumologic-documentation',
// },
// {
// label: 'Contribution Guide',
// href: '/docs/contributing',
// },
// ]
// },
{
label: ' ',
className: 'header-search-link',
to: 'https://app.sitesearch360.com/demo/18891?auth=627bf5a32ba2ed7f1e7dbe02a13a5a5ae13c5c4d',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'LEARN',
items: [
{
label: 'Training & Certifications',
to: 'https://www.sumologic.com/learn/training/',
},
{
label: 'DevOps Glossary',
to: 'https://www.sumologic.com/glossary/',
},
{
label: 'Request Demo',
to: 'https://www.sumologic.com/request-demo/',
}
],
},
{
title: 'Sumo Community',
items: [
{
label: 'About Us',
href: 'https://www.sumologic.com/company/about-us/',
},
{
label: 'Community',
href: 'https://support.sumologic.com/hc/en-us/community/topics',
},
{
label: 'Events & Webinars',
href: 'https://www.sumologic.com/events/',
},
{
label: 'Twitter',
href: 'https://twitter.com/SumoLogic',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/channel/UCI16kViradUnvH6DiQmwdqw',
}
],
},
{
title: 'Open Source',
items: [
{
label: 'Sumo Docs GitHub',
href: 'https://github.com/SumoLogic/sumologic-documentation',
},
{
label: 'How to Contribute',
to: '/docs/contributing',
},
{
label: 'Sumo Logic GitHub',
href: 'https://github.com/SumoLogic',
},
{
label: 'Sumo Incubator Projects',
href: 'https://github.com/SumoLogic-Incubator',
},
{
label: 'Sumo Dojo Slack',
href: 'https://sumodojo.slack.com/',
},
],
},
{
title: 'Legal',
items: [
{
label: 'Privacy Statement',
href: 'https://www.sumologic.com/privacy-statement/',
},
{
label: 'Terms of Use',
to: 'https://www.sumologic.com/terms-conditions/',
},
{
label: 'Contact Us',
href: 'https://www.sumologic.com/contact-us/',
},
{
label: 'Legal',
href: 'https://www.sumologic.com/legal/',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()}, Sumo Logic Inc. | Built with Docusaurus.`,
},
}),
};