Skip to content

Mermaid configuation options in marp #479

Answered by yhatt
Kugeleis asked this question in Q&A
Discussion options

You must be logged in to vote

Marp has no official support for mermaid, but if you have already successful to render, you can set correct configuration in both cases

# Sankey

<div class="mermaid">
  ---
  config:
    sankey:
      showValues: false
  ---
  sankey-beta
  %% source,target,value
  Project,Database,10
  People,Database,20
  Measurements,Database,100
</div>

<script type="module">
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.esm.min.mjs';
  mermaid.initialize({ startOnLoad: true });
</script>

Mermaid setting is not a part of Marp so it's important to place the independent frontmatter inside the mermaid code.

or:

<div class="mermaid">
  sankey-beta
  %% source,target,valu…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kugeleis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants