-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
323 lines (310 loc) · 9.18 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
323 lines (310 loc) · 9.18 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
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: 'MSK Scripts - Documentation',
tagline: 'Documentation & Guides',
favicon: 'img/favicon.ico',
future: {
v4: true,
},
url: 'https://docu.msk-scripts.de',
baseUrl: '/',
// Apache answers /path with a 301 to /path/, but Docusaurus emitted the
// canonical link WITHOUT the trailing slash. The canonical therefore pointed
// at a URL that redirects away from the page carrying it, and Google indexed
// both spellings: the Search Console lists
// /discord/discord_ticketbot/getting-started/ with 107 impressions and
// /discord/discord_ticketbot/getting-started with another 42, so one page's
// ranking signals sit on two URLs. This makes every generated link, sitemap
// entry and canonical match what the server actually serves.
trailingSlash: true,
organizationName: 'MSK Scripts',
projectName: 'documentation',
onBrokenLinks: 'throw',
// Zweisprachig seit 29.08.2026. Uebersetzt wird bewusst nur der
// Discord-Bereich: die deutsche Suche will Anleitungen, und dort ist die
// Konkurrenz am schwaechsten. Alles andere bleibt englisch und faellt unter
// /de/ auf den englischen Originaltext zurueck.
i18n: {
defaultLocale: 'en',
locales: ['en', 'de'],
localeConfigs: {
en: { label: 'English' },
de: { label: 'Deutsch' },
},
},
headTags: [
// SEO Meta Tags
//
// Hier steht bewusst KEINE description. headTags gilt fuer jede Seite, die
// statische Fassung stand also als englisches Duplikat auf 204 von 210
// Seiten, auf den deutschen zusaetzlich in der falschen Sprache. Docusaurus
// leitet die Beschreibung pro Seite aus Frontmatter oder erstem Absatz ab.
// Seiten, die mit einem Code-Block beginnen, brauchen sie im Frontmatter.
{
tagName: 'meta',
attributes: {
name: 'keywords',
content:
'MSK Scripts, Musiker15, FiveM, Discord Bots, Documentation, Guides, msk_core, msk_garage, ESX, QBCore, ox_core',
},
},
{
tagName: 'meta',
attributes: {
name: 'author',
content: 'Musiker15',
},
},
{
tagName: 'meta',
attributes: {
name: 'robots',
content: 'index, follow',
},
},
// Open Graph (Facebook, Discord, etc.)
{
tagName: 'meta',
attributes: {
property: 'og:type',
content: 'website',
},
},
{
tagName: 'meta',
attributes: {
property: 'og:site_name',
content: 'MSK Scripts Documentation',
},
},
// og:locale, og:url und rel=canonical stehen hier bewusst NICHT mehr.
// headTags gilt fuer jede Seite, die statischen Werte zeigten also auf
// jeder der gut 200 Unterseiten auf die Startseite. Zusammen mit dem
// korrekten, seiteneigenen Canonical von Docusaurus standen damit zwei
// widersprechende rel=canonical im head, und die wertet Google gar nicht
// aus. Docusaurus erzeugt alle drei Tags ohnehin pro Seite und pro Sprache.
// Theme Color (MSK Grün)
{
tagName: 'meta',
attributes: {
name: 'theme-color',
content: '#00E676',
},
},
],
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'guides',
path: 'guides',
routeBasePath: 'guides',
sidebarPath: './sidebars-guides.ts',
editUrl: 'https://github.com/MSK-Scripts/documentation/tree/main/',
// Ohne lastUpdatedAt schreibt das Sitemap-Plugin kein <lastmod>.
showLastUpdateTime: true,
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'discord',
path: 'discord',
routeBasePath: 'discord',
sidebarPath: './sidebars-discord.ts',
editUrl: 'https://github.com/MSK-Scripts/documentation/tree/main/',
// Ohne lastUpdatedAt schreibt das Sitemap-Plugin kein <lastmod>.
showLastUpdateTime: true,
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'ecosystem',
path: 'ecosystem',
routeBasePath: 'ecosystem',
sidebarPath: './sidebars-ecosystem.ts',
editUrl: 'https://github.com/MSK-Scripts/documentation/tree/main/',
// Ohne lastUpdatedAt schreibt das Sitemap-Plugin kein <lastmod>.
showLastUpdateTime: true,
},
],
],
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/MSK-Scripts/documentation/tree/main/',
// Ohne lastUpdatedAt schreibt das Sitemap-Plugin kein <lastmod>.
showLastUpdateTime: true,
},
blog: false,
// Die Defaults des Sitemap-Plugins schreiben auf jede der 208 URLs
// changefreq weekly und priority 0.5. Beides wertet Google nicht aus,
// und das eine Feld, das ausgewertet wird, fehlte komplett. Also
// umgekehrt: lastmod an, die beiden Placebo-Felder aus.
sitemap: {
lastmod: 'date',
changefreq: null,
priority: null,
// Die Suchseite ist eine Ergebnisseite ohne eigenen Inhalt. Sie hat
// deshalb auch keine description und gehoert nicht in den Index.
ignorePatterns: ['**/search', '**/search/'],
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
// Offline-Volltextsuche, die vollständig im Browser läuft und KEIN
// `unsafe-eval` benötigt (im Gegensatz zu docusaurus-lunr-search).
// Wichtig für die strikte Content-Security-Policy (siehe apache/).
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
hashed: true,
language: ['en', 'de'],
indexBlog: false,
// Alle vier Docs-Instanzen indexieren (Default + guides/discord/ecosystem)
docsRouteBasePath: ['docs', 'guides', 'discord', 'ecosystem'],
docsDir: ['docs', 'guides', 'discord', 'ecosystem'],
highlightSearchTermsOnTargetPage: true,
searchResultLimits: 8,
},
],
],
themeConfig: {
image: 'img/msk_scripts_banner.png',
heroImage: 'img/msk_scripts_banner.png',
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
title: 'MSK Scripts',
logo: {
alt: 'MSK Scripts Logo',
src: 'img/logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'FiveM Ressources',
},
{
type: 'docSidebar',
sidebarId: 'discordSidebar',
docsPluginId: 'discord',
position: 'left',
label: 'Discord Bots',
},
{
type: 'docSidebar',
sidebarId: 'ecosystemSidebar',
docsPluginId: 'ecosystem',
position: 'left',
label: 'Ecosystem',
},
{
type: 'docSidebar',
sidebarId: 'guidesSidebar',
docsPluginId: 'guides',
position: 'left',
label: 'Guides',
},
{
href: 'https://www.msk-scripts.de',
label: 'Shop',
position: 'right',
},
{
href: 'https://github.com/MSK-Scripts',
label: 'Github',
position: 'right',
},
{
href: 'https://discord.gg/5hHSBRHvJE',
label: 'Discord',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Dokumentation',
to: '/docs',
},
{
label: 'Guides',
to: '/guides',
},
{
label: 'Ecosystem',
to: '/ecosystem',
},
{
label: 'Discord Bots',
to: '/discord',
},
],
},
{
title: 'Community',
items: [
{
label: 'Shop',
href: 'https://www.msk-scripts.de',
},
{
label: 'GitHub',
href: 'https://github.com/MSK-Scripts',
},
{
label: 'Discord',
href: 'https://discord.gg/5hHSBRHvJE',
},
],
},
{
title: 'Legal',
items: [
{
label: 'Impressum',
to: '/impressum',
},
{
label: 'Datenschutz',
to: '/datenschutz',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} MSK Scripts. All rights reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'ini', 'sql', 'apacheconf', 'java', 'json', 'yaml', 'lua'],
},
} satisfies Preset.ThemeConfig,
};
export default config;