Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-plugin-plantuml-svg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-plantuml-svg

Inject PlantUML into gitbook as SVG

  • 1.0.1-alpha.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

gitbook-plugin-plantuml-svg

Inject PlantUML into GitBook as an SVG element.

NPM Travis CI Coveralls

This is inspired by dy93's work plugin-plantuml-cloud. There're already several PlantUML plugins for GitBook out there. However, most of them relies on a local PlantUML & Graphviz.

The plugin-plantuml-cloud uses the public PlantUML services. It saves people's effort to maintain the local plantuml.jar.

This plugin makes 2 additional improvements

  1. Insert <object data="..." type="image/svg+xml"> instead of <img>, so that the links in SVG still work.
  2. Support standalone PlantUML file.

Setup

# With NPM
$ npm install gitbook-plugin-plantuml-svg

# With Yarn
$ yarn add gitbook-plugin-plantuml-svg

In your book.json, add plantuml-svg to the plugin list

{
  "plugins": ["plantuml-svg"]
}

Usage

Standalone PlantUML file

Say, you have graph/my-chart.puml.

@startuml
object Hello
object World
Hello --> World
@enduml

In your Markdown document, put following lines.

{% uml src="graph/my-chart.puml" %}
{% enduml %}

By default, the file path is relative to the project root. If you want the path to be relative to current document, do

{% uml src="graph/my-chart.puml", relativeTo=file %}
{% enduml %}
Inline PlantUML

The standalone PlantUML file is recommended for large graphs. However, for simple graphs, you can also use inline plugin PlantUML.

{% uml %}
@startuml
object Hello
object World
Hello --> World
@enduml
{% enduml %}

Keywords

FAQs

Package last updated on 03 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc