Skip to content

feat: resolve Excalidraw embeds to exports#4

Open
Restuta wants to merge 1 commit intofeat/inline-image-publishingfrom
feat/excalidraw-embed-publishing
Open

feat: resolve Excalidraw embeds to exports#4
Restuta wants to merge 1 commit intofeat/inline-image-publishingfrom
feat/excalidraw-embed-publishing

Conversation

@Restuta
Copy link
Owner

@Restuta Restuta commented Mar 24, 2026

Summary

  • extend the local asset resolver to recognize Obsidian .excalidraw.md embeds
  • resolve those embeds to sibling exported images, preferring .svg and then raster fallbacks
  • inline the resolved export through the existing render-only markdown path so publishing still preserves the original raw note
  • add unit and CLI integration coverage for the Excalidraw case

Why

After PR 2, local image assets work, but Excalidraw embeds still publish as dead text because the actual renderable artifact is usually a sibling export, not the .excalidraw.md note itself. This PR teaches pubmd how to bridge that gap without adding a full Excalidraw renderer.

Verification

  • npm run verify
  • browser-tested on a local pubmd server by publishing a note with ![[chart.excalidraw.md]] plus a sibling chart.svg, then verifying the rendered page contained an actual <img> with an embedded data URL source while ?raw=1 still returned the original Excalidraw embed

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
publish-it Ready Ready Preview, Comment Mar 24, 2026 6:43am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant