-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
396 lines (376 loc) · 14.8 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
396 lines (376 loc) · 14.8 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
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
const defaultLocale = 'en';
const locales = ['en', 'ru', 'es', 'fr', 'de', 'it', 'ja', 'ko', 'pt', 'zh', 'sr'];
// `docusaurus start` without --locale sets this env var to the string "undefined".
const currentLocale = locales.includes(process.env.DOCUSAURUS_CURRENT_LOCALE)
? process.env.DOCUSAURUS_CURRENT_LOCALE
: defaultLocale;
// The main website serves English at / and other languages at /<locale>/.
const websiteUrl = (path = '/') =>
`https://semaphoreui.com${currentLocale === defaultLocale ? '' : `/${currentLocale}`}${path}`;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Semaphore UI',
tagline: 'Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools',
favicon: 'img/favicon.png',
// Set the production url of your site here
url: 'https://semaphoreui.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/docs/',
//trailingSlash: true,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'semaphoreui', // Usually your GitHub org/user name.
projectName: 'semaphore-docs', // Usually your repo name.
// Broken links and anchors fail the build. Any page move must be accompanied
// by an entry in redirects.js, see the comment in that file.
onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale,
locales,
localeConfigs: {
en: { label: 'English', htmlLang: 'en' },
ru: { label: 'Русский', htmlLang: 'ru' },
es: { label: 'Español', htmlLang: 'es' },
fr: { label: 'Français', htmlLang: 'fr' },
de: { label: 'Deutsch', htmlLang: 'de' },
it: { label: 'Italiano', htmlLang: 'it' },
ja: { label: '日本語', htmlLang: 'ja' },
ko: { label: '한국어', htmlLang: 'ko' },
pt: { label: 'Português', htmlLang: 'pt' },
zh: { label: '中文', htmlLang: 'zh-Hans' },
sr: { label: 'Srpski', htmlLang: 'sr' },
},
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '/',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/semaphoreui/semaphore-docs/edit/main/',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Semaphore UI',
logo: {
alt: 'Semaphore UI Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'dropdown',
label: 'Product',
position: 'left',
items: [
{
label: 'Pro · For teams',
href: websiteUrl('/pro'),
target: '_self',
},
{
label: 'Enterprise · For large-scale operations',
href: websiteUrl('/enterprise'),
target: '_self',
},
{
label: 'Community · For homelab',
href: 'https://github.com/semaphoreui/semaphore',
target: '_self',
},
],
},
{
type: 'dropdown',
label: 'Explore',
position: 'left',
items: [
{
label: 'Features',
href: websiteUrl('/features'),
target: '_self',
},
{
label: 'Use cases',
href: websiteUrl('/use-cases'),
target: '_self',
},
{
label: 'Case studies',
href: websiteUrl('/case-studies'),
target: '_self',
},
{
label: 'Blog',
href: websiteUrl('/blog/'),
target: '_self',
},
{
type: 'html',
value: '<div class="dropdown__category">Comparison</div>',
},
{
label: 'Semaphore UI vs AWX',
href: websiteUrl('/vs/awx'),
target: '_self',
},
{
label: 'Semaphore UI vs Rundeck',
href: websiteUrl('/vs/rundeck'),
target: '_self',
},
{
label: 'Semaphore UI vs GitLab',
href: websiteUrl('/vs/gitlab'),
target: '_self',
},
{
label: 'Semaphore UI vs Jenkins',
href: websiteUrl('/vs/jenkins'),
target: '_self',
},
{
label: 'Semaphore UI vs Spacelift',
href: websiteUrl('/vs/spacelift'),
target: '_self',
},
{
label: 'Semaphore UI vs Gaia',
href: websiteUrl('/vs/gaia'),
target: '_self',
},
{
label: 'Semaphore UI vs Tower (AAP)',
href: websiteUrl('/vs/tower'),
target: '_self',
},
],
},
{
type: 'dropdown',
label: 'Help',
position: 'left',
items: [
{
label: 'Installation',
href: websiteUrl('/install'),
target: '_self',
},
{
label: 'Docs',
to: '/',
},
{
label: 'API References',
href: websiteUrl('/api-docs/'),
target: '_self',
},
],
},
{
label: 'Pricing',
href: websiteUrl('/pricing/'),
target: '_self',
position: 'left',
},
{
href: 'https://github.com/semaphoreui/semaphore',
target: '_self',
label: 'GitHub',
position: 'right',
},
{
href: 'https://portal.semaphoreui.com',
target: '_self',
label: 'Sign in',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'light',
links: [
{
title: ' ',
items: [
{
html: `
<a class="footer__brand" href="${websiteUrl()}" aria-label="Semaphore UI">
<img class="footer__logo footer__logo--light" src="/docs/img/semaphore-light.png" alt="Semaphore UI" />
<img class="footer__logo footer__logo--dark" src="/docs/img/semaphore-dark.png" alt="Semaphore UI" />
</a>
<p class="footer__desc">A self-hosted automation control plane for Ansible, Terraform, OpenTofu, Terragrunt, Bash, PowerShell, and Python workflows.</p>
<div class="footer__contact">
<div class="footer__contactTitle">Contact us</div>
<div class="footer__contactRow"><span class="footer__contactLabel">Sales</span><a href="mailto:sales@semaphoreui.com">sales@semaphoreui.com</a></div>
<div class="footer__contactRow"><span class="footer__contactLabel">Partnership</span><a href="mailto:partners@semaphoreui.com">partners@semaphoreui.com</a></div>
<div class="footer__contactRow"><span class="footer__contactLabel">Support</span><a href="mailto:support@semaphoreui.com">support@semaphoreui.com</a></div>
<div class="footer__contactRow"><span class="footer__contactLabel">Security</span><a href="mailto:security@semaphoreui.com">security@semaphoreui.com</a></div>
<div class="footer__contactRow"><span class="footer__contactLabel">Legal</span><a href="mailto:legal@semaphoreui.com">legal@semaphoreui.com</a></div>
</div>
`,
},
],
},
{
title: 'Product',
items: [
{ label: 'Community', href: 'https://github.com/semaphoreui/semaphore', target: '_self' },
{ label: 'Pro', href: websiteUrl('/pro'), target: '_self' },
{ label: 'Enterprise', href: websiteUrl('/enterprise'), target: '_self' },
{ label: 'Pricing', href: websiteUrl('/pricing/'), target: '_self' },
],
},
{
title: 'Explore',
items: [
{ label: 'Features', href: websiteUrl('/features'), target: '_self' },
{ label: 'Use cases', href: websiteUrl('/use-cases'), target: '_self' },
{ label: 'Case studies', href: websiteUrl('/case-studies'), target: '_self' },
{ label: 'Roadmap', href: websiteUrl('/roadmap'), target: '_self' },
{ label: "What's New", href: websiteUrl('/releases/'), target: '_self' },
],
},
{
title: 'Help',
items: [
{ label: 'Installation', href: websiteUrl('/install'), target: '_self' },
{ label: 'Documentation', to: '/' },
{ label: 'API References', href: websiteUrl('/api-docs/'), target: '_self' },
],
},
{
title: 'Links',
items: [
{ label: 'GitHub', href: 'https://github.com/semaphoreui/semaphore', target: '_self' },
{ label: 'X (ex. Twitter)', href: 'https://twitter.com/semaphoreui', target: '_self' },
{ label: 'Discord', href: 'https://discord.gg/5R6k7hNGcH', target: '_self' },
{ label: 'YouTube', href: 'https://www.youtube.com/@semaphoreui', target: '_self' },
{ label: 'LinkedIn', href: 'https://www.linkedin.com/company/semaphoreui', target: '_self' },
{ label: 'Facebook', href: 'https://facebook.com/semaphoreui', target: '_self' },
{ label: 'Snapcraft', href: 'https://snapcraft.io/semaphore', target: '_self' },
],
},
{
title: 'Legal',
items: [
{ label: 'Terms of Service', href: websiteUrl('/legal/terms-of-service'), target: '_self' },
{ label: 'Subscription Agreement', href: websiteUrl('/legal/subscription-agreement'), target: '_self' },
{ label: 'Refund Policy', href: websiteUrl('/legal/refund-policy'), target: '_self' },
{ label: 'Privacy Policy', href: websiteUrl('/privacy/policy'), target: '_self' },
{ label: 'Cookie Policy', href: websiteUrl('/privacy/cookies'), target: '_self' },
{ label: 'Security Whitepaper', href: websiteUrl('/security/whitepaper'), target: '_self' },
{ label: 'Support Offering', href: websiteUrl('/legal/support-offering'), target: '_self' },
],
},
],
copyright: `© ${new Date().getFullYear()} Semaphore UI. All rights reserved.`,
},
prism: {
additionalLanguages: ['powershell', 'bash', 'hcl'],
theme: require('prism-react-renderer').themes.github,
darkTheme: require('prism-react-renderer').themes.dracula,
},
algolia: {
// The application ID provided by Algolia
appId: 'B71NA6DNHD',
// Public API key: it is safe to commit it
apiKey: 'bb1dabaeb79b08523ab98c9723afad04',
indexName: 'docs',
// Optional: see doc section below
contextualSearch: false,
// 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: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl.
// Uncomment and adjust if your Algolia index was crawled with different URLs
// replaceSearchResultPathname: {
// from: '/docs/', // or as RegExp: /\/docs\//
// to: '/',
// },
// Optional: Algolia search parameters
searchParameters: {
facetFilters: [],
},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: false,
//... other Algolia params
},
}),
plugins: [
// Redirects from old URLs of moved or removed pages. See redirects.js.
[
'@docusaurus/plugin-client-redirects',
{
redirects: require('./redirects'),
},
],
// Non-default languages reuse the English copy of /docs/assets/* images.
require('./plugins/shared-locale-assets'),
// Webpack's persistent cache is keyed by bundle name, mode and locale, but
// not by the directory Docusaurus generates its modules into. A build that
// uses a non-default DOCUSAURUS_GENERATED_FILES_DIR_NAME therefore reuses
// loader output that imports from the *other* directory, and every page
// fails with "Can't resolve @site/.docusaurus/...". scripts/build-parallel.sh
// needs both, so it points the cache somewhere of its own through this.
...(process.env.SEMAPHORE_DOCS_WEBPACK_CACHE_DIR ? [
function separateWebpackCache() {
return {
name: 'separate-webpack-cache',
configureWebpack() {
return {
cache: {cacheDirectory: process.env.SEMAPHORE_DOCS_WEBPACK_CACHE_DIR},
};
},
};
},
] : []),
...(process.env.SEMAPHORE_DOCS_DEV_PROXY === 'true' ? [
function localizedDevSocket(context) {
const socketPath = `${context.baseUrl}__webpack_hmr`;
return {
name: 'localized-dev-socket',
configureWebpack() {
return {
devServer: {
client: { webSocketURL: { pathname: socketPath } },
webSocketServer: { type: 'ws', options: { path: socketPath } },
},
};
},
};
},
] : []),
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
};
export default config;