-
Notifications
You must be signed in to change notification settings - Fork 15
/
docusaurus.config.js
230 lines (224 loc) · 7 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
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// @ts-ignore
const themes = require("prism-react-renderer").themes;
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "OpenGOAL",
tagline: "Reviving the Language that Brought us the Jak and Daxter Series",
url: "https://opengoal.dev",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.png",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "open-goal", // Usually your GitHub org/user name.
projectName: "open-goal.github.io", // Usually your repo name.
// Even if you don't use internalization, 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: "en",
locales: ["en"],
},
markdown: {
mermaid: true,
},
scripts: [
{
src: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.74/dist/shoelace.js",
type: "module",
},
],
stylesheets: [
"https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700&family=Roboto+Mono:wght@400;700&display=swap",
"https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.74/dist/themes/dark.css",
"https://fonts.googleapis.com/icon?family=Material+Icons",
],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: "documentation",
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/open-goal/open-goal.github.io/tree/master/",
},
blog: {
path: "blog",
blogSidebarCount: 0,
showReadingTime: true,
editUrl:
"https://github.com/open-goal/open-goal.github.io/tree/master/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
plugins: [
// @ts-ignore
customizedSvgo,
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
announcementBar: {
id: "announcementBar-19", // Increment on change
content: `<a href="/blog/progress-report-oct-2024">Check out October's Progress Report Here!</a>`,
},
algolia: {
// The application ID provided by Algolia
appId: "YAP33BKRCA",
// Public API key: it is safe to commit it
apiKey: "7d68c3181a134366b669225073fed1cb",
indexName: "open-goal",
// Optional: see doc section below
contextualSearch: true,
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
//... other Algolia params
},
colorMode: {
defaultMode: "dark",
disableSwitch: true,
respectPrefersColorScheme: false,
},
image: "img/logo.png",
metadata: [{ name: "twitter:card", content: "summary" }],
navbar: {
title: "OpenGOAL",
logo: {
alt: "OpenGOAL Logo",
src: "img/logo.png",
},
items: [
{ to: "blog", label: "Blog", position: "left" },
{
to: "/progress/milestones",
label: "Progress",
position: "left",
items: [
{
label: "Major Milestones",
to: "/progress/milestones",
},
{
label: "Jak and Daxter - Decompilation",
to: "/progress/jak1",
},
{
label: "Jak II - Decompilation",
to: "/progress/jak2",
},
{
label: "Jak 3 - Decompilation",
to: "/progress/jak3",
},
],
},
{
type: "doc",
docId: "intro",
position: "left",
label: "Documentation",
},
{ to: "/docs/faq", label: "FAQ", position: "left" },
{
label: "Galleries",
position: "left",
items: [
{
label: "Jak and Daxter: The Precursor Legacy",
to: "/gallery/jak1",
},
{
label: "Jak II",
to: "/gallery/jak2",
},
],
},
{
href: "https://github.com/open-goal",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
style: "dark",
copyright: `
Copyright © ${new Date().getFullYear()} OpenGOAL. Built with Docusaurus.
<br>
<br>
<span class="trademark-disclaimer">All third party trademarks (including but not limited to: logos and icons) referenced by OpenGOAL remain the property of their respective owners. Unless specifically identified as such, OpenGOAL's use of third party trademarks does not indicate any relationship, sponsorship, or endorsment between OpenGOAL and the owners of these trademarks. Any references to the aforementioned trademarks are for informative purposes and should be considered nominative fair use.</span>`,
},
prism: {
theme: darkCodeTheme,
lightTheme: lightCodeTheme,
additionalLanguages: ["lisp", "clojure"],
},
}),
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve("swc-loader"),
options: {
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
target: "es2017",
},
module: {
type: isServer ? "commonjs" : "es6",
},
},
}),
},
};
function customizedSvgo() {
return {
name: "docusaurus-svgo",
configureWebpack(config) {
// allow svgr to use svgo config file
for (const rule of config.module.rules) {
if (typeof rule === "object" && rule.test.toString() === "/\\.svg$/i") {
for (const nestedRule of rule.oneOf) {
if (nestedRule.use instanceof Array) {
for (const loader of nestedRule.use) {
if (
typeof loader === "object" &&
loader.loader === require.resolve("@svgr/webpack")
) {
if (typeof loader.options === "object") {
loader.options.svgoConfig = null;
loader.options.svgo = false;
}
}
}
}
}
}
}
return {
mergeStrategy: {
"module.rules": "replace",
},
module: {
rules: config.module.rules,
},
};
},
};
}
module.exports = config;