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

Add Kroki renderer #1900

Merged
merged 2 commits into from May 17, 2020
Merged

Add Kroki renderer #1900

merged 2 commits into from May 17, 2020

Conversation

rlanyi
Copy link
Contributor

@rlanyi rlanyi commented May 17, 2020

This pull request adds support for https://kroki.io/ that can be used to generate diagrams from many different kinds of formats. It can be used as a replacement of the already existing PlantUML renderer and many other formats like GraphViz, Nomnoml, Mermaid and others.

The implementation is based on the PlantUML renderer. There's an important difference in the way it can be used: in the first line of the diagram definition the selected format must be entered.

Markdown Example 1:

```kroki
mermaid
graph TD
  A[ Anyone ] -->|Can help | B( Go to github.com/yuzutech/kroki )
  B --> C{ How to contribute? }
  C --> D[ Reporting bugs ]
  C --> E[ Sharing ideas ]
  C --> F[ Advocating ]
```

Markdown Example 2:

```kroki
plantuml
skinparam monochrome true
skinparam ranksep 20
skinparam dpi 150
skinparam arrowThickness 0.7
skinparam packageTitleAlignment left
skinparam usecaseBorderThickness 0.4
skinparam defaultFontSize 12
skinparam rectangleBorderThickness 1

rectangle "Main" {
  (main.view)
  (singleton)
}
rectangle "Base" {
  (base.component)
  (component)
  (model)
}
rectangle "<b>main.ts</b>" as main_ts

(component) ..> (base.component)
main_ts ==> (main.view)
(main.view) --> (component)
(main.view) ...> (singleton)
(singleton) ---> (model)
```

@auto-assign auto-assign bot requested a review from NGPixel May 17, 2020 20:20
@NGPixel NGPixel merged this pull request into requarks:latest May 17, 2020
NGPixel added a commit that referenced this pull request May 17, 2020
* feat: Kroki integration

see https://kroki.io/

* fix: markdown-kroki def updates

Co-authored-by: Nicolas Giard <github@ngpixel.com>
@NGPixel
Copy link
Member

NGPixel commented May 17, 2020

Thanks! Just make sure your PRs are against the master branch next time, not latest.

@kbfifi
Copy link

kbfifi commented May 21, 2020

I'm excited to see so much support for text generated diagrams! Will it be possible to to configure WikiJS so that one can use a self managed Kroki docker-compose server as described here?

@NGPixel
Copy link
Member

NGPixel commented May 21, 2020

@kbfifi Yes, you can define the server URL you want to use.

@rlanyi rlanyi deleted the feature/kroki branch June 5, 2020 21:08
@elmorejd
Copy link

@kbfifi would you update Mermaid from 8.8.2 to the latest 10.7 or close to?
https://github.com/mermaid-js/mermaid
Would really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants