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...
PlantUML’s default font DejaVu Sans only ships Latin glyphs. Chinese / Japanese / Korean / Emoji either render as boxes or vanish entirely. This is the font configuration field guid...
PlantUML 默认字体 DejaVu Sans 只含拉丁字符。中文 / 日文 / 韩文 / Emoji 渲染要么是方块要么是缺失。这篇是字体配置实战 + CI 环境搭建 + 多语言混排。
三个常见症状症状 1:中文渲染成 □□□1234@startumlskinparam defaultFontName "DejaVu Sans"Al...