admin-vben/docs/.vitepress/theme/index.ts

26 lines
742 B
TypeScript
Raw Normal View History

2024-05-29 14:13:31 +00:00
// https://vitepress.dev/guide/custom-theme
import type { Theme } from 'vitepress';
import { NolebaseGitChangelogPlugin } from '@nolebase/vitepress-plugin-git-changelog/client';
2024-06-08 11:49:06 +00:00
import DefaultTheme from 'vitepress/theme';
import SiteLayout from './components/site-layout.vue';
import VbenContributors from './components/vben-contributors.vue';
import { initHmPlugin } from './plugins/hm';
import './styles';
2024-06-08 11:49:06 +00:00
import '@nolebase/vitepress-plugin-git-changelog/client/style.css';
2024-05-29 14:13:31 +00:00
export default {
enhanceApp({ app }) {
2024-05-29 14:13:31 +00:00
// ...
app.component('VbenContributors', VbenContributors);
app.use(NolebaseGitChangelogPlugin);
// 百度统计
initHmPlugin();
2024-05-29 14:13:31 +00:00
},
extends: DefaultTheme,
Layout: SiteLayout,
2024-05-29 14:13:31 +00:00
} satisfies Theme;