Skip to content

0x025-vitepress集成markdown-it-textual-uml

安装:markdown-it-textual-uml

js
pnpm install -D markdown-it-textual-uml
pnpm install -D markdown-it-textual-uml

引入插件依赖:

ts
import markdownItTextualUml from 'markdown-it-textual-uml';

export default defineConfig({
  markdown: {
    config(md) {
      md.use(markdownItTextualUml);
    },
  },
});
import markdownItTextualUml from 'markdown-it-textual-uml';

export default defineConfig({
  markdown: {
    config(md) {
      md.use(markdownItTextualUml);
    },
  },
});

使用例如:

\```plantuml
Bob -> Alice : hello
\```
\```plantuml
Bob -> Alice : hello
\```

结果为:

uml diagram