added mermaid support in md
This commit is contained in:
		@@ -19,8 +19,34 @@ test
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% end %}
 | 
					{% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## My example mermaid diagram
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I wanted to use mermaid in this project, and it looks like this
 | 
				
			||||||
 | 
					{% mermaid() %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					classDiagram
 | 
				
			||||||
 | 
					Animal <|-- Duck
 | 
				
			||||||
 | 
					Animal <|-- Fish
 | 
				
			||||||
 | 
					Animal <|-- Zebra
 | 
				
			||||||
 | 
					Animal : +int age
 | 
				
			||||||
 | 
					Animal : +String gender
 | 
				
			||||||
 | 
					Animal: +isMammal()
 | 
				
			||||||
 | 
					Animal: +mate()
 | 
				
			||||||
 | 
					class Duck{
 | 
				
			||||||
 | 
					+String beakColor
 | 
				
			||||||
 | 
					+swim()
 | 
				
			||||||
 | 
					+quack()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					class Fish{
 | 
				
			||||||
 | 
					-int sizeInFeet
 | 
				
			||||||
 | 
					-canEat()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					class Zebra{
 | 
				
			||||||
 | 
					+bool is_wild
 | 
				
			||||||
 | 
					+run()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% end %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% row() %}
 | 
					{% row() %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -44,6 +70,4 @@ Finally a framework fun to be used.
 | 
				
			|||||||
  - something
 | 
					  - something
 | 
				
			||||||
- test3
 | 
					- test3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{% end %}
 | 
					{% end %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<main class="pt-16">
 | 
					<main class="p-16">
 | 
				
			||||||
 | 
					    <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
 | 
				
			||||||
 | 
					    <script>mermaid.initialize({startOnLoad:true});</script>
 | 
				
			||||||
    {{page.content | safe}}
 | 
					    {{page.content | safe}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 </main> {% endblock content %}
 | 
					 </main> {% endblock content %}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								templates/shortcodes/mermaid.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								templates/shortcodes/mermaid.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					<div class="mermaid">
 | 
				
			||||||
 | 
					    {{ body }}
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user