mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
192 stars 55 forks source link

I would like to add support for skins. #50

Open STEELBADGE opened 3 years ago

STEELBADGE commented 3 years ago

PlantUML supports importing common themes into your diagrams like so:

@startuml
!include  my_fav_skin.iuml
@enduml

Problem:

When you use this plugin with the server it can't read that file since it's local to the markdown file and not on the server it self.

You could include it by putting it in the "source" tag but that doesn't work if you are already including a file that you want to skin.

Proposal:

Add a "skin" tag which you can import the skin from. The logic would work exactly like "source" does today by reading the file and concatenating the text.

skin="my_fav_skin.iuml" @startuml !include my_fav_skin.iuml @enduml

Having said the above I'm thinking why don't we just read the !includes line and read that file instead of using the tags? That way we can load files + skin params and anything else anyone includes?

bharatrajagopalan commented 2 years ago

Having said the above I'm thinking why don't we just read the !includes line and read that file instead of using the tags? That way we can load files + skin params and anything else anyone includes?

I think I have covered this in my pull request https://github.com/mikitex70/plantuml-markdown/pull/65 @STEELBADGE . Let me know if this works for you?

@mikitex70 FYI