3

I have a single markdown file that looks something like this:

@startuml Participants
actor Alice
participant Bob
participant Charlie
hide unlinked
@enduml

@startuml Diagram
'!include Participants

Bob->Alice: Do a thing
Alice->Bob: Do a different thing

@enduml

In short the problem I'm trying to solve is to render plantuml in a markdown (so it can be rendered by gitlab) in a way that involves "!includes". Locally I can achieve what I want using simple puml files and !include statements, but because of how markdown is rendered in gitlab, it appears it can't see the filesystem/structure and the !includes give an error. So I am ok with putting everything in a single file, but I still want to separate diagrams logically and put them together. The problem with what I have above is Alice and Bob in "Diagram" both render as participants (Alice is not an Actor) and if I uncomment the include, it gives an error.

How can I achieve something equivalent to !includes with plantuml in a markdown file?

makozaki
  • 3,772
  • 4
  • 23
  • 47
Rich
  • 1,165
  • 1
  • 15
  • 29

1 Answers1

0

we solved this today by creating a user in gitlab with reporter rights for the projects we want to use plantUml in Markdown files.

In the markdown files we now import another file by doing something like this:

!includeurl https://plantuml:SecretPassword@git.example.com/gitlab/project/-/raw/master/File_to_import.puml
Dharman
  • 30,962
  • 25
  • 85
  • 135
tihaa
  • 1