summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--template/layouts/partials/head-additions.html26
m---------template/themes/landau-hacker0
2 files changed, 26 insertions, 0 deletions
diff --git a/template/layouts/partials/head-additions.html b/template/layouts/partials/head-additions.html
new file mode 100644
index 0000000..0aa1935
--- /dev/null
+++ b/template/layouts/partials/head-additions.html
@@ -0,0 +1,26 @@
+<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
+<script>
+ document.addEventListener('DOMContentLoaded', function() {
+ // Look for mermaid code blocks
+ const mermaidBlocks = document.querySelectorAll('pre code.language-mermaid');
+ if (mermaidBlocks.length > 0) {
+ mermaid.initialize({
+ startOnLoad: false,
+ theme: 'default',
+ flowchart: {
+ useMaxWidth: true
+ }
+ });
+
+ mermaidBlocks.forEach((block, index) => {
+ const graphDefinition = block.textContent;
+ const div = document.createElement('div');
+ div.className = 'mermaid';
+ div.innerHTML = graphDefinition;
+ block.parentNode.parentNode.replaceChild(div, block.parentNode);
+ });
+
+ mermaid.init();
+ }
+ });
+</script>
diff --git a/template/themes/landau-hacker b/template/themes/landau-hacker
-Subproject 1b9a1f570d7e90b84dca74ee1623101fb8f4332
+Subproject 075ee5aa6ba08c8b57040dd0f036156765620bf