forked from saucelabs/sauce-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
152 lines (150 loc) · 5.27 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
const docusaurusConfig = {
title: 'Sauce Labs Documentation',
tagline: 'Test all the things.',
url: 'https://docs.saucelabs.com',
noIndex: process.env.NO_INDEX,
trailingSlash: true,
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon2023.png',
organizationName: 'saucelabs',
projectName: 'sauce-docs',
scripts: [
'/scripts/hide.js',
// Need Help? button
{
src: 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js',
type: 'text/javascript',
charset: 'UTF-8',
'data-domain-script': '9e4c4ce3-8349-4030-9de7-0b1d368edfce',
},
{
src: 'https://solve-widget.forethought.ai/embed.js',
type: 'application/javascript',
'data-api-key': '1f0243be-fd74-4205-bbff-cf72bc3c96b3',
'data-ft-location': 'docs',
},
],
themeConfig: {
beamer: {
product_id: `'WyhkZHOU27797'`,
display: `'popup'`,
// selector: `'.beamerContainer'`,
},
prism: {
additionalLanguages: [
'java',
'ruby',
'csharp',
'bash',
'powershell',
'python',
],
},
/* Dark and Light Mode Config */
colorMode: {
defaultMode: 'light',
// Hides the switch in the navbar
disableSwitch: false,
respectPrefersColorScheme: false,
},
navbar: {
title: null,
hideOnScroll: false,
logo: {
alt: 'Sauce Labs logo',
src: '/img/sl-logo-horizontal-color-dark.svg',
srcDark: '/img/sl-logo-horizontal-color-neutral.svg',
},
items: [
{
label: 'Docs',
position: 'left',
to: '/overview',
},
{
label: 'API',
position: 'left',
to: '/dev/api',
},
{
label: 'CLI',
position: 'left',
to: '/dev/cli',
},
{
label: 'Low Code',
position: 'left',
to: '/dev/low-code',
},
{
label: 'Error and Crash Reporting',
position: 'left',
to: '/error-reporting/getting-started',
},
{
type: 'html',
position: 'right',
className: 'beamerTrigger',
value: '<img src="/img/beamer.svg" width="22" height="22" class="beamer-navbar-bell" alt="Product Updates">',
},
],
},
/* this is a swizzled component, see inside theme folder */
footer: {
logo: {
alt: 'Sauce Logo',
src: '/img/sl-logo-horizontal-color-neutral.svg',
href: 'https://saucelabs.com',
},
style: 'light',
links: [],
copyright: `© ${new Date().getFullYear()} Sauce Labs, Inc. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
blog: false,
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
path: 'docs',
breadcrumbs: true,
routeBasePath: '/',
editUrl:
'https://github.com/saucelabs/sauce-docs/edit/main/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
googleAnalytics: {
trackingID: 'UA-6735579-1',
},
// announcementBar: {
// id: 'site_announcement', // Any value that will identify this message.
// content:
// '<button class="announcementBarBadge">NEW</button> Our improved documentation is here! <a target="_blank" rel="noopener noreferrer" href="mailto:[email protected]"><button class="announcementBar">Tell us what you think</button></a>',
// backgroundColor: '#0D65BE', // Defaults to `#fff`.
// textColor: '#F0F0F0', // Defaults to `#000`.
// isCloseable: true, // Defaults to `true`.
// },
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
themes: ['@saucelabs/theme-github-codeblock'],
plugins: ['./src/plugins/beamer'],
};
if (!process.env.SAUCE_DOCS_DEV) {
docusaurusConfig.themeConfig.algolia = {
appId: 'RO95H65NEO',
apiKey: '3a5924ec9fa1457b4999d8dcfc382c2d',
indexName: 'Sauce Docs Crawler',
contextualSearch: false,
};
}
module.exports = docusaurusConfig;