Mermaid in MkDocs #5953
Unanswered
voliveira-tmx
asked this question in
Q&A
Replies: 1 comment 1 reply
-
That's because the icons aren't loaded. You have to manually register them. Given that, you might consider renaming this discussion to something like "How to registerIconPacks in MkDocs". For my part, I can't seem to figure this out either. I tried adding: extra_javascript:
- https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs
# Ensure imported packages use the same versions listed above
- path: js/register-mermaid-icons.js
type: module With import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";
mermaid.registerIconPacks([
{
name: "simple-icons",
loader: () =>
fetch("https://unpkg.com/@iconify-json/logos/icons.json").then((res) =>
res.json()
),
},
]); I'm kind of guessing that the mermaid markdown block has already been translated into the chart by the time this gets run. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've configured mermaid on my
mkdocs.yaml
file like this:However when I try this example:
I get a bunch of interrogation marks, on the UI, how can I modify my mkdocs.yaml to correctly render the logos?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions