-
Yes,drawing languages such like graphviz and mermaid is very important for some creators. |
Beta Was this translation helpful? Give feedback.
Answered by
yhatt
Nov 24, 2021
Replies: 1 comment
-
Yes, community has already enjoyed diagrams in Marp, powered by compatible markdown-it plugins (GraphViz, mermaid, and PlantUML) or "Diagram images as a Service" such as kroki.io, Gravizio, etc. Marp MUST be a minimalistic ecosystem to keep Markdown compatibility with everywhere. If you want diagrams, plug the diagram support as you like.
Example: markdown-it-plantuml# UML example:
@startuml
actor actor
actor/ "actor/"
agent agent
artifact artifact
boundary boundary
card card
circle circle
cloud cloud
collections collections
component component
control control
database database
entity entity
file file
folder folder
frame frame
hexagon hexagon
interface interface
label label
node node
package package
person person
queue queue
rectangle rectangle
stack stack
storage storage
usecase usecase
usecase/ "usecase/"
@enduml // engine.js
module.exports = ({ marp }) =>
marp.use(require('markdown-it-plantuml'), {
// Wrap in <p> for better rendering in some built-in themes
render: (...args) =>
`<p>${marp.markdown.renderer.rules.image(...args)}</p>`,
}) $ npm i --save @marp-team/marp-cli markdown-it-plantuml
$ npx marp --engine ./engine.js your-markdown.md Related
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
k7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, community has already enjoyed diagrams in Marp, powered by compatible markdown-it plugins (GraphViz, mermaid, and PlantUML) or "Diagram images as a Service" such as kroki.io, Gravizio, etc.
Marp MUST be a minimalistic ecosystem to keep Markdown compatibility with everywhere. If you want diagrams, plug the diagram support as you like.
Example: markdown-it-plantuml