forked from saucelabs/sauce-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
183 lines (179 loc) · 5.98 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
const unwrapJsx = require('./src/plugins/unwrap-jsx');
// Enabling PR previews
let siteBaseUrl = '/';
if (process.env.PREVIEW_PATH) siteBaseUrl += process.env.PREVIEW_PATH;
const docusaurusConfig = {
title: 'Sauce Labs Documentation',
tagline: 'Test all the things.',
url: 'https://docs.saucelabs.com',
noIndex: process.env.NO_INDEX,
trailingSlash: true,
baseUrl: siteBaseUrl,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
organizationName: 'saucelabs',
projectName: 'sauce-docs',
// TODO: I don't think google-site-verification is working at all, confirm with P.O.
customFields: {
headTags: [
{
tagName: 'meta',
attributes: {
name: 'google-site-verification',
content: 'googlee2afebcc27f8c950.html',
},
},
],
},
headTags: [
{
tagName: 'link',
attributes: {
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/img/favicon-16x16.png',
},
},
{
tagName: 'link',
attributes: {
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/img/favicon-32x32.png',
},
},
],
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: {
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: 'Visual',
position: 'left',
to: '/visual-testing',
},
{
label: 'Beta Testing',
position: 'left',
to: '/testfairy',
},
{
label: 'Error Reporting',
position: 'left',
to: '/error-reporting/getting-started',
},
],
},
/* 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,
remarkPlugins: [unwrapJsx],
},
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: ['docusaurus-theme-github-codeblock'],
};
if (!process.env.SAUCE_DOCS_DEV) {
docusaurusConfig.themeConfig.algolia = {
appId: 'RO95H65NEO',
apiKey: '3a5924ec9fa1457b4999d8dcfc382c2d',
indexName: 'Sauce Docs Crawler',
contextualSearch: false,
};
}
module.exports = docusaurusConfig;