plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Themes not working locally

MaheshvaranP opened this issue · comments

Hi

I might be missing something, please help me figure out what might be wrong about how I am using themes?
Here is a view of the code and output.

Thanks!

image

@MaheshvaranP, yes I know. It is a problem of PlantUML itself (theme does not support "calculated includes" and includes via <C4/theme>; details see in forum) but until I have access to a first published plantuml version with v2.6.0 - that I can test it - I don't want to create a defect).
As workaround you could use a normal include statement (theme is basically only a semantic/nicer format of an include)

following should work (I hope I have no typo but the logic should be clear)

!include %getenv("HOME")/repositories/C4-PlantUML/themes/puml-theme-C4_united.puml

Best regards
Helmut

PS.: I used in my local test themes with a fix relative path, this works too

!if %variable_exists("RELATIVE_INCLUDE")
  ' !theme C4_FirstTest from %get_variable_value("RELATIVE_INCLUDE")/themes
  !theme $UseTheme from ./../themes
!else
  !theme $UseTheme from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes
!endif

!include %getenv("HOME")/repositories/C4-PlantUML/themes/puml-theme-C4_united.puml

Works perfect, thank you for the guidance! :)

opened in plantuml-forum an issue that "!theme via stdlib" !theme C4_united from <C4/theme> and "calculated !theme" !theme C4_united from $baseUrl/themes should be fixed.