Excalidraw-Publish: Make interactive visual websites with Obsidian-Publish and the Excalidraw Plugin
Based on Zsolt's Visual Personal Knowledge Management's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Export Excalidraw drawings as SVG for Obsidian Publish interactivity; PNG won’t support embedded interactive components like videos or embedded pages.
Briefing
Obsidian Publish can’t run plugins, but Excalidraw’s SVG export can still deliver interactive, clickable visual pages on the web—if the publishing pipeline is wired correctly. The core fix is to embed Excalidraw as SVG (not as plain Excalidraw embeds or PNG) and then load Excalidraw’s required publish-side JavaScript and CSS through Obsidian Publish’s static assets. Once that’s in place, edits to Excalidraw files can be pushed to the site with a straightforward “publish changes” flow, turning a Markdown vault into a visual, navigable website.
The workflow starts with setting up Obsidian Publish and then adding a custom domain, because Obsidian Publish won’t allow the publish JS file to be served from its default domain—yet Excalidraw’s web interactivity depends on that JS. The domain step can be inexpensive (the creator cites namecheap options around $1/year) and then requires configuring Cloudflare as described in Obsidian’s instructions. After that, the publish CSS and publish JS files are downloaded and placed into the vault’s publish asset route.
On the Excalidraw side, the key requirement is exporting to SVG. In Excalidraw/Obsidian, the embedded drawing can be set to auto-export SVG either per-note via front matter (e.g., an “excalidraw auto export SVG” property) or globally in plugin settings. Without SVG export, Obsidian Publish will treat the embed as text, not as an interactive graphic. With SVG export enabled, the SVG becomes the stable artifact that Obsidian Publish can serve, and the page can remain interactive.
A practical enhancement ties the SVG back to its source: a command palette action can locate the corresponding Excalidraw file for a selected SVG filename and open it in Excalidraw for editing. That matters because the published artifact is the SVG, but the editable source is the Excalidraw note. The process also supports front matter configuration for rendering options like transparent versus non-transparent backgrounds.
For layout control, the setup adds support for CSS classes in the publish CSS. One highlighted class (“ex page height”) adjusts the rendered drawing height so the exported visuals fill the page area consistently—useful for building a “scroll-less” image-to-image visual website where navigation feels like paging through visuals.
Finally, the pipeline includes a maintenance command to prevent stale embeds. A command palette action (“Excalidraw Obsidian Publish find SVG and SVG exports that are out of date”) scans for Excalidraw-related SVG exports that no longer match the current state of the Excalidraw notes, then republish only what’s needed. A recursive option helps when Excalidraw files reference other Excalidraw files.
The result is a publishable, interactive visual website built on SVG exports—while acknowledging a limitation: embedded interactivity such as videos or embedded pages won’t work if the drawings are exported as PNG. SVG is the reliable path for interactivity on Obsidian Publish.
Cornell Notes
Obsidian Publish can’t run plugins, but Excalidraw interactivity can still work on the web by exporting drawings as SVG and wiring Excalidraw’s publish-side CSS/JS into the vault. A custom domain plus Cloudflare configuration is needed so Obsidian Publish will serve the required publish JS file. Excalidraw notes can be set to auto-export SVG via front matter or plugin settings, and a command palette action can open the matching Excalidraw source from a selected published SVG. Additional CSS classes (like “ex page height”) help control rendering for a visual, page-by-page website layout. A separate command can detect out-of-date SVG exports so updates are republished reliably.
Why does Excalidraw interactivity require SVG (not PNG) on Obsidian Publish?
What’s the role of a custom domain and Cloudflare in this setup?
How does the workflow ensure Excalidraw drawings stay in sync with what’s published?
How can an editor jump from a published SVG back to the editable Excalidraw note?
What does the “ex page height” CSS class accomplish?
Where do publish CSS and publish JS files need to live, and how are they detected?
Review Questions
- What specific constraint of Obsidian Publish makes a custom domain necessary for Excalidraw’s publish-side JavaScript to work?
- Describe two different ways the setup can trigger automatic SVG export for Excalidraw notes.
- How does the “out of date SVG exports” command reduce the risk of publishing stale visuals when filenames or linked assets change?
Key Points
- 1
Export Excalidraw drawings as SVG for Obsidian Publish interactivity; PNG won’t support embedded interactive components like videos or embedded pages.
- 2
Use a custom domain (with Cloudflare configured) so Obsidian Publish will serve the required publish JS file.
- 3
Place publish CSS and publish JS files into the vault’s publish route, and enable file-extension detection in plugin settings if they don’t appear.
- 4
Enable auto-export to SVG either per-note via front matter (e.g., an Excalidraw auto export SVG property) or via plugin auto-export settings.
- 5
Use command palette actions to open the Excalidraw source from a selected published SVG and to find/republish out-of-date SVG exports.
- 6
Apply CSS classes in publish CSS (such as “ex page height”) to control how Excalidraw renders on the web page for a consistent visual layout.
- 7
Republish changes after edits so Obsidian Publish updates the served SVG artifacts and the site reflects the latest drawings.