-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdocusaurus.config.js
181 lines (170 loc) · 4.54 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
import { themes } from 'prism-react-renderer';
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
const isDev = process.env.NODE_ENV === 'development';
/** @type {import('@docusaurus/types').Config} */
export default {
title: 'Dalamud',
tagline:
'Documentation for the Dalamud plugin framework for FINAL FANTASY XIV.',
favicon: 'img/favicon.ico',
url: 'https://dalamud.dev',
baseUrl: '/',
// Info for GitHub Pages deployment
organizationName: 'goatcorp',
projectName: 'dalamud-docs',
// broken links check can cause the build to hang for a long time
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'warn',
// Some API comments contain curly brackets \{expression\} which are in the new mdx evaluated as expressions
// 'detect' uses mdx for .mdx files and CommonMark
markdown: {
format: 'detect',
},
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
},
}),
},
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: require.resolve('./default-sidebars.js'),
editUrl: 'https://github.com/goatcorp/dalamud-docs/tree/main/',
},
blog: {
path: 'news',
routeBasePath: '/news',
showReadingTime: true,
},
theme: {
customCss: require.resolve('./custom.css'),
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-content-docs',
/** @type {import('@docusaurus/preset-classic').Options} */
({
id: 'api',
routeBasePath: '/api',
lastVersion: isDev ? 'placeholder' : 'master',
/* "current" = unversioned, we exclude this and only use versioned dirs to make CI easier */
includeCurrentVersion: false,
versions: isDev
? {
placeholder: {
label: 'X.x (Placeholder)',
},
}
: require('./dalamud-versions.json'),
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
image: 'img/dalamud-social-card.png',
navbar: {
title: 'Dalamud.dev',
logo: {
alt: 'Dalamud logo',
src: 'img/dalamud-logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docSidebar',
position: 'left',
label: 'Docs',
},
{
type: 'docSidebar',
sidebarId: 'apiSidebar',
position: 'left',
label: 'API',
docsPluginId: 'api',
},
{
to: 'news',
label: 'News',
position: 'left',
},
{
type: 'docsVersionDropdown',
position: 'right',
docsPluginId: 'api',
},
{
href: 'https://github.com/goatcorp/Dalamud',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
footer: {
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/holdshift',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/goatcorp/Dalamud',
},
],
},
],
copyright: `Final Fantasy XIV © 2010-2024 SQUARE ENIX CO., LTD. All Rights Reserved. We are not affiliated with SQUARE ENIX CO., LTD. in any way.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['csharp', 'bash'],
},
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false,
},
algolia: {
appId: 'FA3MQDJLPG',
apiKey: 'eeb9f0346ff4c16a95d22a5a0ecced34',
indexName: 'dalamud',
},
},
};