forked from unraid/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
280 lines (270 loc) · 8.63 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;
const { sortSidebarItems } = require("./sitebar-semver-sort");
const locales = ["en", "zh", "es", "fr", "de"];
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Unraid Docs",
tagline: "Documentation for Unraid",
favicon: "img/favicon.svg", // https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7
// Set the production url of your site here
url: "https://docs.unraid.net/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
trailingSlash: true,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "unraid", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
// 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,
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/unraid/docs/tree/main/",
editLocalizedFiles: true,
async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
...args
}) {
const sidebarItems = await defaultSidebarItemsGenerator(args);
return sortSidebarItems(sidebarItems);
},
},
/* blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/unraid/docs/tree/main/",
}, */
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
gtag: {
trackingID: "G-CZENQ1ZPEH",
anonymizeIP: true,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
appId: "JUYLFQHE7W",
apiKey: "47111d6564a2e69ee21a1d3d2f786ef3",
indexName: "unraid",
contextualSearch: true,
searchPagePath: 'search',
},
colorMode: { defaultMode: "dark", respectPrefersColorScheme: true },
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: true,
},
},
image: "img/meta-unraid.png",
metadata: [
{
name: "theme-color",
content: "#242526",
media: "(prefers-color-scheme: dark)",
}, // matches docusaurus theme rather than unraid specific color
{
name: "theme-color",
content: "#ffffff",
media: "(prefers-color-scheme: light)",
},
{ name: "color-scheme", content: "dark light" },
{ name: "keywords", content: "Unraid, server, storage, NAS, Docker, virtualization, array, parity, data protection, file sharing, plugins, management, GUI, disk management, caching, SSD, disk encryption, security, RAID, network configuration, backups, media server, transcoding, monitoring, VMs, GPU passthrough, hardware compatibility" },
],
navbar: {
title: "Unraid Docs",
logo: {
alt: "My Site Logo",
src: "img/un-mark-gradient.svg",
style: {
width: "30px",
},
},
items: [
{
items: [
{
href: "https://unraid.net",
label: "Unraid Home",
},
{
href: "https://forums.unraid.net",
label: "Forums",
},
{ label: "Docs Github", href: "https://github.com/unraid/docs" },
],
position: "right",
label: "More",
},
{
type: "localeDropdown",
position: "right",
},
],
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
footer: {
style: "light",
links: [
{
title: "Documentation",
items: [
{
label: "Home",
to: "/",
},
{
label: "Contribute on Github",
href: "https://github.com/unraid/docs",
},
],
},
{
title: "Community",
items: [
{
label: "Forums",
href: "https://forums.unraid.net",
},
{
label: "Discord",
href: "https://discord.unraid.net/",
},
],
},
{
title: "More",
items: [
{
label: "Unraid Home",
href: "https://unraid.net",
},
{
label: "Unraid Connect",
href: "https://connect.myunraid.net",
},
{
label: "Newsletter",
href: "https://newsletter.unraid.net",
},
{
label: "Blog",
href: "https://unraid.net/blog",
},
],
},
],
logo: {
alt: "Unraid Logo",
src: "img/un-mark-gradient.svg",
width: 100,
},
copyright: `<small>Copyright © 2005-${new Date().getFullYear()} Lime Technology, Inc.<br>Unraid® is a registered trademark of Lime Technology, Inc.</small>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['diff', 'json', 'bash'],
},
zoom: {
selector: '.markdown :not(em) > img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
},
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
}
},
}),
plugins: [
require.resolve('docusaurus-plugin-image-zoom'),
[
"@docusaurus/plugin-ideal-image",
{
quality: 70,
max: 1030, // max resized image's size.
min: 640, // min resized image's size. if original is lower, use that size.
steps: 2, // the max number of images generated between min and max (inclusive)
disableInDev: false,
},
],
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
// reminder: these have no effect in dev mode
// see https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-client-redirects
// file renamed in https://github.com/unraid/docs/commit/570a7e629bef1577d43e188495cb71916e7de360
{
to: "/legacy/FAQ/shrink-array/",
from: "/legacy/FAQ/Shrink_array/",
},
// move Getting Started pages
{
to: "/unraid-os/getting-started/",
from: "/unraid-os/manual/getting-started/",
},
{
to: "/unraid-os/getting-started/manual-install-method/",
from: "/unraid-os/manual/getting-started/manual-install-method/",
},
// redirect from 6.12.7 to 6.12.8
{
to: "/unraid-os/release-notes/6.12.8/",
from: "/unraid-os/release-notes/6.12.7/",
},
// redirect from unraid-account faq page to the top level account page
{
to: "/account/",
from: "/unraid-os/faq/unraid-account/",
},
// move User and Overview pages
// User and Overview sections redirects
{
to: "/unraid-os/manual/users/reset-password/",
from: "/unraid-os/manual/troubleshooting/",
},
{
to: "/unraid-os/overview/what-is-unraid/",
from: "/unraid-os/manual/what-is-unraid/",
},
//Troubleshooting section redirect
{
to: "/unraid-os/troubleshooting/",
from: "/unraid-os/manual/troubleshooting/",
},
],
},
],
],
};
module.exports = config;