Support for custom configurations / themes
Jonas-Heinrich opened this issue · comments
Hey sytsereitsma,
I love your plugin!
plantuml itself has more configuration options I would like to use, like setting a global config file (-config "filename.conf"
). As far as I can see, this is not supported for plantuml picoweb servers, which means that I would have to include custom styling options (like themes etc.) into every markdown code block to enforce it with this plugin when using a picoweb url as plantuml-cmd
.
Would it be possible to add a custom configuration option (e.g. in the book.toml
), that just contains a path to a configuration file? The content of this file could then simply be prepended on each plantuml webserver invocation, e.g. in render_string.
A more dynamic approach for keeping in sync with the mdbook theme would be even better, but I think this could add a lot of complexity. One approach building on the previous idea could be to add a configuration option which maps mdbook theme names to their plantuml config file paths (with fallback). I'm not even sure if mdbook passes the theme name to plugins however..
Ah, the joy of wanting to support different people with/without darkmode 😄
Anyways, Thank you,
Jonas
Hi Jonas. Nice idea. Can you provide an example?
I see plantuml now provides support for this, see https://plantuml.com/theme
Example:
@startuml
!theme spacelab
class Example {
Theme spacelab
}
@enduml