2024-05-29 14:13:31 +00:00
|
|
|
// https://vitepress.dev/guide/custom-theme
|
2024-08-27 15:22:34 +00:00
|
|
|
import type { EnhanceAppContext, Theme } from 'vitepress';
|
2024-05-29 14:13:31 +00:00
|
|
|
|
2024-08-15 13:48:52 +00:00
|
|
|
import { NolebaseGitChangelogPlugin } from '@nolebase/vitepress-plugin-git-changelog/client';
|
2024-06-08 11:49:06 +00:00
|
|
|
import DefaultTheme from 'vitepress/theme';
|
|
|
|
|
2024-08-27 15:22:34 +00:00
|
|
|
import { DemoPreview } from '../components';
|
2024-07-28 06:29:05 +00:00
|
|
|
import SiteLayout from './components/site-layout.vue';
|
|
|
|
import VbenContributors from './components/vben-contributors.vue';
|
2024-07-29 14:11:22 +00:00
|
|
|
import { initHmPlugin } from './plugins/hm';
|
2024-07-28 06:29:05 +00:00
|
|
|
|
|
|
|
import './styles';
|
2024-06-08 11:49:06 +00:00
|
|
|
|
2024-09-18 14:21:23 +00:00
|
|
|
import 'virtual:group-icons.css';
|
2024-08-15 13:48:52 +00:00
|
|
|
import '@nolebase/vitepress-plugin-git-changelog/client/style.css';
|
|
|
|
|
2024-05-29 14:13:31 +00:00
|
|
|
export default {
|
2024-11-06 13:44:02 +00:00
|
|
|
async enhanceApp(ctx: EnhanceAppContext) {
|
2024-08-27 15:22:34 +00:00
|
|
|
const { app } = ctx;
|
2024-07-28 06:29:05 +00:00
|
|
|
app.component('VbenContributors', VbenContributors);
|
2024-08-27 15:22:34 +00:00
|
|
|
app.component('DemoPreview', DemoPreview);
|
2024-08-15 13:48:52 +00:00
|
|
|
app.use(NolebaseGitChangelogPlugin);
|
2024-11-06 13:44:02 +00:00
|
|
|
|
2024-07-29 14:11:22 +00:00
|
|
|
// 百度统计
|
|
|
|
initHmPlugin();
|
2024-05-29 14:13:31 +00:00
|
|
|
},
|
|
|
|
extends: DefaultTheme,
|
2024-07-28 06:29:05 +00:00
|
|
|
Layout: SiteLayout,
|
2024-05-29 14:13:31 +00:00
|
|
|
} satisfies Theme;
|