Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support view attribute for Structurizr docs rendered with Kroki #418

Open
timw opened this issue Jun 27, 2023 · 2 comments
Open

Support view attribute for Structurizr docs rendered with Kroki #418

timw opened this issue Jun 27, 2023 · 2 comments
Labels
👶 good first issue Good for newcomers 🍩 enhancement New feature or request 👋 help wanted

Comments

@timw
Copy link

timw commented Jun 27, 2023

Using asciidoctor-vscode to render Asciidoc with Structurizr diagrams containing multiple views, only the last view defined in the Structurizr diagram is rendered in the preview.

With a large Structurizr workspace (which might commonly be managed in an external file to the Asciidoc) there will be many views, so these aren't rendered correctly in the preview.

Asciidoctor-diagram defines the view attribute 1 for specifying the view to render.
Kroki defines the view-key option 2 to specify the view to render for Structurizr inputs.

It would be great if the renderer could map the standard view attribute on the diagram block to the Kroki view-key option so these diagrams are rendered correctly in previews.

@jrauschenbusch
Copy link

I made it with this in my Antora project:

structurizr::example$system.dsl[renderer="mermaid",view-key="Containers"]

view-key is of course not the property specified for AsciiDoctor Diagram, but it works for me. Kroki now get's the query param it expects.

@ggrossetie
Copy link
Member

I guess Kroki (server) could support both. Not sure if it's better to convert view to view-key in the extension or support both options in Kroki... 🤔

I guess view-key should have a higher precedence (since it's the "long-form").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👶 good first issue Good for newcomers 🍩 enhancement New feature or request 👋 help wanted
Projects
None yet
Development

No branches or pull requests

3 participants