-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Context
Hello, first of all thank you so much for working on this project, it has provided me the best way to quickly deploy documentation that actually gets maintained and updated.
I am trying to use the architecture-diagrams, but whenever I try to use icons from iconify.design as described on the doc.
### Bug description
Given a sample diagram like does not render icons:
```plain
architecture-beta
group api(logos:aws-lambda)[API]
service db(logos:aws-aurora)[Database] in api
service disk1(logos:aws-glacier)[Storage] in api
service disk2(logos:aws-s3)[Storage] in api
service server(logos:aws-ec2)[Server] in api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db
In have tried to load the icons myself by adding this to docs/src/js/register-mermaid-icons.js:
import mermaid from "mermaid";
mermaid.registerIconPacks([
{
name: "logos",
loader: () =>
fetch("https://unpkg.com/@iconify-json/logos/icons.json")
.then((res) => {
if (!res.ok) throw new Error("Failed to fetch icons");
return res.json();
})
.then((icons) => {
console.log("Icons loaded:", icons);
return icons;
})
.catch((err) => console.error("Error loading icons:", err)),
},
]);
// Initialize Mermaid
mermaid.initialize({
startOnLoad: true,
theme: "default", // or "dark", "neutral"
securityLevel: "loose", // Needed for inline HTML in Mermaid
});And load it from mkdocs.yml:
extra_javascript:
- path: src/js/register-mermaid-icons.js
type: moduleThe codes does run, by mermad.registerIconPacks never runs.. what am I doing wrong ?
Related links
Reproduction
Steps to reproduce
Build the reproduction sample or use the diagram and js provided on the bu
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
