Repository navigation
rehype-mind-elixir #385
Replies: 4 comments 1 reply
|
Thanks for sharing this! It’s a great idea and a really cool integration for the ecosystem. One suggestion regarding the data format: you might want to check out Mind Elixir Plaintext. It's designed to be much more concise and natural for human writing/editing inside Markdown files, which could make writing mind maps in fenced code blocks even easier. Thanks again for building this! |
|
@SSShooter, https://github.com/zikojs/addons/blob/main/packages/mind-elixir/src/mind/node.js#L45 It now supports the Mind Elixir plaintext syntax: import {
MindMap,
MindNode,
plainTextToMindNodes
} from "@zikojs/mind-elixir";
const map4 = MindMap({
height: "400px",
data: plainTextToMindNodes(`
- Root
- Node A [^id1]
- Node B [^id2]
- > [^id1] <-Link Label-> [^id2]
`),
});
map4.mount(document.body);
I've adopted the plaintext parser there, and I'll now sync the support with rehype-mind-elixir. |
|
@SSShooter , Plain Text is fully supported now : |
|
https://zikojs-rehype-plugins.vercel.app/guides/mind-elixir/ |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Rehype Mind Elixir: Interactive Mind Maps in Markdown
I'm the author of ZikoJS, and I've been building tools around the ZikoJS ecosystem to make interactive content easier to create and embed.
Today I want to introduce rehype-mind-elixir, a Rehype plugin that brings interactive Mind Elixir mind maps directly into Markdown.
The idea is simple: instead of writing JavaScript to create a mind map, you can describe it directly in your Markdown using a
mind-elixirfenced code block.For example:
The section before
---is optional YAML configuration, while the section after---contains the actual mind-map data.The mind-map body can be written using plain text, JSON, or JSON-like syntax.
For example, the same map can be represented using JSON:
The plugin transforms these code blocks into interactive Mind Elixir mind maps during the Rehype processing pipeline.
It supports:
height,width, anddirectiontags,children, links, styles, icons, and other node configurationBecause it is a Rehype plugin, it isn't tied to a specific framework. It can be integrated into Astro, Next.js/MDX, Gatsby, or directly into a Unified pipeline.
The result is a simple workflow:
Markdown → Rehype → Mind Elixir → Interactive Mind Map
This makes mind maps feel like another Markdown content primitive, alongside code blocks, diagrams, and other embedded content.
I'm particularly interested in this approach for documentation, technical articles, tutorials, knowledge bases, and interactive notes, where the structure of the content can be represented visually without leaving Markdown.
rehype-mind-elixir, write the mind map in Markdown, render it interactively.If you find this project useful or interesting, consider giving a ⭐ to the technologies that make it possible:
Use Case: Astro
Configuration
Then you can use mind maps directly in your Astro Markdown or MDX pages:
The Markdown is processed by Astro, converted to HAST, and then
rehype-mind-elixirdetects themind-elixircode block and replaces it with an interactive Mind Elixir map.All reactions