From 487dca0c560db20b0306dcabd3d49b4c1978ca97 Mon Sep 17 00:00:00 2001 From: wuxh Date: Thu, 9 May 2024 13:11:30 +0800 Subject: [PATCH] chore: update --- .dumi/plugin.ts | 15 --------------- .dumirc.ts | 10 ++++++++-- 2 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 .dumi/plugin.ts diff --git a/.dumi/plugin.ts b/.dumi/plugin.ts deleted file mode 100644 index 024eb302a0..0000000000 --- a/.dumi/plugin.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { IApi } from 'dumi'; -import { getBuildInfo } from './_utils'; - -let buildInfo: any; -(async () => { - buildInfo = await getBuildInfo(); -})(); - -export default (api: IApi) => { - api.describe({ - key: 'antd-website', - }); - - api.addHTMLMetas(() => buildInfo); -}; diff --git a/.dumirc.ts b/.dumirc.ts index 24545bcfde..a382d11bed 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -4,10 +4,16 @@ import * as fs from 'fs-extra'; import rehypeAntd from './.dumi/rehypeAntd'; import remarkAntd from './.dumi/remarkAntd'; +import { getBuildInfo } from './.dumi/_utils'; import { version } from './package.json'; +let buildInfo: any; +(async () => { + buildInfo = await getBuildInfo(); +})(); + export default defineConfig({ - plugins: ['dumi-plugin-color-chunk', './.dumi/plugin'], + plugins: ['dumi-plugin-color-chunk'], conventionRoutes: { // to avoid generate routes for .dumi/pages/index/components/xx exclude: [new RegExp('index/components/')], @@ -40,7 +46,7 @@ export default defineConfig({ }, extraRehypePlugins: [rehypeAntd], extraRemarkPlugins: [remarkAntd], - metas: [{ name: 'theme-color', content: '#1677ff' }], + metas: [{ name: 'theme-color', content: '#1677ff' }, ...buildInfo], analytics: { ga_v2: 'UA-72788897-1', },