diff options
author | Horacio Sanson <horacio@allm.net> | 2017-01-16 09:07:02 +0900 |
---|---|---|
committer | Horacio Sanson <horacio@allm.net> | 2017-02-03 08:49:48 +0900 |
commit | d9e9ad2211c06159914e0183e4842abc16e5666f (patch) | |
tree | ffa7e02948f10a42b42d33d3b568774c147bd98c /doc | |
parent | e7d530a624fbb8854047c3983eaa0972a19f36c8 (diff) | |
download | gitlab-ce-d9e9ad2211c06159914e0183e4842abc16e5666f.tar.gz |
PlantUML support for Markdown
Allow rendering of PlantUML diagrams in Markdown documents using fenced blocks:
```plantuml
Bob -> Sara : Hello
Sara -> Bob : Go away
```
Closes: #4048
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/integration/plantuml.md | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/administration/integration/plantuml.md b/doc/administration/integration/plantuml.md index e5cf592e0a6..6515b1a264a 100644 --- a/doc/administration/integration/plantuml.md +++ b/doc/administration/integration/plantuml.md @@ -3,8 +3,8 @@ > [Introduced][ce-7810] in GitLab 8.16. When [PlantUML](http://plantuml.com) integration is enabled and configured in -GitLab we are able to create simple diagrams in AsciiDoc documents created in -snippets, wikis, and repos. +GitLab we are able to create simple diagrams in AsciiDoc and Markdown documents +created in snippets, wikis, and repos. ## PlantUML Server @@ -54,7 +54,7 @@ that, login with an Admin account and do following: ## Creating Diagrams With PlantUML integration enabled and configured, we can start adding diagrams to -our AsciiDoc snippets, wikis and repos using blocks: +our AsciiDoc snippets, wikis and repos using delimited blocks: ``` [plantuml, format="png", id="myDiagram", width="200px"] @@ -64,7 +64,14 @@ Alice -> Bob : Go Away -- ``` -The above block will be converted to an HTML img tag with source pointing to the +And in Markdown using fenced code blocks: + + ```plantuml + Bob -> Alice : hello + Alice -> Bob : Go Away + ``` + +The above blocks will be converted to an HTML img tag with source pointing to the PlantUML instance. If the PlantUML server is correctly configured, this should render a nice diagram instead of the block: @@ -77,7 +84,7 @@ Inside the block you can add any of the supported diagrams by PlantUML such as and [Object](http://plantuml.com/object-diagram) diagrams. You do not need to use the PlantUML diagram delimiters `@startuml`/`@enduml` as these are replaced by the AsciiDoc `plantuml` block. -Some parameters can be added to the block definition: +Some parameters can be added to the AsciiDoc block definition: - *format*: Can be either `png` or `svg`. Note that `svg` is not supported by all browsers so use with care. The default is `png`. @@ -85,3 +92,4 @@ Some parameters can be added to the block definition: - *width*: Width attribute added to the img tag. - *height*: Height attribute added to the img tag. +Markdown does not support any parameters and will always use PNG format. |