From 40f1e03e0c72a28645f1947e453c575f77e8a704 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sun, 24 Nov 2024 18:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20Update=20og?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dumirc.ts | 28 +++++++++++++++++++++------- package.json | 10 +++++----- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.dumirc.ts b/.dumirc.ts index 61b4025..e8b0d3b 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -1,11 +1,13 @@ import { defineConfig } from 'dumi'; +import { SiteThemeConfig } from 'dumi-theme-lobehub'; import path from 'node:path'; import { description, homepage, name } from './package.json'; const isProduction = process.env.NODE_ENV === 'production'; +const isWin = process.platform === 'win32'; -const themeConfig = { +const themeConfig: SiteThemeConfig = { actions: [ { link: homepage, @@ -18,21 +20,36 @@ const themeConfig = { type: 'primary', }, ], + analytics: { + plausible: { + domain: 'tts.lobehub.com', + scriptBaseUrl: 'https://plausible.lobehub-inc.cn', + }, + }, apiHeader: { docUrl: `{github}/tree/master/src/{atomId}/index.md`, match: ['/components'], pkg: name, sourceUrl: `{github}/tree/master/src/{atomId}/index.tsx`, }, - description: description, - footer: 'Made with 🤯 by LobeHub', + description, giscus: { category: 'Q&A', categoryId: 'DIC_kwDOKoaTlM4Cin-0', repo: 'lobehub/lobe-tts', repoId: 'R_kgDOKoaTlA', }, + metadata: { + openGraph: { + image: + 'https://repository-images.githubusercontent.com/713462676/32967e56-249e-4593-bb18-b3ed34e69669', + }, + }, name: 'TTS', + prefersColor: { + default: 'dark', + switch: false, + }, socialLinks: { discord: 'https://discord.gg/AYFPHvv2jT', github: homepage, @@ -41,11 +58,9 @@ const themeConfig = { }; export default defineConfig({ - /* eslint-disable sort-keys-fix/sort-keys-fix */ alias: { '@lobehub/tts/react': path.join(__dirname, './src/react'), }, - /* eslint-enable */ apiParser: isProduction ? {} : false, base: '/', define: { @@ -53,8 +68,7 @@ export default defineConfig({ }, favicons: ['https://lobehub.com/favicon.ico'], locales: [{ id: 'en-US', name: 'English' }], - // mfsu: isWin ? undefined : {}, - mfsu: false, + mfsu: isWin ? undefined : {}, npmClient: 'pnpm', publicPath: '/', resolve: { diff --git a/package.json b/package.json index c836b0a..f5097da 100644 --- a/package.json +++ b/package.json @@ -105,17 +105,17 @@ "@commitlint/cli": "^19.6.0", "@lobehub/i18n-cli": "^1.20.0", "@lobehub/lint": "^1.24.4", - "@lobehub/ui": "^1.153.0", + "@lobehub/ui": "^1.153.1", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.17.6", + "@types/node": "^20.17.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@types/uuid": "^9.0.8", "@vercel/node": "^3.2.26", "commitlint": "^19.6.0", - "concurrently": "^9.0.1", + "concurrently": "^9.1.0", "dumi": "^2.4.14", - "dumi-theme-lobehub": "^1.8.3", + "dumi-theme-lobehub": "^1.9.2", "eslint": "^8.57.1", "father": "^4.5.1", "husky": "^9.1.7", @@ -126,7 +126,7 @@ "semantic-release": "^21.1.2", "stylelint": "^15.11.0", "tsx": "^4.19.2", - "typescript": "^5.6.3", + "typescript": "^5.7.2", "vercel": "^28.20.0" }, "peerDependencies": {