data-intuitive / quarto-d2

GNU Affero General Public License v3.0
32 stars 3 forks source link

Importing .d2 files inside code block in nested files/folders #8

Closed saddlerto closed 8 months ago

saddlerto commented 8 months ago

Greetings, I wanted to ask you a quick question about the quarto-d2 extension. I am successfully able to import a .d2 file into a codeblock, even if it is in a folder.

# index.qmd
...@diagrams/example.d2

However, when I am working inside a Quarto file that is not in the root folder, I am running into issues and have tried a few different methods to no avail.

# folder/index.qmd
...@diagrams/example.d2
...@../diagrams/example.d2

And I've also tried moving the diagram to be in the same folder:

# folder/index.qmd
...@example.d2

I'm just wondering how the plugin processes these kind of requests and if there is a way to make it work?

saddlerto commented 8 months ago

Nevermind, I'm silly and forgot to add the d2 filter on the individual pages I was working on... Relative links work properly. Please disregard.

rcannood commented 8 months ago

Glad you managed to get it to work :+1: ;)