1.0.2 • Published 7 years ago

gitbook-plugin-plantuml-cloud v1.0.2

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
7 years ago

GitBook PlantUml Plugin

The plugin now supports two APIs for generating PlantUML diagrams:

Installation

  • Add the plugin to your book.json
{
  "plugins": ["plantuml-cloud"]
}
  • Install the plugin to you gitbook

$ gitbook install

  • No additional steps required

Configuration

  • If you do not add a plugin configuration to your book.json, then the following defaults will be used:
Configuration optionDescriptionDefault
umlPathPath to a directory where the generated images for the diagrams will be cached."assets/images/uml"
typeDetermines the type of the server side API"plantuml-service"
hostHost for the diagramming service"plantuml-service.herokuapp.com"
portPort number for the diagramming service80
protocolhttps or http"https"
pathURL Fragment which will be appended to the host part"/svg"
blockRegexRegular expression to select the diagramming text blocks.^uml((.*\n)+?)?$
  • If want to use the PlantUML Server API the following changes need to be made to the plugin configuration in your book.json:
{
  "plugins": ["plantuml-cloud"],
  "pluginsConfig": {
    "plantuml-cloud": {
      "protocol": "http",
      "type": "plantuml-server",
      "host": "www.plantuml.com",
      "path": "/plantuml/svg/"
    }
  }
}

The PlantUML Server API on plantuml.com expects the diagram text blocks in a special encoding. Look here for more information. To make this encoding work in this plugin it was necessary to include some code for the deflate operations. Look here for more information.

  • Make the plugin work with nodejs zlib deflate implementation and remove the duplicated deflate code.
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago