1
- /** @type {import('@docusaurus/types').DocusaurusConfig } */
2
- module . exports = {
1
+ import { Config } from '@docusaurus/types' ;
2
+ import * as Docs from '@docusaurus/plugin-content-docs' ;
3
+ import * as Blog from '@docusaurus/plugin-content-blog' ;
4
+ import * as Pages from '@docusaurus/plugin-content-pages' ;
5
+ import * as Sitemap from '@docusaurus/plugin-sitemap' ;
6
+ import * as ClientRedirects from '@docusaurus/plugin-client-redirects' ;
7
+ import * as ThemeClassic from '@docusaurus/theme-classic' ;
8
+ import * as SearchLocal from '@easyops-cn/docusaurus-search-local' ;
9
+ import redirects from './redirects' ;
10
+
11
+ const config : Config = {
3
12
title : 'Jellyfin' ,
4
13
tagline : 'The Free Software Media System' ,
5
14
url : 'https://jellyfin.org' ,
@@ -9,7 +18,6 @@ module.exports = {
9
18
favicon : 'images/favicon.ico' ,
10
19
organizationName : 'jellyfin' ,
11
20
projectName : 'jellyfin.org' ,
12
- /** @type {import('@docusaurus/types').ThemeConfig } */
13
21
themeConfig : {
14
22
image : 'images/social.png' ,
15
23
metadata : [
@@ -97,62 +105,45 @@ Site content is licensed <a href='http://creativecommons.org/licenses/by-nd/4.0/
97
105
// Main content
98
106
[
99
107
'@docusaurus/plugin-content-docs' ,
100
- /** @type {import('@docusaurus/plugin-content-docs').Options } */
101
108
{
102
- sidebarPath : require . resolve ( './sidebars.js' ) ,
109
+ sidebarPath : './sidebars.ts' ,
103
110
editUrl : 'https://github.com/jellyfin/jellyfin.org/edit/master/'
104
- }
111
+ } satisfies Docs . Options
105
112
] ,
106
113
[
107
114
'@docusaurus/plugin-content-blog' ,
108
- /** @type {import('@docusaurus/plugin-content-blog').Options } */
109
115
{
110
116
id : 'blog-main' ,
111
117
routeBasePath : 'posts' ,
112
118
showReadingTime : true ,
113
119
path : 'blog'
114
- }
115
- ] ,
116
- [
117
- '@docusaurus/plugin-content-pages' ,
118
- /** @type {import('@docusaurus/plugin-content-pages').Options } */
119
- { }
120
+ } satisfies Blog . Options
120
121
] ,
122
+ [ '@docusaurus/plugin-content-pages' , { } satisfies Pages . Options ] ,
121
123
// Others
122
- [
123
- '@docusaurus/plugin-sitemap' ,
124
- /** @type {import('@docusaurus/plugin-sitemap').Options } */
125
- { }
126
- ] ,
127
- [
128
- 'docusaurus-plugin-sass' ,
129
- /** @type {import('docusaurus-plugin-sass').Options } */
130
- { }
131
- ] ,
124
+ [ '@docusaurus/plugin-sitemap' , { } satisfies Sitemap . Options ] ,
125
+ [ 'docusaurus-plugin-sass' , { } ] ,
132
126
[
133
127
'@docusaurus/plugin-client-redirects' ,
134
- /** @type {import('@docusaurus/plugin-client-redirects').Options } */
135
128
{
136
129
fromExtensions : [ 'html' ] ,
137
- redirects : require ( './ redirects.js' )
138
- }
130
+ redirects : redirects
131
+ } satisfies ClientRedirects . Options
139
132
]
140
133
] ,
141
134
themes : [
142
135
[
143
- require . resolve ( '@docusaurus/theme-classic' ) ,
144
- /** @type {import('@docusaurus/theme-classic').Options } */
136
+ '@docusaurus/theme-classic' ,
145
137
{
146
138
customCss : [
147
139
require . resolve ( '@fontsource/noto-sans/index.css' ) ,
148
140
require . resolve ( './src/css/custom.scss' ) ,
149
141
require . resolve ( './src/css/swiper.scss' )
150
142
]
151
- }
143
+ } satisfies ThemeClassic . Options
152
144
] ,
153
145
[
154
- require . resolve ( '@easyops-cn/docusaurus-search-local' ) ,
155
- /** @type {import('@easyops-cn/docusaurus-search-local').Options } */
146
+ '@easyops-cn/docusaurus-search-local' ,
156
147
{
157
148
hashed : true ,
158
149
indexBlog : false ,
@@ -164,7 +155,9 @@ Site content is licensed <a href='http://creativecommons.org/licenses/by-nd/4.0/
164
155
/ ^ p o s t s \/ /
165
156
] ,
166
157
explicitSearchResultPath : true
167
- }
158
+ } satisfies SearchLocal . PluginOptions
168
159
]
169
160
]
170
161
} ;
162
+
163
+ export default config ;
0 commit comments