The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,180 other subscribers

git – How to integrate UML diagrams into GitLab or GitHub – Stack Overflow

Posted by jpluimers on 2018/12/05

Note that as of somewhere in 2022, GitLab now natively supports PlantUML (even embedded in files like markdown and asciidoc), so here are the updated saved links to the StackOverflow question below: [Wayback/Archive]


Interesting solution: [WayBack/Archive] git – How to integrate UML diagrams into GitLab or GitHub – Stack Overflow (thanks [Wayback/Archive] joanq and [Wayback/Archive] Fuhrmanator)

GitLab support for PlantUML

Example:

Documentation:

  • [Wayback/Archive] Snippets | GitLab
  • [Wayback/Archive] PlantUML and GitLab | GitLab

    When the PlantUML integration is enabled and configured in GitLab, you can create diagrams in snippets, wikis, and repositories. This integration is enabled on GitLab.com for all SaaS users and does not require any additional configuration.

    After completing the integration, PlantUML converts plantuml blocks to an HTML image tag, with the source pointing to the PlantUML instance. The PlantUML diagram delimiters @startuml/@enduml aren’t required, as these are replaced by the plantuml block:

    • Markdown files with the extension .md:
      ```plantuml
      Bob -> Alice : hello
      Alice -> Bob : hi
      ```
      

      For additional acceptable extensions, review the languages.yaml file.

    • AsciiDoc files with the extension .asciidoc.adoc, or .asc:
      [plantuml, format="png", id="myDiagram", width="200px"]
      ----
      Bob->Alice : hello
      Alice -> Bob : hi
      ----
      
    • reStructuredText
      .. plantuml::
         :caption: Caption with **bold** and *italic*
      
         Bob -> Alice: hello
         Alice -> Bob: hi
      

      Although you can use the uml:: directive for compatibility with sphinxcontrib-plantuml, GitLab supports only the caption option.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: