AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

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

Option for specifying the rendered Image Size #75

Open Valentyn1402 opened 1 month ago

Valentyn1402 commented 1 month ago

In the API there is no option to specify the image size you want to render with Kroki, I would appreciate an option to specify the image size that should be rendered.

oniboni commented 1 month ago

Do you mean that the diagram options do not work?

As referenced in the kroki documentation you can pass the size. e.g.

```kroki-blockdiag size=100x50
blockdiag {
  blockdiag -> generates -> "block-diagrams";
  blockdiag -> is -> "very easy!";

  blockdiag [color = "greenyellow"];
  "block-diagrams" [color = "pink"];
  "very easy!" [color = "orange"];
}
Valentyn1402 commented 1 month ago

Sorry for not clarifying, meant specifically for PlantUML/Mermaid Diagrams, there is no diagram option for size

oniboni commented 2 weeks ago

I see.. hmm this is unfortunate :disappointed:

We could pass width and height as properties to the img, object or svg tags. But these properties would then be mixed up with the regular diagram options, that get sent to kroki. Currently it seems there is no width and height stated as options for any of the diagrams, but in terms of context it does not feel right.

Maybe these properties could be prefixed to clarify the difference between the mkdocs-plugin and kroki (3rd-party) domain.