chore: update

This commit is contained in:
wuxh 2024-05-09 13:11:30 +08:00
parent cc5cb6b33d
commit 487dca0c56
No known key found for this signature in database
GPG Key ID: 4E035332466F0370
2 changed files with 8 additions and 17 deletions

View File

@ -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);
};

View File

@ -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',
},