terrastruct / d2-obsidian

The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
204 stars 12 forks source link

[feature request] Allow theme selection per diagram #37

Open jasal82 opened 11 months ago

jasal82 commented 11 months ago

The theme should be selectable on a per-diagram basis, e.g. by adding a preamble to the d2 code block which contains the settings and is then removed by the plugin before forwarding it to d2.

alixander commented 11 months ago

Right. This is built into D2, but I think the Obsidian plugin hasn't been updated to pick those up. Will do, thanks!

https://d2lang.com/tour/vars/#configuration-variables

eriktalvi commented 10 months ago

If all the config-variables could be used . I'm looking at the layout-engine variable specifically.