mkdocs-glightbox icon indicating copy to clipboard operation
mkdocs-glightbox copied to clipboard

Add support for mermaid js diagrams

Open robinbaeurle opened this issue 2 years ago • 3 comments

Hi, Based on https://github.com/squidfunk/mkdocs-material/issues/5208.

Is it possible to add an option to support mermaid js diagrams in the same way as images are supported?

GitHub is also able to display markdown in a way that the mermaid js diagrams become zoomable: https://github.com/squidfunk/mkdocs-material/blob/master/docs/reference/diagrams.md#using-flowcharts

BR

robinbaeurle avatar May 10 '23 15:05 robinbaeurle

tks @blueswen

hellowac avatar May 25 '23 10:05 hellowac

Hi @robinbaeurle @hellowac ,

Since the compiled result of the Mermaid diagram is not an image, our plugins can't open it in lightbox like an image.

I spent some time investigating how GitHub implements the zoomable feature for Mermaid diagrams. They have a unique pipeline and script to add this viewer feature, as described in Include diagrams in your Markdown files with Mermaid. Regrettably, I haven't been able to identify the public package they use for the Mermaid viewer. If you know of any exceptional Mermaid viewer plugins, I would love to create another MkDocs plugin to implement this feature.

blueswen avatar Jun 04 '23 08:06 blueswen

I'm using kroki.io and mkdocs-kroki-plugin and it works great together with this plugin

AndBondStyle avatar Feb 12 '24 01:02 AndBondStyle