diff options
Diffstat (limited to 'doc/administration/integration/plantuml.md')
-rw-r--r-- | doc/administration/integration/plantuml.md | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/doc/administration/integration/plantuml.md b/doc/administration/integration/plantuml.md index 4af787fd19f..3372d05bd6b 100644 --- a/doc/administration/integration/plantuml.md +++ b/doc/administration/integration/plantuml.md @@ -4,7 +4,7 @@ When [PlantUML](https://plantuml.com) integration is enabled and configured in GitLab we are able to create simple diagrams in AsciiDoc and Markdown documents -created in snippets, wikis, and repos. +created in snippets, wikis, and repositories. ## PlantUML Server @@ -70,7 +70,7 @@ sudo service tomcat8 restart Once the Tomcat service restarts the PlantUML service will be ready and listening for requests on port 8080: -```text +```plaintext http://localhost:8080/plantuml ``` @@ -115,10 +115,23 @@ that, login with an Admin account and do following: - Check **Enable PlantUML** checkbox. - Set the PlantUML instance as `https://gitlab.example.com/-/plantuml/`. +NOTE: **Note:** If you are using a PlantUML server running v1.2020.9 and +above (for example, [plantuml.com](https://plantuml.com)), set the `PLANTUML_ENCODING` +environment variable to enable the `deflate` compression. On Omnibus, +this can be done set in `/etc/gitlab.rb`: + +```ruby +gitlab_rails['env'] = { 'PLANTUML_ENCODING' => 'deflate' } +``` + +From GitLab 13.1 and later, PlantUML integration now +[requires a header prefix in the URL](https://github.com/plantuml/plantuml/issues/117#issuecomment-6235450160) +to distinguish different encoding types. + ## Creating Diagrams With PlantUML integration enabled and configured, we can start adding diagrams to -our AsciiDoc snippets, wikis and repos using delimited blocks: +our AsciiDoc snippets, wikis, and repositories using delimited blocks: - **Markdown** @@ -131,7 +144,7 @@ our AsciiDoc snippets, wikis and repos using delimited blocks: - **AsciiDoc** - ```text + ```plaintext [plantuml, format="png", id="myDiagram", width="200px"] ---- Bob->Alice : hello @@ -141,7 +154,7 @@ our AsciiDoc snippets, wikis and repos using delimited blocks: - **reStructuredText** - ```text + ```plaintext .. plantuml:: :caption: Caption with **bold** and *italic* @@ -169,10 +182,10 @@ diagram delimiters `@startuml`/`@enduml` as these are replaced by the AsciiDoc ` Some parameters can be added to the AsciiDoc block definition: -- *format*: Can be either `png` or `svg`. Note that `svg` is not supported by +- `format`: Can be either `png` or `svg`. Note that `svg` is not supported by all browsers so use with care. The default is `png`. -- *id*: A CSS id added to the diagram HTML tag. -- *width*: Width attribute added to the image tag. -- *height*: Height attribute added to the image tag. +- `id`: A CSS ID added to the diagram HTML tag. +- `width`: Width attribute added to the image tag. +- `height`: Height attribute added to the image tag. Markdown does not support any parameters and will always use PNG format. |