structurizr / lite

Structurizr Lite
https://docs.structurizr.com/lite
MIT License
232 stars 28 forks source link

Mermaid support for documenation #18

Closed SaschaWeisenberger closed 1 year ago

SaschaWeisenberger commented 1 year ago

Hi,

Is there a way to add support for mermaid diagrams in the markdown files for documentation? I would like to add some process documentation and explanations about the data flows etc.

Thanks!

sequenceDiagram
User->>System A: call
System A ->> System B: get data
simonbrowndotje commented 1 year ago

Yes, you can use a plugin to pre-process Mermaid definitions. See https://github.com/structurizr/dsl-plugins/tree/main/src/main/java/com/structurizr/dsl/plugins/mermaid for an example.

SaschaWeisenberger commented 1 year ago

I know this appears to be some kind of java support, but I can't get it running... I use structurizr lite in a docker container. I put the jar file into the root folder of my repo (which is mapped into the container) and in my docker-compose.yml I set the command to java -cp "/usr/local/structurizr/structurizr-dsl-plugins-1.0.0.jar" -jar /usr/local/structurizr-lite.war But I always see the ClassNotFoundException when loading the workspace.

simonbrowndotje commented 1 year ago

The DSL documentation - plugins explains how to use plugins. tl;dr ... place the JAR file into a plugins directory next to your workspace. No need to change how you're starting Structurizr Lite.

SaschaWeisenberger commented 1 year ago

Fancy, thank you so much! Works like a charme.

mctDeveloperCode commented 1 year ago

Yes, you can use a plugin to pre-process Mermaid definitions. See https://github.com/structurizr/dsl-plugins/tree/main/src/main/java/com/structurizr/dsl/plugins/mermaid for an example.

The link in this previous comment appears dead. Where does the mermaid plugin live now?