obsidian-digital-garden
obsidian-digital-garden copied to clipboard
[Feature request] Directly support publish of .excalidraw.md files
Hi there, I have a use case in which it would be great, if Excalidraw-Files (in .md files, that means with front matter) could be directly rendered and published. Unfortunatly I don't have a good idea about how to do this, becausr I'm not too deep into the inner workings of the excalidraw plugin. It would be great if this would work:
- Add dg-publish: true to front matter of an .excalidraw.md file
- File is rendered (to png or svg) and ...
- ... published (as image version) automatically.
Right now I auto-export .png from Excalidraw, generate a new note, embed the .png and add dg-publish: true to that file. Thanks for your great plugin, BTW!
Hi! Currently the plugin supports embedding excalidrawings like so:
![[drawing.excalidraw]]
So you don't need to export it to a png. Simply add it to a note an publish it. Will that meet your needs?
Hi, thanks for your fast reply! I guess this makes things easier for me, yes! In the long run I might need to find a way to automate the whole process - I use Excalidraw for teaching and upload the content to my digital garden for my students.
Awesome to hear it is being used for that.
I don't see why publising an exalidraw file as its own page should be a problem. It is just a markdown file after all. I'll look into adding it when I find the time. Thanks for the input!
Thanks a lot, mate, I really appreciate it!
Hi! Support for publish excalidraw files directly has been added in the latest release, 2.9.1. Simply add dg-publish: true to the frontmatter of the file and it should work as if publishing a "normal" markdown file. Let me know if it's working for you.
Hi Ole! I tested the new version right away - but I could not publish an excalidraw note - when I try single note publishing (via command), there is no response from the plugin and on "publish multiple notes" I get: "Unable to publish multiple notes. Something went wrong". When I use the ribbon icon it seems there is no function, too. I can't publish changed notes. Can I help to pinpoint the error?
Thats weird, perhaps there are some edgecase that I haven't thought of. Could you copy the entirety of the content of the excalidraw.md file that is not working and paste it here?
Or maybe, as nothing is working, could it be that the github token has expired? 🤔
Could you open up the developer tools in obsidian by pressing CTRL+SHIFT+I (CMD+SHIFT+I on mac), then use the publish command and screenshot whatever appears in the developer console?
Ahhh, my bad! I had LZ-compression on for Excalidraw. That was the problem. Now everything works! I now have kind of a "viewport" in which I can scroll over my drawings:
Thanks so much!
I found one (really big) Excalidraw file which is not published correctly. I attached the file here (too big for pastebin...)
Obsidian-Setup für Unterricht.zip
EDIT: But this one is not something I would use in my daily work. All of my "normal" Excalidraw files work great!