As this option does not come with environment variable equivalent (which makes sense) I have switched the option system in the plugin to a command line option system.
The --target option is always set, default is ''. The idea is that multi-layer diagram included in mkdocs won't work without this option, and generating all files does not make much sense. It could be a future improvement to handle it though.
Here is a code to test this feature.
in test.d2:
A -> B
scenarios: {
alternate: {
B -> A
}
}
in test.md:
# multilayer test
![d2](devcontainer/test.d2)
![d2](devcontainer/test.d2){target="alternate"}
thanks for your PR. I have a few ideas for improvements but I can't push commits to your branch, so I will merge it and push changes directly to my repo.
Hi,
This PR adds support for the
--target
option.As this option does not come with environment variable equivalent (which makes sense) I have switched the option system in the plugin to a command line option system.
The
--target
option is always set, default is''
. The idea is that multi-layer diagram included in mkdocs won't work without this option, and generating all files does not make much sense. It could be a future improvement to handle it though.Here is a code to test this feature.
in
test.d2
:in
test.md
:The result is the following:
Fixes #4