Skip to content

Conversation

AliYmn
Copy link

@AliYmn AliYmn commented Mar 14, 2025

This PR fixes the Mermaid diagram rendering issue in the documentation by explicitly adding the Mermaid JavaScript library. Even though Material for MkDocs has built-in Mermaid support in newer versions, explicitly adding the library resolves rendering problems with sequence diagrams and other Mermaid-based visualizations.

Changes:

  • Added mermaid.js CDN link to mkdocs.yml
  • Ensures proper rendering of all sequence diagrams in documentation

Before:
Screenshot 2025-03-15 at 00 38 34

After:
Screenshot 2025-03-15 at 00 39 10

@cunla cunla self-requested a review March 15, 2025 12:17
@cunla
Copy link
Member

cunla commented Mar 15, 2025

What URL is the diagram not rendered? Looking here: https://django-tasks-scheduler.readthedocs.io/en/latest/ - I see the diagram fine.

@AliYmn
Copy link
Author

AliYmn commented Mar 15, 2025

@cunla It may be related to my browser location, because it does not load for me, and diagrams do not appear

I got 520 from: https://unpkg.com/mermaid@11/dist/mermaid.min.js
I got 200 from: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js

If you specify a CDN in your configuration, the system will use that CDN instead of unpkg., choosing a CDN will avoid these problems.

Screenshot 2025-03-15 at 14 43 31

@cunla
Copy link
Member

cunla commented Apr 18, 2025

I have decided not to include this, since it seems to be an issue specific for your case.
And it should not download two versions of mermaidjs

@cunla cunla closed this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants