-
Notifications
You must be signed in to change notification settings - Fork 14
/
docusaurus.config.js
149 lines (145 loc) · 4.34 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
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'PGM Documentation',
tagline: 'Documentation for PGM, the original Minecraft PvP Game Manager',
url: 'https://pgm.dev/',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.png',
organizationName: 'PGMDev',
projectName: 'Website',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/PGMDev/Website/tree/master/',
showLastUpdateTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
// Redirect from old Events command page
to: '/docs/commands/events',
from: '/docs/events/commands',
},
{
// Redirect from old Packaging and Releasing page name
to: '/docs/guides/preparing/packaging-and-releasing',
from: '/docs/guides/packaging/compiling-and-releasing'
},
],
createRedirects(existingPath) {
if (existingPath.includes('/docs/guides/preparing')) {
// Redirect from old guides link to current guides link
return [
existingPath.replace('/docs/guides/preparing', '/docs/guides/packaging'),
];
}
return undefined;
},
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
metadata: [
{ name: 'apple-mobile-web-app-title', content: 'PGM Documentation' },
{ property: 'og:site_name', content: 'PGM Documentation' },
{ name: 'theme-color', content: '#FF4500' }
],
navbar: {
title: 'PGM Documentation',
logo: {
alt: 'Logo',
src: 'img/logo.png',
},
items: [
{
label: "XML",
position: "left",
items: [
{
to: "docs/modules/general/introduction",
label: "Modules",
},
{
to: "docs/reference/items/inventory",
label: "Reference",
},
{
to: "docs/guides/xml-pointers/regions",
label: "Guides",
},
{
to: "docs/examples/airship-battle",
label: "Examples",
},
],
},
{to: 'docs/commands/main', label: 'Commands', position: 'left'},
{to: 'docs/events/main', label: 'Events', position: 'left'},
{to: 'downloads', label: 'Downloads', position: 'left'},
{
type: 'search',
position: 'right',
},
{
label: 'Discord',
href: 'https://discord.gg/pEEcwTk',
position: 'right',
},
{
href: 'https://github.com/PGMDev',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'light',
copyright: `Copyright © ${new Date().getUTCFullYear()} The PGM project and its contributors`,
},
announcementBar: {
id: 'new_features',
content:
'New Features: <a href="/docs/modules/general/proto">Proto 1.5.0</a>, <a href="/docs/modules/mechanics/tracking-compass">Tracking Compass</a>, <a href="/docs/modules/gear/consumables">Consumables</a>, and <a href="/docs/modules/general/main#map-variants">Map Variants</a>',
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: true,
},
algolia: {
appId: 'NZ27HYOOIL',
apiKey: 'ad0db60d12f0ec4d68150a64097ee7c6',
indexName: 'pgm',
contextualSearch: false,
},
// code highlighting
prism: {
theme: require("prism-react-renderer").themes.palenight,
darkTheme: require("prism-react-renderer").themes.palenight,
/// three backticks (```) will default to XML highlighting
defaultLanguage: 'xml',
},
}),
};
module.exports = config;