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
226 stars 12 forks source link

[feature request] Allow theme selection per diagram #37

Open jasal82 opened 1 year ago

jasal82 commented 1 year 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 1 year 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 1 year ago

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