Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

v1.0.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 13 Oct 17:26
· 1 commit to main since this release
15d9c45

mdbook-mindmap

Build
mdBook
Mermaid

A mdBook preprocessor to create mindmaps from the book structure.

Installation

To use the preprocessor download the binary for your system and put it on your path.
Binaries for Linux, macOS and Windows are available from the latest release.
You should be able to execute the preprocessor from the command line as mdbook-mindmap.

mdBook Configuration

To integrate the preprocessor in your mdBook, add the following lines to your book.toml:

[preprocessor.mindmap]
renderers = ["html"]

Note: The preprocessor only supports the HTML renderer!

Usage

A mindmap can be generated with the following command:

!mindmap

This will generate a mindmap containing the current chapter name as root and all sub chapters with their chapter names.
For this the library mermaid.js will be included on every page the command is used.

The mindmap will be generated with the Mermaid mindmap syntax and will render when the page is loaded in the browser.

Example Output

<pre class="mermaid">
mindmap
  root)Tools(
    408513086("`Gradle`")
    932387233("`NPM`")
    2596981504("`Kubernetes`")
      994518411("`Pod`")
      773890894("`Service`")
</pre>
<script type="module">
  import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs";
  mermaid.initialize({ startOnLoad: true });
</script>