feat: Add support for Mermaid diagrams in Markdown renderer and update navigation structure

This commit is contained in:
Nawaz Dhandala 2026-01-14 17:03:17 +00:00
parent 31fca8c50f
commit 3870a9ed08
No known key found for this signature in database
GPG key ID: 96C5DCA24769DBCA
3 changed files with 11 additions and 4 deletions

View file

@ -137,6 +137,9 @@ export default class Markdown {
};
renderer.code = function (code, language) {
if (language === "mermaid") {
return `<div class="mermaid">${code}</div>`;
}
return `<pre><code class="language-${language}">${code}</code></pre>`;
};

View file

@ -225,10 +225,6 @@ const DocsNav: NavGroup[] = [
DocsNav.push({
title: "Self Hosted",
links: [
{
title: "Architecture",
url: "/docs/self-hosted/architecture",
},
{
title: "Slack Integration",
url: "/docs/self-hosted/slack-integration",
@ -245,6 +241,10 @@ DocsNav.push({
title: "SendGrid Inbound Email",
url: "/docs/self-hosted/sendgrid-inbound-email",
},
{
title: "Architecture",
url: "/docs/self-hosted/architecture",
},
],
});

View file

@ -26,6 +26,10 @@
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" crossorigin>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" onload="hljs.highlightAll();"></script>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true, theme: 'default' });
</script>
<% if(typeof enableGoogleTagManager !== 'undefined' ? enableGoogleTagManager : false){ %>
<!-- Google Tag Manager -->