Giter Site home page Giter Site logo

Comments (4)

ggrossetie avatar ggrossetie commented on May 29, 2024

This is an integration issue with GitLab/Markdown. Kroki already supports it (see below).

You will need to open an issue at https://gitlab.com/gitlab-org/gitlab/-/issues to support sending diagram options to the Kroki server. Regarding which Markdown syntax we should use, I don't have a strong opinion. AsciiDoc has built-in support for attributes:

[d2,layout=elk]
....
# my diagram
....

Please note that TALA is a proprietary engine and is not included in Kroki. It might be possible to add it by extending the base image.

Default layout (diagre)

https://kroki.io/d2/svg/eNqlUj1vgzAQ3f0r7g-EpZuHSlW7MLRFSpgrC07BwsGWfTRCEf-9Z2MimlYZ2gF0H37P7-7Z2GOQcBEAoVMOJTh1xJjRZLA4jYa0M1wmP6KYxRjQS6j5D5cVgD7YYRYD0tn6XsLbEiRSsucIeEZj4BDjVGV6RVzShPnyVFv4AlmP7UerSK2N37TExixuyGD3yF01hJMmQv_v7vd85s9522AIlod6YYVQrfk6GKvnDUrYL8HtdM1k9NBm-ruj5fusJ2UkvA-MQ6hSmknrUuQdpDUXG7VxmI1U11kGG_aaPWTzPqMpT1UJ-xSL5GvEZBOL7Nur6hEaZczqbnEljacXpj_3spJYSdLupstD04G2sCt7WktRlxJaHZxR04-JNkdUE6Usjz7tP5C3Pe5aFToJD7yiL8hLBuk=

ELK layout

https://kroki.io/d2/svg/eNqlUj1vgzAQ3f0r7g-EpZuHSlW7MLRFSpgrC07BwsGWfTRCEf-9Z2MimlYZ2gF0H37P7-7Z2GOQcBEAoVMOJTh1xJjRZLA4jYa0M1wmP6KYxRjQS6j5D5cVgD7YYRYD0tn6XsLbEiRSsucIeEZj4BDjVGV6RVzShPnyVFv4AlmP7UerSK2N37TExixuyGD3yF01hJMmQv_v7vd85s9522AIlod6YYVQrfk6GKvnDUrYL8HtdM1k9NBm-ruj5fusJ2UkvA-MQ6hSmknrUuQdpDUXG7VxmI1U11kGG_aaPWTzPqMpT1UJ-xSL5GvEZBOL7Nur6hEaZczqbnEljacXpj_3spJYSdLupstD04G2sCt7WktRlxJaHZxR04-JNkdUE6Usjz7tP5C3Pe5aFToJD7yiL8hLBuk=?layout=elk

from kroki.

mak-dunkelziffer avatar mak-dunkelziffer commented on May 29, 2024

Thank's for the fast reply. Good to know that AsciiDoc supports this out of the box. I guess the chances to make a syntax change happen in Markdown are pretty slim. Instead, I opened an issue for D2 itself to make it possible to set those params within the diagram itself.

from kroki.

ggrossetie avatar ggrossetie commented on May 29, 2024

Using d2elk or d2tala could work but the integration will need to translate it to d2 using elk or tala layout engine.
It also does not scale very well if you want to add another option (i.e., d2talanoborder 😬)

I think it's a good idea to set those parameters within the diagram itself.

from kroki.

mak-dunkelziffer avatar mak-dunkelziffer commented on May 29, 2024

I actually tried d2elk and d2-elk and hoped that Kroki would just support one of those. But this approach really isn't feasible. D2 has too many CLI options. It has a theme option with ~20 options, a boolean sketch option, 3 layout engines. You simply can't support all possible combinations.

Also, having to specify the layout engine on the CLI is actually REALLY cumbersome, because the layout engines support slightly different features. Thus, your diagrams are not self-contained anymore, because they might use a feature, that only one layout engine understands and you need to guess that engine when compiling the diagram.

from kroki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.