Skip to content

Embedding

deliver prints a snippet for the markdown file the map goes into. Pass --md-dir with that file’s directory so the paths are relative to it:

Terminal window
schemap deliver .schemap/bookshop/map.json --md-dir docs
[![Bookshop](../.schemap/bookshop/map.svg)](../.schemap/bookshop/map.html)

The SVG renders anywhere markdown shows images: GitHub, GitLab, VS Code, Obsidian, docs sites. It’s light by default, or dark when the map’s theme.mode is dark. Clicking it opens the interactive map.

On GitHub, clicking an .html file shows its source rather than the page. Host the HTML (GitHub Pages, any static host) if readers need the interactive map from GitHub.

For docs sites that allow iframes (MDX, VitePress, Docusaurus, Astro, Starlight):

Terminal window
schemap deliver map.json --embed iframe
<iframe src="./.schemap/bookshop/map.html" title="Bookshop" width="100%" height="560" style="border:0"></iframe>

To keep an embedded map in your site’s light or dark theme, send it a message whenever your theme changes:

iframe.contentWindow.postMessage({ schemap: 'theme', theme: 'dark' }, '*');

The map posts { schemap: 'ready' } to its parent once it is listening, so that is a good moment to send the first one.

The map stays interactive inside the page, like the examples in these docs.

Commit map.json, map.html and map.svg together: the snippet points at them, and map.json is what the agent edits next time. Output is deterministic, so unchanged maps produce no diff.