Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flant/jekyll_remote_plantuml_plugin
Plugin for including local/remote PlantUML diagrams into your pages
https://github.com/flant/jekyll_remote_plantuml_plugin
diagram jekyll plantuml plugin
Last synced: about 2 months ago
JSON representation
Plugin for including local/remote PlantUML diagrams into your pages
- Host: GitHub
- URL: https://github.com/flant/jekyll_remote_plantuml_plugin
- Owner: flant
- License: mit
- Created: 2021-06-23T14:15:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-18T10:40:58.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T09:55:03.434Z (3 months ago)
- Topics: diagram, jekyll, plantuml, plugin
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/jekyll_remote_plantuml_plugin.svg)](https://badge.fury.io/rb/jekyll_remote_plantuml_plugin)
# Jekyll Remote PlantUML Plugin
The plugin includes local/remote PlantUML diagrams into your pages, works only with an external PlantUML server
(http://www.plantuml.com/plantuml by default) — PlantUML jar installed locally is not required.## Usage
To add a diagram to the page, use the `plantuml` tag:
```text
{% plantuml %}
Bob -> Alice : Hello
{% endplantuml %}
```The result will be the following html:
```html
```In case images are loaded during site rendering (see more in [Configuration section](#Configuration)):
```html
```The following list of tag parameters allows to set attributes for `div` and `img` tags:
- `div_class`
- `div_style`
- `img_class`
- `img_style`
- `img_width`
- `img_height`
- `img_alt`For example:
```text
{% plantuml div_style="text-align: center" img_alt="Diagram: Bob greets Alice" %}
Bob -> Alice : Hello
{% endplantuml %}
``````html
```## Configuration
In the Jekyll config (`_config.yml`), you can override the preset values and define defaults for the
image extension, div and img tags attributes.Below are the supported parameters and their defaults:
```yaml
plantuml:
provider: 'http://www.plantuml.com/plantuml'
# default format: svg or png
format: 'svg',
# load an image from the server during site rendering and only if
# the image does not already exist in the cache directory (disabled by default)
save_images_locally: false,
cache_dir: 'plantuml',
# default div tag attributes
div_class: 'plantuml',
div_style: ''
# default img tag attributes
img_class: 'plantuml'
img_style: ''
img_id: ''
img_width: ''
img_height: ''
img_alt: ''
```## Installation
Add this line to your application's Gemfile:
```ruby
gem 'jekyll_remote_plantuml_plugin'
```And this into your Jekyll config:
```yaml
plugins:
- jekyll_remote_plantuml_plugin
```Then execute:
```bash
bundle install
```## License
The gem is available as open-source under the terms of the [MIT License](https://opensource.org/licenses/MIT).