Render technical diagrams with mermaid
This commit is contained in:
16
docs/.vitepress/theme/index.ts
Normal file
16
docs/.vitepress/theme/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
},
|
||||
};
|
||||
|
||||
export default theme;
|
||||
Reference in New Issue
Block a user