AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams
MIT License
41 stars 27 forks source link

Downloaded images from a structurizr file all get the same filename #41

Closed BasKloetIS closed 6 months ago

BasKloetIS commented 1 year ago

With structurizr a single file can contain multiple views, which can be turned into multiple images, for example:

```kroki-structurizr view-key=SystemContext
@from_file:diagrams/structurizr.dsl
```kroki-structurizr view-key=Component1
@from_file:diagrams/structurizr.dsl

The current image name that is generated does not take this 'view-key' into account. This means that all images that are generated in a page get the same name (and contents).

My suggestion would be to add the 'kroki_diagram_options' as an parameter to the _kroki_filename function and use that to calculate a unique digest.

I created a PR that should fix this issue.