markdownで書いたドキュメントにPlantUMLの図を挿入する方法
markdownで書いたドキュメントにPlantUMLの図を挿入する方法。
以下、どちらも可能。
- mdファイルに直接記載する。
- PlantUMLのファイルを参照する。
これで、ファイル分割しつつ、図と説明をテキストファイルで記述できるようになった。
結果
ソースコード
■mdファイル
# Section1 直接のPlantUMLの記載を、図として挿入する。 ```plantuml @startuml :Hello world; :this is section1; @enduml ``` # Section2 別ファイルにあるPlantUMLの記載を、図として挿入する。 ```plantuml !include a00_hello_world.pu ``` # Section3 終わり
■PlantUMLの記載ファイル(a00_hello_world.pu)
@startuml :Hello world; :This is on defined on several **lines**; @enduml
環境
- Java Runtime
- PlantUML (https://plantuml.com/ja/download)
- Markdown Preview Enhanced