Tyler Carrol22 downloadsRender SVG images from frontmatter-defined objects, layers, and views.
This logo was created using this plugin and is available in the
/sketchmatter-demo-vault
SketchMatter renders SVG images from the frontmatter in Obsidian notes.
The following examples are available in the
/sketchmatter-demo-vault
polygon, polyline, line, circle, rect, ellipse, text, and compositeAn object note usually contains:
sketchmatter-type/continentfill, stroke, strokeWidth, and opacityExample:
---
tags:
- sketchmatter-type/continent
- sketchmatter-type/label
sketchmatter-layer: 100
sketchmatter-coordinates:
- "100, 100"
- "300, 120"
- "360, 240"
- "220, 300"
sketchmatter-label-coordinates:
- "240, 190"
sketchmatter-label-text: Sunreach
sketchmatter-font-family: Georgia
sketchmatter-font-size: 24
sketchmatter-font-style:
- bold
- italic
sketchmatter-font-color: "#4b2d12"
sketchmatter-image-id: map1
---
sketchmatter-image-id can be a single ID, a comma-separated string, or a YAML array when one object belongs to multiple images.
Coordinates are interpreted by the resolved shape renderer. Type definitions in plugin settings provide the usual shape and style defaults, and object-level frontmatter can override them. If a note has multiple matching type tags, SketchMatter emits one object per type tag so a single note can render, for example, both a continent polygon and its label.
Type definitions are configured in Settings → Community plugins → SketchMatter.
Each type definition can specify:
sketchmatter-label-layer)The default settings include:
label type definition that uses the built-in text shape and reads its position from sketchmatter-label-coordinatescity type definition that uses the built-in composite shape for a marker symbolIf a shape is not explicitly set, SketchMatter can infer one from the coordinate structure.
View definition notes are tagged like this:
tags:
- sketchmatter-view/political
Supported frontmatter:
sketchmatter-include-layerssketchmatter-exclude-layersincludeImageIdsexcludeImageIdsExample:
---
tags:
- sketchmatter-view/political
sketchmatter-include-layers: 100-400
includeImageIds:
- map3
---
Views can be selected in the panel or referenced from a sketchmatter code block.
Image definition notes are tagged like this:
tags:
- sketchmatter-image/map2
Supported frontmatter:
sketchmatter-widthsketchmatter-heightsketchmatter-background-colorsketchmatter-background-imagesketchmatter-preserve-aspect-ratiosketchmatter-background-image accepts vault assets, wikilinks, absolute URLs, and data URLs.
Use a sketchmatter code block:
image: map1
view: political
Supported parameters:
imageviewBoth are optional. The view value is case-insensitive. If an image is omitted, SketchMatter will try to resolve one from the selected view or the filtered objects.
In addition to type-definition styles, object notes can opt into:
sketchmatter-opacitysketchmatter-texturesketchmatter-masksketchmatter-blend and sketchmatter-blend-radiussketchmatter-overlap-pattern, sketchmatter-overlap-thickness, sketchmatter-overlap-spacing, sketchmatter-overlap-angle, and sketchmatter-overlap-colorsketchmatter-seed, sketchmatter-magnitude, and sketchmatter-noisesketchmatter-label-textsketchmatter-font-family, sketchmatter-font-size, sketchmatter-font-style, and sketchmatter-font-colorsketchmatter-texture accepts the same asset forms as background images: vault paths, wikilinks, absolute URLs, and data URLs.
Mask selectors can target:
type:<type-name>file:<path-or-basename>continentOverlap patterns are drawn only where objects of the same type intersect. Supported pattern values are:
lineshatchcrosshatchdotsFor lines, use sketchmatter-overlap-angle to rotate the line direction (degrees, default 0).
In the panel, select Export SVG to write the current render to the vault root.
Typical filenames look like:
sketch-matter-export-all.svgsketch-matter-export-political-map1.svgAll user-facing frontmatter and tag-prefix keys are configurable in plugin settings. The defaults include:
sketchmatter-typesketchmatter-viewsketchmatter-imagesketchmatter-layersketchmatter-shapesketchmatter-childrensketchmatter-coordinatessketchmatter-image-idsketchmatter-label-coordinatessketchmatter-label-textsketchmatter-font-familysketchmatter-font-sizesketchmatter-font-stylesketchmatter-font-colorsketchmatter-widthsketchmatter-heightsketchmatter-background-colorsketchmatter-background-imagesketchmatter-preserve-aspect-ratiosketchmatter-opacitysketchmatter-texturesketchmatter-masksketchmatter-seedsketchmatter-magnitudesketchmatter-noisesketchmatter-blendsketchmatter-blend-radiussketchmatter-overlap-patternsketchmatter-overlap-thicknesssketchmatter-overlap-spacingsketchmatter-overlap-anglesketchmatter-overlap-colorsketchmatter-fillsketchmatter-strokesketchmatter-stroke-widthdefaultLayer: 1000 (fallback layer for objects with no layer set)npm install
npm run build
main.js, manifest.json, and styles.css to:<Vault>/.obsidian/plugins/sketch-matter/
For watch mode during development:
npm run dev
This repository includes a ready-made demo vault in /sketchmatter-demo-vault.
.\scripts\build-to-demo-vault.ps1
npm run buildmain.js, manifest.json, and styles.css to sketchmatter-demo-vault/.obsidian/plugins/sketch-matter/sketchmatter-demo-vault in ObsidianSee sketchmatter-demo-vault/README.md for a guided walkthrough.
SketchMatter works with three note types:
At render time, the plugin collects objects, applies any selected view and image filters, resolves shapes and styling, and renders the matching objects into one SVG.