我正在为我的个人项目使用 doxygen,并希望在我自己创建的页面(降价页面)上使用任何类型的 UML 语言。我并不是要在代码中使用它(它确实有效),而是在我自己创建的文档上使用它,请参阅下面的示例:
# Example
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```plantuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
```
```mermaid
sequenceDiagram
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob:Another authentication Response
Bob --> Alice: Another authentication Response
```
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
\startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
\enduml
这是输出:
虽然本文适用于 Typora (美人鱼),但 Plantuml 与 gitlab 上的美人鱼一起生成。
doxygen -x Doxyfile
输出:
# Difference with default Doxyfile 1.8.17 (9b14bf58c30a02ef19abebec280568532dc58ed4)
PROJECT_NAME = Name
PROJECT_NUMBER = 0.0.1
PROJECT_BRIEF = "Brief"
OUTPUT_DIRECTORY = out
INLINE_INHERITED_MEMB = YES
INPUT = ./files \
../src/
RECURSIVE = YES
PLANTUML_JAR_PATH = /home/<SURNAME>/Installations/plantuml.jar
问题是:
如何在 doxygen 的自定义 markdown 文件中使用 uml 图。