-
Notifications
You must be signed in to change notification settings - Fork 220
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
452 lines (442 loc) · 18.1 KB
/
docusaurus.config.ts
File metadata and controls
452 lines (442 loc) · 18.1 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
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
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.vsDark;
import drawioResources from './src/plugins/drawio-resources/index.js';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
require('dotenv').config();
const baseUrl = '/';
const config: Config = {
title: 'SAP Architecture Center',
tagline:
'SAP Architecture Center empowers architects and developers with best practices, reference architectures, and community-driven guidance for designing, integrating, and optimizing SAP and cloud solutions. Accelerate innovation, ensure security, and reduce costs with proven frameworks and collaborative expertise for enterprise transformation.',
favicon: 'img/favicon.ico',
url: 'https://architecture.learning.sap.com',
baseUrl: baseUrl,
// GitHub pages deployment config.
organizationName: 'SAP', //GitHub org
projectName: 'architecture-center', // repo name
deploymentBranch: 'site',
trailingSlash: false,
onBrokenLinks: 'warn', //'throw' to fail build
onDuplicateRoutes: 'throw',
onBrokenAnchors: 'warn',
markdown: {
mermaid: true,
hooks: {
onBrokenMarkdownLinks: 'throw',
onBrokenMarkdownImages: 'throw',
},
},
customFields: {
validatorApiUrl: process.env.VALIDATOR_API_URL,
backendUrl: process.env.BACKEND_API_URL,
expressBackendUrl: process.env.EXPRESS_BACKEND_URL,
authProviders: {
'/architecture-validator': 'btp',
'/quick-start': 'github',
},
},
themes: ['@docusaurus/theme-mermaid'],
plugins: [
[require.resolve('docusaurus-plugin-image-zoom'), {}],
'./src/plugins/init-ui5-theme',
'./src/plugins/page-mapping-generator',
'./src/plugins/tags-generator',
'./src/plugins/tags-plugin',
'./src/plugins/security-headers',
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
hashed: true,
indexDocs: true,
indexPages: true,
docsRouteBasePath: ['/docs'],
docsDir: ['docs'],
indexBlog: true,
blogDir: 'news',
blogRouteBasePath: '/news',
language: ['en'],
highlightSearchTermsOnTargetPage: true,
removeDefaultStopWordFilter: true,
removeDefaultStemmer: true,
},
],
async function tailwindcss() {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require('tailwindcss'));
postcssOptions.plugins.push(require('autoprefixer'));
return postcssOptions;
},
};
},
'./src/plugins/asset-types',
],
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
blog: {
path: 'news',
routeBasePath: 'news',
blogTitle: 'SAP Architecture Center News',
blogDescription:
'A curated space dedicated to the latest advancements in research, publications, innovations, reference architectures, feature releases, and community contributions.',
blogSidebarTitle: 'Architecture Center News',
blogSidebarCount: 0,
tags: '../docs/tags.yml',
authorsMapPath: 'authors.yml',
},
docs: {
path: 'docs',
showLastUpdateTime: true,
showLastUpdateAuthor: true,
onInlineTags: 'warn',
routeBasePath: 'docs',
sidebarPath: require.resolve('./sidebars'),
beforeDefaultRemarkPlugins: [drawioResources],
editUrl: 'https://github.com/SAP/architecture-center/edit/dev/',
tags: '../docs/tags.yml',
},
theme: {
customCss: './src/css/custom.css',
},
sitemap: {
lastmod: 'datetime',
ignorePatterns: [
'/**/tags/**',
'/search/**',
'/news/authors/**',
'/news/archive/**',
'/docs/partners/**',
'/docs/sap/**',
'/docs/exploreallrefarch/**',
],
},
} satisfies Preset.Options,
],
],
themeConfig: {
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: false,
},
mermaid: {
theme: { light: 'base', dark: 'base' },
options: {
fontFamily: '72, Arial, Helvetica, sans-serif',
themeVariables: {
// Force black text for all elements - comprehensive list
primaryTextColor: '#000000',
secondaryTextColor: '#000000',
tertiaryTextColor: '#000000',
textColor: '#000000',
labelTextColor: '#000000',
nodeTextColor: '#000000',
edgeLabelBackground: '#ffffff',
// Node backgrounds and borders
mainBkg: '#ffffff',
secondaryBkg: '#FFC933',
tertiaryBkg: '#89D1FF',
primaryColor: '#97DD40',
primaryBorderColor: '#757575',
lineColor: '#757575',
nodeBorder: '#757575',
clusterBkg: '#f5f5f5',
clusterBorder: '#0070f2',
// Additional text color overrides
labelColor: '#000000',
titleColor: '#000000',
},
},
},
image: 'img/ac-soc-med.png',
metadata: [
{
name: 'keywords',
content: 'sap, btp, architecture, center, hyperscaler, reference',
},
],
zoom: {
selector: '.markdown :not(em) > img:not(.no-zoom)',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)',
},
config: {
margin: 16,
container: {
top: 50,
},
},
},
docs: {
sidebar: {
autoCollapseCategories: true,
hideable: true,
},
},
// Announcement Bar
// announcementBar: {
// id: 'internal-prototype',
// content:
// '<b>Thank you for visiting the SAP Architecture Center. Your <a href="https://github.com/SAP/architecture-center/discussions" target="_blank">feedback</a> is important to us!</b>',
// backgroundColor: '#0053CB',
// textColor: '#FFFFFF',
// isCloseable: true,
// },
navbar: {
title: 'Architecture Center',
hideOnScroll: false,
logo: {
alt: 'SAP',
src: 'img/logo.svg',
},
items: [
{
type: 'dropdown',
label: 'SAP Viewpoints',
position: 'left',
items: [
{
type: 'html',
value: '<strong>Technology Domains</strong>',
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?expanded=ai">AI & Machine Learning</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?expanded=appdev">Application Development & Automation</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?expanded=data">Data & Analytics</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?expanded=integration">Integration</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?expanded=opsec">Operation & Security</a>`,
},
{
type: 'html',
value: '<hr style="margin: 0.3rem 0;">',
},
{
type: 'html',
value: '<strong>Technology Partners</strong>',
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=aws">Amazon Web Services</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=databricks">Databricks</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=gcp">Google Cloud Platform</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=ibm">IBM</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=azure">Microsoft Azure</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=nvidia">Nvidia</a>`,
},
{
type: 'html',
value: `<a class="dropdown__link" href="${baseUrl}docs/ref-arch?partners=snowflake">Snowflake</a>`,
},
],
},
{
type: 'search',
position: 'right',
},
{
type: 'dropdown',
label: 'Navigate',
position: 'left',
items: [
{
label: 'Explore the News Articles',
to: '/news-all',
},
/* {
label: 'Discover the AI-Native North Star Architecture',
to: '/docs/nsa/',
sidebarid: 'northStarSidebar',
}, */
{
label: 'Discover the AI Golden Path',
to: '/docs/aigp/',
sidebarid: 'goldenPathSidebar',
},
{
label: 'Browse the Reference Architectures',
to: '/docs/ref-arch',
},
{
type: 'html',
value: '<hr style="margin: 0.3rem 0;">',
},
{
label: 'Launch the Architecture Validator',
to: '/architecture-validator',
},
{
label: 'Launch Quick Start',
to: '/quick-start',
},
{
type: 'html',
value: '<hr style="margin: 0.3rem 0;">',
},
{
label: 'Access the Community of Practice',
to: '/docs/community/intro/',
sidebarid: 'communitySidebar',
},
],
},
{
href: 'https://github.com/SAP/architecture-center',
position: 'right',
className: 'navbar-item-github',
'aria-label': 'GitHub repository',
title: 'Visit GitHub Repository',
},
{
type: 'custom-user-dropdown',
position: 'right',
},
],
},
footer: {
style: 'light',
links: [
{
title: 'Other SAP Resources',
items: [
{
label: 'SAP Help Portal',
href: 'https://help.sap.com/docs/',
},
{
label: 'SAP Developer Center',
href: 'https://developers.sap.com/',
},
{
label: 'SAP Support Portal',
href: 'https://support.sap.com/',
},
{
label: 'SAP Learning',
href: 'https://learning.sap.com/',
},
],
},
{
title: 'SAP Open Source & GitHub',
items: [
{
label: 'SAP Open Source',
href: 'https://pages.community.sap.com/topics/open-source',
},
{
label: 'GitHub Repository',
href: 'https://github.com/SAP/architecture-center',
},
{
label: 'Create a new GitHub issue',
href: 'https://github.com/SAP/architecture-center/issues/new/choose',
},
],
},
{
title: 'SAP Communities',
items: [
{
label: 'Enterprise Architecture',
href: 'https://community.sap.com/t5/enterprise-architecture/gh-p/Enterprise-Architecture',
},
{
label: 'Blog Posts',
href: 'https://community.sap.com/t5/all-sap-community-blogs/ct-p/all-blogs',
},
{
label: 'SAP Community',
href: 'https://community.sap.com/',
},
],
},
{
title: 'Legal',
items: [
{
label: 'Privacy Statement',
href: 'https://architecture.learning.sap.com/community/privacy',
},
{
label: 'Cookie Statement',
href: 'https://architecture.learning.sap.com/community/cookie',
},
{
label: 'Terms of Use',
href: 'https://www.sap.com/about/legal/terms-of-use.html',
},
{
label: 'Legal Statement',
href: 'https://www.sap.com/corporate/en/legal/impressum.html',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} SAP SE or SAP affiliate company and SAP Architecture Center contributors. Released under <a href="https://github.com/SAP/architecture-center#Apache-2.0-1-ov-file">Apache-2.0 License</a>.<br>This site is powered by <a href="https://docusaurus.io/" target="_blank" rel="noopener noreferrer">Docusaurus</a> and hosted on <a href="https://pages.github.com/" target="_blank" rel="noopener noreferrer">GitHub Pages</a>.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
magicComments: [
// Remember to extend the default highlight class name as well!
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: { start: 'highlight-start', end: 'highlight-end' },
},
{
className: 'code-block-hidden',
line: 'hide-next-line',
block: { start: 'hide-start', end: 'hide-end' },
},
{
className: 'theme-code-block-added-line',
line: 'added-line',
block: { start: 'added-start', end: 'added-end' },
},
{
className: 'theme-code-block-removed-line',
line: 'removed-line',
block: { start: 'removed-start', end: 'removed-end' },
},
],
},
} satisfies Preset.ThemeConfig,
};
export default config;