Mathjax (mathematical expressions) and Mermaid (graphs)

Posted Jul 12, 2021
By BaHI
1 min reading time

Sample on using Mathjax and Mermaid for mathematical expression and grap rendering.

There’s just one thing for an articla author to do, thus including values into Front Matter to load the required tool.

mathjax: true
mermaid: true

HTML mathjax: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Mathjax via markdown

x = {-b \pm \sqrt{b^2-4ac} \over 2a}.

HTML mermaid:

erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses

Mermaid via MD:

graph TD;
A-->B;
A-->C;
B-->D;
C-->D;

Further Reading
DDD Series - 6 - Summary

In lacus felis, sodales at mattis ac, gravida quis eros. Curabitur pharetra a arcu nec blandit. Aenean pellentesque mi ac mattis ultricies. Pellentesque id eleifend diam. Donec nec leo at dui finibus bibendum et ut nibh. Vestibulum id pharetra risus, et auctor eros. Morbi egestas iaculis convallis. Etiam posuere id sem accumsan dignissim. Morbi varius justo et elementum dictum. Fusce mollis …

Pictures - post using image from local folder

By adding the custom eleventy-hugo-style-local-post-images plugin we gain the possibility to create a post folder where we can place and use local images.

Pictures - post using image from main asset folder

This is a sample on using images the usual (11ty) way.