11import { defineConfig } from 'dumi' ;
2+ import { SiteThemeConfig } from 'dumi-theme-lobehub' ;
23import path from 'node:path' ;
34
45import { description , homepage , name } from './package.json' ;
56
67const isProduction = process . env . NODE_ENV === 'production' ;
8+ const isWin = process . platform === 'win32' ;
79
8- const themeConfig = {
10+ const themeConfig : SiteThemeConfig = {
911 actions : [
1012 {
1113 link : homepage ,
@@ -18,21 +20,36 @@ const themeConfig = {
1820 type : 'primary' ,
1921 } ,
2022 ] ,
23+ analytics : {
24+ plausible : {
25+ domain : 'tts.lobehub.com' ,
26+ scriptBaseUrl : 'https://plausible.lobehub-inc.cn' ,
27+ } ,
28+ } ,
2129 apiHeader : {
2230 docUrl : `{github}/tree/master/src/{atomId}/index.md` ,
2331 match : [ '/components' ] ,
2432 pkg : name ,
2533 sourceUrl : `{github}/tree/master/src/{atomId}/index.tsx` ,
2634 } ,
27- description : description ,
28- footer : 'Made with π€― by LobeHub' ,
35+ description,
2936 giscus : {
3037 category : 'Q&A' ,
3138 categoryId : 'DIC_kwDOKoaTlM4Cin-0' ,
3239 repo : 'lobehub/lobe-tts' ,
3340 repoId : 'R_kgDOKoaTlA' ,
3441 } ,
42+ metadata : {
43+ openGraph : {
44+ image :
45+ 'https://repository-images.githubusercontent.com/713462676/32967e56-249e-4593-bb18-b3ed34e69669' ,
46+ } ,
47+ } ,
3548 name : 'TTS' ,
49+ prefersColor : {
50+ default : 'dark' ,
51+ switch : false ,
52+ } ,
3653 socialLinks : {
3754 discord : 'https://discord.gg/AYFPHvv2jT' ,
3855 github : homepage ,
@@ -41,20 +58,17 @@ const themeConfig = {
4158} ;
4259
4360export default defineConfig ( {
44- /* eslint-disable sort-keys-fix/sort-keys-fix */
4561 alias : {
4662 '@lobehub/tts/react' : path . join ( __dirname , './src/react' ) ,
4763 } ,
48- /* eslint-enable */
4964 apiParser : isProduction ? { } : false ,
5065 base : '/' ,
5166 define : {
5267 'process.env' : process . env ,
5368 } ,
5469 favicons : [ 'https://lobehub.com/favicon.ico' ] ,
5570 locales : [ { id : 'en-US' , name : 'English' } ] ,
56- // mfsu: isWin ? undefined : {},
57- mfsu : false ,
71+ mfsu : isWin ? undefined : { } ,
5872 npmClient : 'pnpm' ,
5973 publicPath : '/' ,
6074 resolve : {
0 commit comments