-
Notifications
You must be signed in to change notification settings - Fork 4
add support for mermaid.js #134
Copy link
Copy link
Open
Description
I want to support mermaid.js diagramms in our documentation ...
Mermaid lets you create diagrams and visualizations using text and code.
It is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
Syntax: https://mermaid.js.org/intro/syntax-reference.html
The integration is easy,
- see: https://gohugo.io/content-management/diagrams/#mermaid-diagrams
-copy the Javascript files to our page, to avoid CDN-Server
I'll provide a shortcode for integration. It can be used as follows:
{{< mcr-figure label="Klassendiagramm" caption="MCRContent" >}}
{{< mcr-mermaid >}}
classDiagram
class MCRContent {
<<abstract>>
#String name
+ InputStream getInputStream()*
+ Document asXML()
+ MCRContent ensureXML()
+ byte[] asByteArray()
}
class MCRXMLContent {
<<abstract>>
+ MCRXMLContent MCRXMLContent()
}
MCRContent <|-- MCRXMLContent
class MCRJDOMContent {
+ MCRJDOMContent(Document)
+ MCRJDOMContent(Element)
}
MCRXMLContent <|-- MCRJDOMContent
{{< /mcr-mermaid >}}
{{< /mcr-figure >}}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels