silverbullet-mindmap is a Plug for Silverbullet to render mindmap diagrams based on Markmap.
Note: The Markmap 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 Markmap is only loaded on pages with actual mindmap diagrams rather than on every SB load.
If you run SilverBullet using Docker, Git is already included. Otherwise install Git from your system's package manager, or following Git documentation.
Open your PLUGS note in SilverBullet and add this plug to the list:
- Stable version:
- ghr:malys/silverbullet-mindmap- Development version (only for testing):
- github:malys/silverbullet-mindmap/mindmap.plug.jsThen run the {[Plugs: Update]} command and off you go!
Create a markdwon file using MarkMap format.
---
title: markmap
markmap:
colorFreezeLevel: 2
---
## Links
-[Website](https://markmap.js.org/)
- [GitHub](https://github.com/gera2ld/markmap)
## Related Projects
-[coc-markmap](https://github.com/gera2ld/coc-markmap) for Neovim
- [markmap-vscode](https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode) for VSCode
- [eaf-markmap](https://github.com/emacs-eaf/eaf-markmap) for Emacs
## Features
Note that if blocks and lists appear at the same level, the lists will be ignored.
### Lists
-**strong** ~~del~~ *italic* ==highlight==
- `inline code`
- [x] checkbox
- Katex: $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ `<!-- markmap: fold -->`
- [More Katex Examples](#?d=gist:af76a4c245b302206b16aec503dbe07b:katex.md)
- Now we can wrap very very very very long text based on `maxWidth` option
- Ordered list
1. item 1
2. item 2
### Blocks
``js console.log('hello, JavaScript') ``
| Products | Price |
|---|---|
| Apple | 4 |
| Banana | 2 |

- {[Mindmap Preview: Toggle]} or [CTRL+m]
This plug is versioned including Semantic Versions of 3 different components:
internal version-markmap version-silverbullet version
If you find bugs, report them on the issue tracker on GitHub.
I WILL NOT IMPLEMENT MORE FEATURES, PULL REQUESTS ARE PREFERRED.
To build this plug, make sure you have SilverBullet installed. Then, build the plug with:
- Deno build (update dependencies)
deno run build- Watch for changes and rebuild automatically
deno run watch- Copy the resulting
.plug.jsfile into your space's_plugfolder. Or build and copy in one command:
deno run debug- Release a new version
deno run release- Publish a new version
deno run publishSilverBullet will automatically sync and load the new version of the plug (or speed up this process by running the {[Sync: Now]} command).
scripts/dependencies.xsh is a script used to update template files. It downloads the latest version of each dependency and replaces the placeholders (_VERSION_) in the template with the new versions.
scripts/import_map.tplis the template used to generate theimport_map.jsonfile. It contains a list of dependencies to be included in the plug. The template can be edited to add or remove dependencies.mindmap.plug.jsis also updated with last dependencies versions.
MIT, following SilverBullet
Inspired by Markdown Plug from @Zef Hemel
