PlantUML’s default SVG is hostile to visually impaired users — no alt text, screen readers can’t read it, contrast fails color-blind users. Compliance scenarios (government, education, finance) re...
PlantUML 默认 SVG 对视障用户不友好——没有 alt 文本、屏幕阅读器读不出来、配色对色盲对比度不够。合规场景(政府、教育、金融)要求 WCAG 2.1 AA。这篇是怎么让 PlantUML 图可访问。
为什么 SVG 要无障碍3 个用户群体:
视障——用屏幕阅读器(NVDA / JAWS / VoiceOver)
运动障碍——用键盘或开关设备导航
色盲...
Writing the .puml isn’t the end. Three months later: services get renamed, architectures refactored, components deprecated — the diagram has to evolve alongside git to avoid the awkward “docs say ...
写完 .puml 不是结束。3 个月后 service 重命名、架构拆分、组件废弃——图跟代码同源演化才能避免「文档说 A,代码里早就叫 B」的尴尬。这篇是 rename migration 工具、archive 策略、git log 跟图同步。
重命名的两个层级层级 1:文件名重命名——user-service.puml → identity-service.puml(service ...
PlantUML’s output SVG is “dead” by default — view-only. But with map directives or post-process JS injection, the diagram becomes a navigation map: click a node to open docs, hover for a tooltip, ...
PlantUML 输出的 SVG 默认是「死的」——只能看。但用 map 指令或 post-process 注入 JS,可以让图成为导航地图:点击节点跳转到文档、悬浮显示 tooltip、调用 API 拉数据。
三种交互层次
层次
实现
适用
静态图
默认 SVG
文档、PPT
点击跳转
[[url]] 或 post-process 注入 <a>
wiki 导航...
Most PlantUML diagrams (component, state, object, class) are laid out by Graphviz’s dot algorithm underneath. Understanding how dot works explains many “why does the diagram auto-arrange like that...
PlantUML 大多数图(组件、状态、对象、类)底层都走 Graphviz dot 布局算法。理解 dot 的工作机制能解释很多「图为什么自动排成这样」的疑问,以及怎么改才更好看。
dot 算法是什么PlantUUM 渲染 component class state 时,先用内置解析器把 .puml 转成 Graphviz 的 dot 语言,再用 dot 引擎算布局。最终输出的 SVG...
!include is basic preprocessing. But enterprise architecture diagrams often need to pull service lists, port numbers, AWS resource IDs from external data sources. This is the field guide for Jinja...
PlantUML 的 !include 是基础预处理。但企业级架构图常常需要从外部数据源读 service 列表、读端口号、读 AWS 资源 ID 生成图。这篇是 Jinja/JSON/YAML 动态生成实战。
为什么需要动态生成硬编码 .puml 的痛:
123456789101112@startumlcomponent "user-service&quo...