Skip to content

Instantly share code, notes, and snippets.

@emaldonadot
Last active November 11, 2023 11:56
Show Gist options
  • Save emaldonadot/ff6c422f7963fb3a2144328400bb67ff to your computer and use it in GitHub Desktop.
Save emaldonadot/ff6c422f7963fb3a2144328400bb67ff to your computer and use it in GitHub Desktop.
Include UML Diagrams in Github using PlantUML

Include UML Diagrams in Github using PlantUML

  1. Create a .puml file, for this gist I'm creating a file below named testuml.puml

  2. Open ()[http://plantuml.com/plantuml/form] to edit a new .puml document

  3. Use the !includeurl and provide the URL of your .puml file stored in github (RAW)

@startuml
!includeurl https://gist.githubusercontent.com/emaldonadot/ff6c422f7963fb3a2144328400bb67ff/raw/74a0539224742d3a25f2ca6b9a3898a637a16219/testuml.puml
@enduml
  1. Obtain the generated URL in the plantuml server form and use markdown to include an image from an url
![PlantUML model](http://www.plantuml.com/plantuml/png/3SJj4OCW303GLTe5H9C8qct2HzGx14_2TVts_NZliyOoKXvFUHsgT_yOivzTf_tKOuJHynDRrLnrYkqo-UAIMkNKr8ZOI03Yl4K9oB0G8Mmqpo5O9s8U_Xf7FA_e0SWH96HO1IBRu1atlx55nuk5nHlDNSTLfllV3m00)

PlantUML model

  1. Change the /png/ to /svg/ to obtain the svg format of the UML diagram.
![UML](http://www.plantuml.com/plantuml/svg/3SJj4OCW303GLTe5H9C8qct2HzGx14_2TVts_NZliyOoKXvFUHsgT_yOivzTf_tKOuJHynDRrLnrYkqo-UAIMkNKr8ZOI03Yl4K9oB0G8Mmqpo5O9s8U_Xf7FA_e0SWH96HO1IBRu1atlx55nuk5nHlDNSTLfllV3m00)

UML

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
@jabran
Copy link

jabran commented Oct 30, 2022

This is extremly useful. Thanks a lot for the useful gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment