forked from jellyfin/jellyfin.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
208 lines (208 loc) · 5.64 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
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Jellyfin',
tagline: 'The Free Software Media System',
url: 'https://jellyfin.org',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'images/favicon.ico',
organizationName: 'jellyfin',
projectName: 'jellyfin.org',
/** @type {import('@docusaurus/types').ThemeConfig} */
themeConfig: {
image: 'images/social.png',
metadata: [
{ name: 'og:type', content: 'website' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@jellyfin' }
],
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false
},
navbar: {
logo: {
alt: 'Jellyfin Logo',
src: 'images/logo.svg'
},
items: [
{ to: 'posts', label: 'Blog', position: 'right' },
{
to: 'downloads',
label: 'Downloads',
position: 'right'
},
{
to: 'contribute',
label: 'Contribute',
position: 'right'
},
{
type: 'doc',
docId: 'index',
label: 'Documentation',
position: 'right'
},
{
to: 'contact',
label: 'Contact',
position: 'right'
},
{
href: 'https://forum.jellyfin.org',
label: 'Forum',
position: 'right'
}
]
},
footer: {
logo: {
alt: 'Jellyfin Logo',
src: 'images/logo.svg',
width: 240,
height: 80
},
links: [
{
label: 'Documentation',
to: '/docs'
},
{
label: 'Feature Requests',
to: 'https://features.jellyfin.org'
},
{
label: 'Contribute',
to: '/contribute'
},
{
label: 'Status',
to: 'https://status.jellyfin.org'
},
{
label: 'Contact',
to: '/contact'
}
],
copyright: `<a href="https://github.com/jellyfin/jellyfin/releases/latest">
<img alt="Current Release" src="https://img.shields.io/github/release/jellyfin/jellyfin.svg"/>
</a>
<br/>
Site content is licensed <a href='http://creativecommons.org/licenses/by-nd/4.0/'>CC-BY-ND-4.0</a>`
}
},
plugins: [
// Main content
[
'@docusaurus/plugin-content-docs',
/** @type {import('@docusaurus/plugin-content-docs').Options} */
{
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/jellyfin/jellyfin.org/edit/master/'
}
],
[
'@docusaurus/plugin-content-blog',
/** @type {import('@docusaurus/plugin-content-blog').Options} */
{
id: 'blog-main',
routeBasePath: 'posts',
showReadingTime: true,
path: 'blog'
}
],
[
'@docusaurus/plugin-content-pages',
/** @type {import('@docusaurus/plugin-content-pages').Options} */
{}
],
// Others
[
'@docusaurus/plugin-sitemap',
/** @type {import('@docusaurus/plugin-sitemap').Options} */
{}
],
[
'docusaurus-plugin-sass',
/** @type {import('docusaurus-plugin-sass').Options} */
{}
],
[
'@docusaurus/plugin-client-redirects',
/** @type {import('@docusaurus/plugin-client-redirects').Options} */
{
fromExtensions: ['html'],
redirects: [
// These pages existed on the jellyfin-blog site, but were not fully configured
{
from: ['/categories', '/tags'],
to: '/posts'
},
// Jellyfin 10.8 and below linked to this subtitle docs page
{
from: ['/docs/general/server/media/subtitles', '/docs/general/server/media/subtitles.html'],
to: '/docs/general/server/media/external-files'
},
// Storage docs moved from the server guide to administrative docs
{
from: '/docs/general/server/storage',
to: '/docs/general/administration/storage'
},
// Unified client + server download pages
{
from: '/clients',
to: '/downloads/clients/'
},
{
from: '/clients/all',
to: '/downloads/clients/all'
},
// New installation documentation
{
from: '/docs/general/administration/installing',
to: '/docs/general/installation/'
},
{
from: '/docs/general/administration/install/synology',
to: '/docs/general/installation/synology'
},
{
from: '/docs/general/administration/building',
to: '/docs/general/installation/source'
}
]
}
]
],
themes: [
[
require.resolve('@docusaurus/theme-classic'),
/** @type {import('@docusaurus/theme-classic').Options} */
{
customCss: [
require.resolve('@fontsource/noto-sans/index.css'),
require.resolve('./src/css/custom.scss'),
require.resolve('./src/css/swiper.scss')
]
}
],
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import('@easyops-cn/docusaurus-search-local').Options} */
{
hashed: true,
indexBlog: false,
indexPages: true,
blogRouteBasePath: '/posts',
ignoreFiles: [
// NOTE: We need to explicitly ignore the blog routes because it seems to fall through to the page indexing
'posts',
/^posts\//
],
explicitSearchResultPath: true
}
]
]
};