Skip to content

Rendering Practice (Mermaid)

This handbook uses a component-based Mermaid rendering approach:

  • Component: docs/.vitepress/theme/components/MermaidBlock.vue
  • Registration: docs/.vitepress/theme/index.ts
  • Dependency: mermaid

Usage

md
<MermaidBlock
  title="Deploy flow"
  chart="flowchart LR; A[Push] --> B[Build]; B --> C[Deploy];"
/>

Why this approach

  • More controllable than adding too many markdown plugins.
  • Easier rollback and debugging.
  • Works well with existing VitePress theme extension.

基于官方文档与 Schema 编写;示例不包含任何密钥