Add mermaid for rendering graphs and other diagrams
This commit is contained in:
@@ -39,6 +39,14 @@ Setup the benchmark itself:
|
|||||||
5. `mount /dev/rbd0 /mnt/bench`
|
5. `mount /dev/rbd0 /mnt/bench`
|
||||||
|
|
||||||
## Benchmarks
|
## Benchmarks
|
||||||
|
{% mermaid() %}
|
||||||
|
xychart
|
||||||
|
title "Random Read"
|
||||||
|
x-axis "Block Size" ["4k", "8k", "4M", "8M"]
|
||||||
|
y-axis "IOPS" 0000 --> 5000
|
||||||
|
bar [0, 0, 0, 0]
|
||||||
|
|
||||||
|
{% end %}
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- Try directly on the block device
|
- Try directly on the block device
|
||||||
|
|||||||
2843
static/js/mermaid.min.js
vendored
Normal file
2843
static/js/mermaid.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
21
templates/_base.html
Normal file
21
templates/_base.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{% extends "radion/templates/_base.html" %}
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
|
|
||||||
|
<!-- mermaid -->
|
||||||
|
<!-- Based on the following blog -->
|
||||||
|
<!-- https://www.hahwul.com/dev/zola/mermaid-in-zola/ -->
|
||||||
|
<script src="/js/mermaid.min.js"></script>
|
||||||
|
<script type="module">
|
||||||
|
mermaid.initialize({ startOnLoad: false, theme: 'dark' });
|
||||||
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
const mermaidElements = document.querySelectorAll('.mermaid');
|
||||||
|
|
||||||
|
if (mermaidElements.length > 0) {
|
||||||
|
await mermaid.run({
|
||||||
|
nodes: mermaidElements
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
3
templates/shortcodes/mermaid.html
Normal file
3
templates/shortcodes/mermaid.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<pre class="mermaid">
|
||||||
|
{{ body }}
|
||||||
|
</pre>
|
||||||
Reference in New Issue
Block a user