Commit 5de7289e authored by Guillaume Grossetie's avatar Guillaume Grossetie Committed by Guillaume Grossetie

Apply suggestions from reviewers

parent fc32fd2d
......@@ -3,7 +3,7 @@
.settings-header
%h4
= _('Kroki')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
= _('Allow rendering of diagrams in AsciiDoc and Markdown documents using %{link}.').html_safe % { link: link_to('Kroki', 'https://kroki.io', target: '_blank') }
......@@ -22,4 +22,4 @@
.form-text.text-muted
= (_('When Kroki is enabled, GitLab sends diagrams to an instance of Kroki to display them as images. You can use the free public cloud instance %{kroki_public_url} or you can %{install_link} on your own infrastructure. Once you\'ve installed Kroki, make sure to update the server URL to point to your instance.') % { kroki_public_url: '<code>https://kroki.io</code>', install_link: link_to('install Kroki', 'https://docs.kroki.io/kroki/setup/install/', target: '_blank') }).html_safe
= f.submit _('Save changes'), class: "btn btn-success"
= f.submit _('Save changes'), class: "btn gl-button btn-success"
# Kroki & GitLab
# Kroki diagrams
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44851) in GitLab x.y.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241744) in GitLab x.y.
When [Kroki](https://kroki.io) integration is enabled and configured in
GitLab we are able to create diagrams in AsciiDoc and Markdown documents.
GitLab you can use it to create diagrams in AsciiDoc and Markdown documents.
## Kroki Server
......@@ -14,15 +14,15 @@ Once you've installed Kroki, make sure to update the server URL to point to your
### Docker
With Docker, you can just run a container like this:
With Docker, run a container like this:
```shell
docker run -d --name kroki -p 8080:8000 yuzutech/kroki
```
The **Kroki URL** will be the hostname of the server running the container.
The **Kroki URL** is the hostname of the server running the container.
[`yuzutech/kroki`](https://hub.docker.com/r/yuzutech/kroki) image contains the following diagrams libraries out-of-the-box:
The [`yuzutech/kroki`](https://hub.docker.com/r/yuzutech/kroki) image contains the following diagrams libraries out-of-the-box:
- [Bytefield](https://bytefield-svg.deepsymmetry.org/)
- [Ditaa](http://ditaa.sourceforge.net)
......@@ -40,20 +40,21 @@ The **Kroki URL** will be the hostname of the server running the container.
If you want to use additional diagram libraries,
read the [Kroki installation](https://docs.kroki.io/kroki/setup/install/#_images) to learn how to start Kroki companion containers.
## GitLab
## Enable Kroki in GitLab **(CORE ONLY)**
You need to enable Kroki integration from Settings under Admin Area.
To do that, login with an Admin account and do following:
To do that, log in with an Admin account and follow these steps:
- In GitLab, go to **Admin Area > Settings > General**.
- Expand the **Kroki** section.
- Check **Enable Kroki** checkbox.
- Configure the **Kroki URL**.
1. Select the Admin Area (**{admin}**) icon.
1. Navigate to **Settings > General**.
1. Expand the **Kroki** section.
1. Select **Enable Kroki** checkbox.
1. Enter the **Kroki URL**.
## Creating Diagrams
## Create diagrams
With Kroki integration enabled and configured, we can start adding diagrams to
our AsciiDoc or Markdown documentation using delimited blocks:
With Kroki integration enabled and configured, you can start adding diagrams to
your AsciiDoc or Markdown documentation using delimited blocks:
- **Markdown**
......@@ -74,13 +75,13 @@ our AsciiDoc or Markdown documentation using delimited blocks:
....
```
The above blocks will be converted to an HTML image tag with source pointing to the
The above blocks are converted to an HTML image tag with source pointing to the
Kroki instance. If the Kroki server is correctly configured, this should
render a nice diagram instead of the block:
<img src="https://kroki.io/plantuml/svg/eNpzyk9S0LVTcMzJTE5VsFLISM3JyeeC8IDCTkBZoGAmANl1Cxw="/>
Kroki supports more than a dozen diagram libraries, here's a few examples:
Kroki supports more than a dozen diagram libraries. Here's a few examples:
**GraphViz**
......
......@@ -444,9 +444,9 @@ graph LR
Kroki supports more than a dozen diagram libraries.
To make Kroki available in GitLab, a GitLab administrator needs to enable it first.
Read more in [Kroki & GitLab](../administration/integration/kroki.md).
Read more in the [Kroki integration](../administration/integration/kroki.md) page.
Once enabled, you will be able to create a wide variety of diagrams in AsciiDoc and Markdown documents.
Once Kroki is enabled, you can create a wide variety of diagrams in AsciiDoc and Markdown documents.
Here's an example using a GraphViz diagram:
**AsciiDoc**
......
......@@ -235,7 +235,7 @@ To make PlantUML available in GitLab, a GitLab administrator needs to enable it
#### Kroki
To make Kroki available in GitLab, a GitLab administrator needs to enable it first.
Read more in [Kroki & GitLab](../administration/integration/kroki.md).
Read more in the [Kroki integration](../administration/integration/kroki.md) page.
### Emoji
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment