-1

I want to use markmap with a static site generator. Therefore I want to find an example where markmap is used from HTML. I.e., the HTML file should contain the Markdown statements to produce the desired mindmap. The idea is that the actual mindmap is produced during presentation time (=end user fetching the HTML), not during site generation time.

Unfortunately, the documentation page of markmap does not provide such an example.

Many thanks in advance.

  • Is that works for your problem? https://stackoverflow.com/questions/65517545/markmap-insert-the-mindmap-to-the-html – Evren Apr 18 '22 at 10:30
  • No, this is not what I am looking for. The example in https://stackoverflow.com/questions/65517545/markmap-insert-the-mindmap-to-the-html does _not_ contain Markdown. It contains some kind of JSON. – Elmar Klausmeier Apr 18 '22 at 15:58

1 Answers1

2

I asked the author of markmap, Gerald Liu. He prompty suggests to look at markmap-autoloader. Thanks Gerald!

The example is thus:

<html>
<body>

<style>
.markmap > svg {
  width: 100%;
  height: 300px;
}
</style>

<div class="markmap">
# markmap
## autoloader
## transformer
## view
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader"></script>
</html>

Above code will produce below mindmap: markmap generated Mindmap

This is what I now use in the static site generator Simplified Saaze.