Skip to content

Add support for icons in Mermaid diagrams #613

@TheManchineel

Description

@TheManchineel

May we get support for icons in mermaid in theme=witiko/diagrams@v2 (e.g. logos in architecture diagrams)?

For instance, by passing --iconPacks '@iconify-json/logos' as an argument to mmdc, it is possible to register @iconify-json/logos as an icon set, which enables rendering of diagrams as seen below:

```mermaid
architecture-beta
    group api(logos:aws-lambda)[API]

    service db(logos:aws-aurora)[Database] in api
    service disk1(logos:aws-glacier)[Storage] in api
    service disk2(logos:aws-s3)[Storage] in api
    service server(logos:aws-ec2)[Server] in api

    db:L -- R:server
    disk1:T -- B:server
    disk2:T -- B:db
```

Currently, this gets rendered the same as on GitHub (courtesy of GitHub's mermaid support.

architecture-beta
    group api(logos:aws-lambda)[API]

    service db(logos:aws-aurora)[Database] in api
    service disk1(logos:aws-glacier)[Storage] in api
    service disk2(logos:aws-s3)[Storage] in api
    service server(logos:aws-ec2)[Server] in api

    db:L -- R:server
    disk1:T -- B:server
    disk2:T -- B:db
Loading

While with mmdc it is possible to do this for instance:

mmdc -i input.mmd --iconPacks '@iconify-json/logos'

resulting in:

Image

Metadata

Metadata

Assignees

Labels

expl3Related to the high-level programming language expl3feature requestthemesRelated to Markdown themes

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions