Jekyll Plantuml banner
yegor256 yegor256

Jekyll Plantuml

Development community

Description

PlantUML plugin for Jekyll: helps you embed UML diagrams into static pages

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

PlantUML Diagrams in Jekyll Static Sites

[![DevOps By Rultor.com][rultor-badge]][rultor] [![We recommend RubyMine][rubymine-badge]][rubymine]

[![rake][rake-badge]][rake] [![Gem Version][gem-badge]][gem] [![Test Coverage][codecov-badge]][codecov]

Install it first:

gem install jekyll-plantuml

With Jekyll 2, simply add the gem to your `_config.yml` gems list:

gems: ['jekyll-plantuml', ... your other plugins]

Or for previous versions, create a plugin file within your Jekyll project's `_plugins` directory:

# _plugins/plantuml-plugin.rb
require "jekyll-plantuml"

We highly recommend using Bundler. If you're using it, add this line to your `Gemfile`:

gem "jekyll-plantuml"

The plugin is compatible with [Jekyll 3.9.3][jekyll-3] and [Jekyll 4.3.2][jekyll-4]. You can find our [integration tests][test-jekylls], which prove the compatibility.

Install plantuml.jar

Then, make sure [PlantUML][plantuml] is installed on your build machine, and can be executed with a simple `plantuml` command.

On Ubuntu, just `apt-get install -y plantuml` should work. However, if it doesn't, you can create a `/usr/bin/plantuml` with the following content:

#!/usr/bin/env bash
java -jar /home/user/Downloads/plantuml.jar "$1" "$2"

Remember to change the path to the `plantuml.jar` file.

Then, set the executable permission of the file:

chmod +x /usr/bin/plantuml

Test

Now, it's time to create a diagram in your Jekyll blog page:

{% plantuml %}
[First] - [Second]
{% endplantuml %}

You can also include a file:

{% plantuml_file foo.uml %}

Now, check [this blog post][blog-post]: the UML sequence diagram in it is auto-generated using exactly this plugin. The sources of the blog are available in [GitHub][blog-sources].

How to contribute

Read [these guidelines][guidelines]. Make sure your build is green before you contribute your pull request. You will need to have [Ruby][ruby] 2.3