oleeskild / obsidian-digital-garden

MIT License
1.23k stars 116 forks source link

excalidraw not exporting properly (markdown links are unsupported?) #215

Open ksdavidc opened 1 year ago

ksdavidc commented 1 year ago

In the output using the inspect/developer tool window I can see the file is in the html <p><img src="Test%20of%20scratchblocks%202023-03-02%2021.21.25.excalidraw" alt=""></p> but nothing appears on the page. For example, see this page: https://digitalgarden-jrc-2.vercel.app/digital-garden/excalidraw-test/

I can see several 404 errors as well

Screen Shot 2023-03-02 at 9 52 23 PM

I am not sure which are the relevant settings, but it used to be working (see https://digitalgarden-jrc-2.vercel.app/digital-garden/crosswinds-tutorial-with-overview/) , so it may be related to the latest update. Did I mess it up?

ksdavidc commented 1 year ago

tl;dnr: Problem is likely connected to not using wikilinks. Are md links not ok? BUT new problem, error msg for nonexistent files (create new issue for this).


I think I have figured out what might have been the problem.

After a lot of experimentation, I realized that somehow I was using Markdown links and not Wiki links. Using wiki links works.

Before that I thought it had to do with using an attachments folder per my Obsidian "default location for new attachments" settings so I changed this to "in the same folder" and moved all the images to the same folder. (see below for why I mention this.)

I also tried just linking to the png/svg file directly. This created text like "![](/img/user/Digital Garden/Crosswinds Part 3 - Lines 2023-03-02 11.21.28.excalidraw.light.png)" on the site instead of the actual image. YOu can see this in the file I linked digitalgarden-jrc-2.vercel.app/digital-garden/excalidraw-test

This is when I found that using a wiki style link, however, did work.

This made me find the excalidraw setting for using wiki links for png/svg was set to off. This might have gotten changed when I tried to use .png instead of .excalidraw embeds.

So that is working, EXCEPT, in the course of that a new problem arose, posted here