Initial commit: vitepress-exporter plugin
This commit is contained in:
19
docs/.vuepress/config.ts
Normal file
19
docs/.vuepress/config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defaultTheme } from '@vuepress/theme-default';
|
||||
import type { DefaultThemeOptions } from '@vuepress/theme-default';
|
||||
import type { PluginOptions } from 'vuepress';
|
||||
|
||||
export default {
|
||||
title: 'VitePress Demo',
|
||||
description: 'Demo for VitePress with Canvas Viewer',
|
||||
|
||||
theme: defaultTheme<DefaultThemeOptions>({
|
||||
navbar: [
|
||||
{
|
||||
text: 'Home',
|
||||
link: '/',
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
clientConfigFile: 'index.ts',
|
||||
} satisfies PluginOptions;
|
||||
8
docs/index.ts
Normal file
8
docs/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineClientConfig } from '@vuepress/client';
|
||||
import { CanvasViewerPlugin } from './plugins/canvas-viewer';
|
||||
|
||||
export default defineClientConfig({
|
||||
enhance({ app, router }) {
|
||||
app.use(CanvasViewerPlugin);
|
||||
}
|
||||
});
|
||||
7
docs/plugins/canvas-viewer.ts
Normal file
7
docs/plugins/canvas-viewer.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { Plugin } from 'vue';
|
||||
|
||||
export const CanvasViewerPlugin: Plugin = {
|
||||
install(app) {
|
||||
app.component('CanvasViewer', () => import('./components/CanvasViewer.vue'));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user