Files
plainleaf/website/Library/silverbullet-mermaid.md
T
Zef Hemel 8d8bb46649 Expanded plug dev guide
Split the Plug Development page into a quick-start with more subtopics: Architecture (loading, sandboxing, execution), Reference (manifests, hooks, syscalls), and Distribution and Testing.

Swap the Excalidraw architecture embed for a Mermaid diagram, and update the website Dockerfile to ship the Mermaid plug instead of Excalidraw.
2026-04-21 10:11:24 +02:00

1.2 KiB

name, tags, files, share.uri, share.hash, share.mode
name tags files share.uri share.hash share.mode
Library/silverbullet-mermaid meta/library
mermaid.plug.js
https://github.com/silverbulletmd/silverbullet-mermaid/blob/main/PLUG.md 357c5dc6 pull

This plug adds basic Mermaid support to Silver Bullet.

For example:

flowchart LR

A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]

Note: The Mermaid library itself is not bundled with this plug, it pulls the JavaScript from the JSDelivr CDN. This means this plug will not work without an Internet connection. The reason for this is primarily plug size (bundling the library would amount to 1.1MB). This way Mermaid is only loaded on pages with actual Mermaid diagrams rather than on every SB load.

Configuration

You can use the mermaid config to tweak a few things:

```space-lua
config.set("mermaid", {
  version = "11.4.0",
  integrity = "new integrity hash",
  -- or disable integrity checking
  integrity_disabled = true
  -- optional: register icon packs 
  icon_packs = {
    {
      name = "logos",
      url = "https://unpkg.com/@iconify-json/logos@1/icons.json",
    },
  },
})
```