Render technical diagrams with mermaid

This commit is contained in:
Ruslan Bakiev
2026-05-01 14:41:02 +07:00
parent fc6117c8f5
commit 3a3bd09a8c
20 changed files with 1191 additions and 391 deletions

View 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;