markbind icon indicating copy to clipboard operation
markbind copied to clipboard

Bump Mermaid version

Open damithc opened this issue 5 months ago • 2 comments

Mermaid latest version is 11.7 (the version supported by us seems lower). In particular, I wish to use the bottom-to-top feature of Git graphs

Suggestions:

  1. Bump the supported Mermaid version
  2. Specify the currently supported version in the UG
  3. Is it possible to let the user 'self upgrade'? i.e., specify the version in the site.json, in the plugins config?

damithc avatar Jun 27 '25 05:06 damithc

Yes! It is possible to bump the mermaid version by specifying an updated CDN address in the plugins config, in this case, it would be (replaced @\10 to @11.7.0 from the code snippet in the docs):

{
  ...
  "plugins": [
    "mermaid"
  ],
  "pluginsContext": {
    "mermaid": {
      "address": "https://unpkg.com/[email protected]/dist/mermaid.esm.min.mjs" // replace with URL of your choice
    }
  }
}

As mermaid is currently only loaded dynamically, updating the CDN address automatically bumps the supported Mermaid version binary. Have tested it out, I was able to use the BT feature of v11.7

I think we can make it more clear in the docs, take the chance to bump the default CDN address to the updated version, and possibly add a flag to change versions if that is useful.

gerteck avatar Jul 02 '25 13:07 gerteck

Yes! It is possible to bump the mermaid version by specifying an updated CDN address in the plugins config, in this case, it would be (replaced @\10 to @11.7.0 from the code snippet in the docs):

Nice. Yup, I got it to work this way. Thanks for the help, @gerteck 👍

damithc avatar Jul 02 '25 14:07 damithc