Render documentation diagrams as static Mermaid assets
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
import DefaultTheme from 'vitepress/theme';
|
||||
import type { Theme } from 'vitepress';
|
||||
|
||||
import MermaidDiagram from './components/MermaidDiagram.vue';
|
||||
import NamedMermaidDiagram from './components/NamedMermaidDiagram.vue';
|
||||
|
||||
const theme: Theme = {
|
||||
...DefaultTheme,
|
||||
enhanceApp({ app }) {
|
||||
DefaultTheme.enhanceApp?.({ app });
|
||||
app.component('MermaidDiagram', MermaidDiagram);
|
||||
app.component('NamedMermaidDiagram', NamedMermaidDiagram);
|
||||
enhanceApp(ctx) {
|
||||
DefaultTheme.enhanceApp?.(ctx);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user