Open damithc opened 4 years ago
I don't think it's a good idea; It's not very nunjucks like (in that content belonging to other files is only rendered via {% include %}
) and can cause issues with users of nunjucks not expecting the .puml to be rendered.
Have you tried
<puml name="...">
{% include "....puml" %}
</puml>
?
Have you tried
<puml name="..."> {% include "....puml" %} </puml>
?
Yes, that works (sans live preview, but that's not a major issue).
I don't think it's a good idea; It's not very nunjucks like (in that content belonging to other files is only rendered via
{% include %}
) and can cause issues with users of nunjucks not expecting the .puml to be rendered.
I was trying to use variables that are defined in the variables.md, not <include>
.
e.g.,
@startwbs
+ <b><color:red>100</color></b> marks
+ Individual Project (iP): <b><color:red>{{ marks_ip }}</color></b> marks
+ Team Project (tP): <b><color:red>{{ marks_tp }}</color></b> marks
@endwbs
I was trying to use variables that are defined in the variables.md, not
.
ahh missed that out, hmm, I still think there's quite a bit of feature overlap with <include>
s though, and I feel like we shouldn't be rendering files other than .md/mbdf/mbd
You could still achieve it with a normal .md/mbdf
file with an inline puml inside; this would also allow you to use the <variable>
s in <include>
s feature
<include src="xx.md">
<variable name="marks_ip">...</variable>
...
</include>
xx.md
<puml name="...">
@startwbs
+ <b><color:red>100</color></b> marks
+ Individual Project (iP): <b><color:red>{{ marks_ip }}</color></b> marks
+ Team Project (tP): <b><color:red>{{ marks_tp }}</color></b> marks
@endwbs
</puml>
that said, it shouldn't be too difficult to render just site variables for .puml
files as well, what do you think?
You could still achieve it with a normal
.md/mbdf
file with an inline puml inside; this would also allow you to use the<variable>
s in<include>
s feature
I think this is good enough. Just need to add this bit of info into the documentation.
Current: nunjucks code works inside inline PlantUML diagrams but doesn't work in
.puml
fileSuggestion: Allow nunjucks code in
.puml
files as well.