AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams
MIT License
46 stars 29 forks source link

Does not render diagram when used with mkdocstrings #78

Open butterlyn opened 5 days ago

butterlyn commented 5 days ago

Kroki diagrams within Python docstrings, parsed with mkdocstrings, do not render. Currently, the only way to render kroki diagrams is with .md files, not .py files.

Please see reference to mkdocstrings recipe: https://mkdocstrings.github.io/recipes/

pawamoy commented 5 days ago

That's probably because this plugin operates on Markdown pages, and mkdocstrings does not generate Markdown or pass anything to other plugins, so this plugin never gets to see docstrings and operate on them. mkdocstrings works at the Markdown-to-HTML conversion layer.

There are two ways to make this work: rewrite this plugin as a Markdown extension, or hack into mkdocstrings' internals. I'll try t share a link that explains this later.