Skip to content

Instantly share code, notes, and snippets.

@Magnus167
Created November 27, 2024 12:17
Show Gist options
  • Save Magnus167/1c34fa5ccd3dfd7fec47aea74821fa46 to your computer and use it in GitHub Desktop.
Save Magnus167/1c34fa5ccd3dfd7fec47aea74821fa46 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mermaid Chart with ELK Layout</title>
</head>
<body>
<div class="mermaid">
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Try Again]
</div>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@11/dist/mermaid-layout-elk.esm.min.mjs';
mermaid.registerLayoutLoaders(elkLayouts);
mermaid.initialize({
startOnLoad: true,
layout: 'elk',
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment