How to enable mindmaps from mermaid library? #5125
-
This is what I've tried:
markdown_extensions:
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format b) Because mindmap library uses the lazy loading: extra_javascript:
- https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs
- https://cdn.jsdelivr.net/npm/@mermaid-js/[email protected]/dist/mermaid-mindmap.esm.min.mjs
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I suspect the problem is that currently, (Material for) MkDocs doesn't properly treat |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll ask them if they want to. Anyway, have you considered forking MkDocs? I thought if it might be easier to develop features that way, while still keeping track of core changes. |
Beta Was this translation helpful? Give feedback.
I suspect the problem is that currently, (Material for) MkDocs doesn't properly treat
.mjs
files as JavaScript. You would need to open a change request upstream, as support would need to be added to MkDocs, then we can add it here.