-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docusaurus.config.ts
222 lines (215 loc) · 6.81 KB
/
docusaurus.config.ts
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
import autoprefixer from 'autoprefixer';
import { themes as prismThemes } from 'prism-react-renderer';
import tailwindcss from 'tailwindcss';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: 'RDO.GG',
tagline: 'Home of the RDO.GG API and RDO Compendium',
titleDelimiter: ' - ',
url: 'https://rdo.gg',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'Senexis',
projectName: 'RDO-Compendium-GG',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
routeBasePath: 'wiki',
showLastUpdateTime: true,
},
blog: {
path: 'news',
routeBasePath: 'news',
blogTitle: 'News',
blogDescription: 'Read all the latest news about the RDO.GG API and RDO Compendium',
blogSidebarCount: 5,
blogSidebarTitle: 'Recent articles',
},
theme: {
customCss: [
'./src/css/styles.css',
'./src/css/redoc.css',
],
},
} satisfies Preset.Options,
],
],
themeConfig: {
// announcementBar: {
// id: 'announcement-bar-vacation',
// content: '🏖️ Please note there may be reduced support between July 19th and July 27th due to vacation.',
// textColor: 'var(--ifm-font-color-base)',
// backgroundColor: 'var(--ifm-footer-background-color)',
// isCloseable: true,
// },
navbar: {
logo: {
alt: 'RDO.GG',
src: 'img/menu.png',
},
items: [
{
type: 'doc',
label: 'Wiki',
position: 'left',
docId: 'getting-started',
},
{
to: '/news',
label: 'News',
position: 'left',
},
{
to: '/api',
label: 'API',
position: 'left',
},
{
href: 'https://tunables.rdo.gg/',
label: 'Tunables',
position: 'left',
},
{
href: 'https://rdo.gg/status/',
label: 'Status',
position: 'left',
},
{
href: 'https://rdo.gg/patreon/',
target: '_blank',
position: 'right',
className: 'fa-brands fa-patreon',
title: 'Support RDO.GG on Patreon',
'aria-label': 'Support RDO.GG on Patreon',
},
{
href: 'https://rdo.gg/discord/',
target: '_blank',
position: 'right',
className: 'fa-brands fa-discord',
title: 'Join the support Discord',
'aria-label': 'Join the support Discord',
},
{
href: 'https://rdo.gg/x/',
target: '_blank',
position: 'right',
className: 'fa-brands fa-x-twitter',
title: 'Visit @rdo_gg on X',
'aria-label': 'Visit @rdo_gg on X',
},
{
href: 'https://github.com/Senexis/RDO-GG/',
target: '_blank',
position: 'right',
className: 'fa-brands fa-github',
title: 'Contribute to the site on GitHub',
'aria-label': 'Contribute to the site on GitHub',
},
],
},
footer: {
links: [
{
label: 'Privacy Policy',
to: 'wiki/legal/privacy-policy',
},
{
label: 'Terms of Service',
to: 'wiki/legal/terms-of-service',
},
],
copyright: `
© ${new Date().getFullYear()} - RDO.GG<br>
<small class="opacity-60">
Red Dead Redemption, Red Dead Online, RDR and RDO are registered trademarks by Rockstar Games.<br>
This site and bot are not endorsed, recognised, sponsored, or approved by Rockstar Games.
</small><br>
<div class="inline-block bg-[#1c1e21] w-[250px] h-[30px] rounded mt-2 overflow-hidden opacity-80 hover:opacity-100 transition-opacity">
<iframe src="https://status.rdo.gg/badge?theme=dark" frameborder="0" scrolling="no" class="w-full h-full"></iframe>
</div>
`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
fromExtensions: ['html', 'htm'],
redirects: [
{ from: '/bot', to: '/' },
{ from: '/credits', to: '/wiki/category/credits' },
{ from: '/deprecation', to: '/news/2022/03/01/message-command-deprecation' },
{ from: '/faq', to: '/wiki/faq' },
{ from: '/guides', to: '/wiki/category/guides' },
{ from: '/guides/basics', to: '/wiki/guides/commands' },
{ from: '/guides/settings', to: '/wiki/guides/settings' },
{ from: '/help', to: '/wiki/guides/commands' },
{ from: '/knowledge-base', to: '/wiki/getting-started' },
{ from: '/knowledge-base/all-about-premium', to: '/wiki/guides/premium' },
{ from: '/knowledge-base/message-command-deprecation', to: '/news/2022/03/01/message-command-deprecation' },
{ from: '/knowledge-base/privacy-policy', to: '/wiki/legal/privacy-policy' },
{ from: '/knowledge-base/terms-of-service', to: '/wiki/legal/terms-of-service' },
{ from: '/lists', to: '/wiki/category/lists' },
{ from: '/migration', to: '/news/2022/05/20/rdo-compendium-migration' },
{ from: '/patrons', to: '/wiki/credits/patrons' },
{ from: '/premium', to: '/wiki/guides/premium' },
{ from: '/privacy', to: '/wiki/legal/privacy-policy' },
{ from: '/terms', to: '/wiki/legal/terms-of-service' },
{ from: '/toasts', to: '/wiki/lists/toasts' },
{ from: '/translators', to: '/wiki/credits/translators' },
{ from: '/upsale', to: '/wiki/guides/premium' },
{ from: '/wiki/privacy-policy', to: '/wiki/legal/privacy-policy' },
{ from: '/wiki/terms-of-service', to: '/wiki/legal/terms-of-service' },
],
},
],
[
'@docusaurus/plugin-ideal-image',
{
max: 1920,
disableInDev: false,
},
],
() => ({
name: 'tailwind',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(tailwindcss);
postcssOptions.plugins.push(autoprefixer);
return postcssOptions;
},
}),
() => ({
name: 'yaml-loader',
configureWebpack() {
return {
mergeStrategy: { 'module.rules': 'prepend' },
module: {
rules: [
{
test: /\.ya?ml$/,
use: 'yaml-loader',
},
],
},
};
},
}),
],
};
export default config;