Skip to content

Commit 0a0d028

Browse files
committed
Enhance Mermaid.js configuration for better diagram rendering
- Added explicit securityLevel and maxWidth settings - Ensures diagrams render properly on GitHub Pages - Mermaid.js loads client-side via CDN (no build-time dependency needed)
1 parent 2b2ed3a commit 0a0d028

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

docs_site/_layouts/default.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,17 @@
169169
font-weight: 600;
170170
}
171171
</style>
172+
<!-- Mermaid.js for diagram rendering -->
172173
<script type="module">
173174
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
174-
mermaid.initialize({ startOnLoad: true, theme: 'default' });
175+
mermaid.initialize({
176+
startOnLoad: true,
177+
theme: 'default',
178+
securityLevel: 'loose',
179+
flowchart: { useMaxWidth: true },
180+
sequence: { useMaxWidth: true },
181+
gantt: { useMaxWidth: true }
182+
});
175183
</script>
176184
</head>
177185

0 commit comments

Comments
 (0)