orchidhq / Orchid

Build and deploy beautiful documentation sites that grow with you
https://orchid.run
GNU General Public License v3.0
513 stars 53 forks source link

OrchidDiagrams not supporting plantuml !include directive to include files #351

Open sirinsevinc opened 4 years ago

sirinsevinc commented 4 years ago

Hi, I have been trying to figure out how to include a .puml or.uml file from another file plantuml file.

I'm using the editorial theme and I have the following directory structure:

include-test.md loads the sample.uml as follows: {{ load('pages/sample.uml') | raw }}

Here is the sample.uml file under pages : @startuml !include another.uml @enduml

IncludeUrl works fine when pointed to URL but include with another uml file keeps giving a plantuml error of not able to include the file.

I wondered if that is something not supported yet or am I doing something wrong?

Thanks Screenshot from 2020-01-17 12-55-28

cjbrooks12 commented 4 years ago

I don't think the !include directive is currently supported. I'll look into the integration to see if I can get it to work, but until then, you should be able to use the same kind of {{ load('pages/another.uml') | raw }} line when Orchid preprocesses the UML markup.

sirinsevinc commented 4 years ago

Thank you for your response. If I use {{ load('pages/another.uml') | raw }} in the .uml file as it's not a valid PlantUml directive it gives an error. When I try to load it from an .md file say load the header.uml first and then load the actually .uml, then it tries to load them as two separate SVGs.

no worries, looking forward to the actual fix for this, until then will use include pointing to a url for now..