AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams
MIT License
50 stars 28 forks source link

Option for specifying the rendered Image Size #75

Open Valentyn1402 opened 4 months ago

Valentyn1402 commented 4 months 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 3 months 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 3 months ago

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

oniboni commented 3 months 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.