terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.

Home Page:https://d2lang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D2-Import Enhancement Suggestions

zachcp opened this issue · comments

Hi Team D2-lang,

D2 is really coming along, congrats on your progress/success. I have two suggestions related to importing D2 files that came up in the context of packaging some internal corporate icons/images and making them available for reuse. For the moment I will follow the pattern that you have adopted - e.g. make a stable accessible URL for the ICONS.

  1. Import a D2 file from a URL If that is possible I could make both the ICONS and the associated D2 file with a map to all the icons accessible universally. This would also unlock use of custom icons in quarto-d2 which renders D2 text in an isolated environment.

  2. Follow local file paths of imports If you import a D2 file that contains a local filepath to an icon then the icon will not be found if the D2 file is in a different directory. Following local imports would let you modularize D2 icon use.

Thanks again,
zach cp