Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to control mermaid icon packs #7929

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kirillmakhonin-brt
Copy link

About

This pull request adds an ability to control mermaid JS, particulary:

  1. Load additional icon packs
  2. Control version of Mermaid JS library

Checklist

  • Documentation
  • Example
  • JSON Schema

@squidfunk
Copy link
Owner

Thanks for the PR. We are currently in feature freeze, because we're putting all of our efforts into very important foundational work. Once that's done, we might consider adding this functionality.

@shahida615
Copy link

shahida

@egandro
Copy link

egandro commented Feb 7, 2025

+1 for this feature

nice icons are missing and can only be added via a library

@squidfunk
Copy link
Owner

Please use reactions on the original post. Do not +1, as it only adds noise.

@robinlioret
Copy link

I was missing this feature, thanks a lot!

I have two suggestions:

  • Parameter names should have consistent cases: every parameters are in snake_case. Wouldn't be better practice to keep it that way?
  • I find very confusing the way logo groups are configured. iconnify:logo@1 or url:aws:... does not provide a clear view on how to refer to the group in the diagrams, nor how to configure it.

Regarding this last point, my idea would be to explicitly make the user specify the name and the type of the target. Here's an idea on what the configuration could look like:

theme:
  mermaid:
    icon_packs:
      logos:
        type: iconify
        path: logos@1
      aws:
        type: url
        url:  https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v19.0

Using a dict instead of a list:

  • ensures the uniqueness of the logo group name
  • ensures the clarity of the group name and how to use it in the documentation's diagrams
  • allow the user to use a custom name that fit is needs (enterprise conventions or else)

Explicit type clarify the documentation, Mkdocs Material could have a small paragraph dedicated to each type and how to configure it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants