mkdocs_puml icon indicating copy to clipboard operation
mkdocs_puml copied to clipboard

PlantUML.js support

Open yarons opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. I had to develop a whole GitHub Actions workflow to deal with puml conversion to SVG in order to display diagrams as part of my documentation.

Describe the solution you'd like Adding a PlantUML.js support, thus eliminating the need for pre-processing and Java.

Describe alternatives you've considered I developed a GitHub Actions workflow to start a Java application to convert all the puml parts to SVG and then add them to the MkDocs generated HTML as an <img>.

Additional context This is an example of this native JS implementation: https://plantuml.github.io/plantuml.js

yarons avatar Oct 31 '23 19:10 yarons

Thank you for this suggestion @yarons! I didn't know that PlantUML is available through WASM. If we have this integrated to the package it can potentially solve #33.

MikhailKravets avatar Nov 02 '23 11:11 MikhailKravets

Oh no, thank you for all your awesome work! Hoping to use this Dark/Light theme implementation soon, I also need it :)

yarons avatar Nov 02 '23 11:11 yarons

Hi @yarons, since version 2.0.0 mkdocs_puml has caching functionality that also allows you to build diagrams and commit them to git. As for myself I'm not sure yet if it's 100% true approach to do so but it will allow you to use pre-built diagrams in github actions. Read more at Setup Caching section of the documentation.

Please @yarons, confirm if this approach works for you?

MikhailKravets avatar Oct 25 '24 15:10 MikhailKravets

I'm not sure it's the right approach for me, the aforementioned project was neglected so I'll need to find another way to test this functionality, thank you :)

yarons avatar Oct 27 '24 11:10 yarons

Thanks for your response @yarons! I'm not sure that it's a good idea to implement support for plantuml.js right now; it will take a lot of time and I'm not sure if I'm even able to do it 😅. I suppose having current approach with web-server is versatile enough. So, I'm going to close this issue. Let me know if you have issues or suggestions. Thanks!

MikhailKravets avatar Oct 27 '24 18:10 MikhailKravets

@MikhailKravets it's becoming a little more complicated when considering CI pipelines, running PlanUML as a CLI binary is also a good solution.

yarons avatar Oct 28 '24 04:10 yarons