-
Notifications
You must be signed in to change notification settings - Fork 22
/
docusaurus.config.js
199 lines (189 loc) · 5.46 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
// @ts-check
import pluginContentDocsWrapper from "./src/plugins/pluginContentDocsWrapper.ts";
import autocolorPlugin from "./src/plugins/rehype/autocolor.js";
const GITHUB_ORG = "comcode-org";
const GITHUB_PROJECT = "hackmud_wiki";
// See: https://docusaurus.io/docs/api/docusaurus-config
/** @type {import('@docusaurus/types').Config} */
const config = {
// Metadata
title: "hackmud Wiki",
tagline: "Knowledge repository for the video game hackmud",
favicon: "favicon.ico",
// Deployment details
url: `https://wiki.hackmud.com`,
baseUrl: `/`,
// GitHub Pages config for CLI deployment
organizationName: GITHUB_ORG,
projectName: GITHUB_PROJECT,
// Internationalization options, useful to set even if you only support one
// language because it generates the `lang` attribute on the `html` tag
i18n: {
defaultLocale: "en",
locales: ["en"],
},
// Installed plugins
plugins: [
[
pluginContentDocsWrapper, // wraps @docusaurus/plugin-content-docs
// See: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#configuration
{
// Path of the docs plugin relative to the root. Since it's the only
// plugin we're using, put it at the top
routeBasePath: "/",
// Base url for "Edit This Page" button on content pages
editUrl: `https://github.com/${GITHUB_ORG}/${GITHUB_PROJECT}/edit/main`,
// Path to custom sidebar definition(s)
sidebarPath: require.resolve("./sidebar.js"),
// Plugins for remark, at the Markdown AST level
remarkPlugins: [],
// Plugins for rehype, at the HTML AST level
rehypePlugins: [autocolorPlugin],
},
],
["@docusaurus/plugin-sitemap", {}],
],
// Installed themes
themes: [
[
"@docusaurus/theme-classic",
// See: https://docusaurus.io/docs/api/themes/@docusaurus/theme-classic#configuration
{
customCss: "./src/css/custom.css",
},
],
"@docusaurus/theme-search-algolia",
],
// Global theme config
// See: https://docusaurus.io/docs/api/themes/configuration
/** @type {import('@docusaurus/theme-common').UserThemeConfig & import('@docusaurus/theme-search-algolia').UserThemeConfig} */
themeConfig: {
// Supported and default color modes
colorMode: {
defaultMode: "dark",
disableSwitch: true,
respectPrefersColorScheme: false,
},
// Theme configuration specific to the docs plugin
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
navbar: {
title: "hackmud Wiki",
items: [
{
type: "dropdown",
label: "Upgrades",
items: [
{
type: "docSidebar",
sidebarId: "lockSidebar",
},
{
type: "docSidebar",
sidebarId: "upgradeArchitectSidebar",
},
{
type: "docSidebar",
sidebarId: "upgradeInfiltratorSidebar",
},
{
type: "docSidebar",
sidebarId: "upgradeScavengerSidebar",
},
{
type: "docSidebar",
sidebarId: "upgradeExecutiveSidebar",
},
{
type: "docSidebar",
sidebarId: "upgradeOtherSidebar",
},
],
},
{
type: "dropdown",
label: "Lore",
items: [
{
type: "docSidebar",
sidebarId: "characterSidebar",
},
{
type: "docSidebar",
sidebarId: "eventSidebar",
},
],
},
{
type: "dropdown",
label: "Scripting",
items: [
{
type: "docSidebar",
sidebarId: "scriptsLibSidebar",
},
{
type: "docSidebar",
sidebarId: "trustScriptsSidebar",
},
{
type: "docSidebar",
sidebarId: "databaseSidebar",
},
{
type: "docSidebar",
sidebarId: "directivesSidebar",
},
{
type: "docSidebar",
sidebarId: "syntaxSidebar",
},
],
},
{
type: "dropdown",
label: "Guides",
items: [
{
type: "docSidebar",
sidebarId: "newPlayersSidebar",
},
{
type: "docSidebar",
sidebarId: "advancedSidebar",
},
{
type: "docSidebar",
sidebarId: "miscGuidesSidebar",
},
],
},
],
},
footer: {
copyright:
'Licensed by <a href="https://comcode.org/" target="_blank" rel="noopener">ComCODE</a> with <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="noopener noreferrer">CC BY-NC-SA 4.0</a> for creative and educational use.',
},
// Configuration for Algolia DocSearch
algolia: {
appId: process.env.ALGOLIA_APPID,
apiKey: process.env.ALGOLIA_SEARCH_API_KEY,
indexName: "hackmud",
},
},
// Global markdown config
// See: https://docusaurus.io/docs/api/docusaurus-config#markdown
markdown: {
format: "mdx",
mermaid: false,
mdx1Compat: {
comments: false,
admonitions: false,
headingIds: false,
},
},
};
export default config;