[!Warning] I made this plugin for myself, it may now work properly on other systems and it lacks fancy GUI settings
Render various diagrams and generate dynamic svgs in Obsidian. (Similar to Obsidian kroki)
[!Note] This plugin uses system packages for diagram rendering (
js
ports are slow, I wanted something native)
Diagram | Doc | Codeblock tag |
---|---|---|
graphviz | graphviz.org | dot |
latex | latex-project.org | latex |
ditaa | ditaa.sourceforge.net | ditaa |
blockdiag | blockdiag.com | blockdiag |
asciidoc | asciidoc.org | asciidoc |
plantuml | plantuml.com | plantuml |
typst | typst.app | typst |
Diagram | Doc | Codeblock tag |
---|---|---|
refgraph | refgraph | refgraph |
dynamic-svg | dynamic svg | dynamic-svg |
Just search for 'Universal renderer' in the obsidian community plugins
main.js
, styles.css
, manifest.json
to your vault <VaultFolder>/.obsidian/plugins/universal-renderer/
from the releases sectionnpm i
or yarn
to install dependenciesnpm run build
main.js
, styles.css
, manifest.json
to your vault <VaultFolder>/.obsidian/plugins/universal-renderer/
.graphviz, latex, asciidoc
and other packages via your system package manager (you can customize executable file locations in plugin settings)palattegen.ts
colors
and shades
constants to your liking (default theme is gruvbox)styles.css
Various parameters can be specified before the diagram code similar to obsidian's frontmatter
Paramater | Description |
---|---|
width | Width of the rendered graph, can be any css size modifier (%, px, em, etc.) |
doc-start | String to prepend to the diagram code before rendering (usefull with presets) |
doc-end | Same as doc-start but appends instead of prepending |
ref-name graph-name name |
Set graph name for reusing it later via a ref graph |
preset | A set of parameters to apply to the graph (See presets) |
invert-shade invert-color |
Inverts shades or colors of the graph |
\<svg tag>-fill/stroke:keep-shade/color/all | Freezes color or shade inversion in light/dark theme for a specific svg tag (e.g. circle, text, line) |