1
- const { resolve } = require ( 'path' )
2
- const {
3
- linkDocblocks ,
4
- transpileCodeblocks
5
- } = require ( 'remark-typescript-tools' )
1
+ import { resolve } from 'path'
2
+ import { linkDocblocks , transpileCodeblocks } from 'remark-typescript-tools'
3
+ import type { Options , ThemeConfig } from '@docusaurus/preset-classic'
4
+ import type { Config } from '@docusaurus/types'
5
+ import type { Options as UmamiOptions } from '@dipakparmar/docusaurus-plugin-umami'
6
6
7
- module . exports = {
7
+ const config : Config = {
8
8
title : 'Redux' ,
9
9
tagline :
10
10
'A JS library for predictable and maintainable global state management' ,
@@ -162,10 +162,9 @@ module.exports = {
162
162
algolia : {
163
163
appId : 'YUQHC5OCW0' ,
164
164
apiKey : 'ef8f3e604a1e7ed3afa4dbaeeecfa5f2' ,
165
- indexName : 'redux' ,
166
- algoliaOptions : { }
165
+ indexName : 'redux'
167
166
}
168
- } ,
167
+ } satisfies ThemeConfig ,
169
168
presets : [
170
169
[
171
170
'@docusaurus/preset-classic' ,
@@ -197,7 +196,7 @@ module.exports = {
197
196
compilerSettings : {
198
197
tsconfig : resolve ( __dirname , './tsconfig.json' ) ,
199
198
externalResolutions : { } ,
200
- transformVirtualFilepath : path =>
199
+ transformVirtualFilepath : ( path : string ) =>
201
200
path . replace ( '/docs/' , '/website/' )
202
201
}
203
202
}
@@ -207,21 +206,22 @@ module.exports = {
207
206
theme : {
208
207
customCss : require . resolve ( './src/css/custom.css' )
209
208
}
210
- }
209
+ } satisfies Options
211
210
]
212
211
] ,
213
212
plugins : [
214
213
[
215
214
'@dipakparmar/docusaurus-plugin-umami' ,
216
- /** @type {import('@dipakparmar/docusaurus-plugin-umami').Options } */
217
- ( {
215
+ {
218
216
websiteID : '4bb3bf09-7460-453f-857d-874d8a361cb6' ,
219
217
analyticsDomain : 'redux-docs-umami.up.railway.app' ,
220
218
scriptName : 'script.js' ,
221
219
dataAutoTrack : true ,
222
220
dataDoNotTrack : true ,
223
221
dataCache : true
224
- } )
222
+ } satisfies UmamiOptions
225
223
]
226
224
]
227
225
}
226
+
227
+ export default config
0 commit comments