1.0.29 • Published 6 years ago

gitbook-plugin-plantuml-cloud-languages v1.0.29

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

GitBook PlantUml Plugin with Cloud and Language Support

This is a plugin for Gitbook to support PlantUML diagrams inside Markdown/Asciidoc documents. It doesn't need a local java running process. It does a call to a PlantUML server to render the graph.

Added new parameters: language, host's port and output format

  • Added support for asciidoc.
  • Added support for plantuml running in another server's port
  • Added support for other output format (generated file extension)

Package published at gitbook-plugin-plantuml-cloud-languages

The plugin now supports two APIs for generating PlantUML diagrams:

NPM Installation

$ npm install gitbook-plugin-plantuml-cloud-languages

Gitbook Installation

  • Add the plugin to your book.json
{
  "plugins": ["plantuml-cloud-languages"]
}
  • 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"
portHost's port"80"
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)+?)?$
languageWhich language will be generated. Supports "asciidoc""markdown"
formatFile output format. Examples: "svg" or "png". You may have to sync with the path parameter above."svg"
  • 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-languages"],
  "pluginsConfig": {
    "plantuml-cloud-languages": {
      "protocol": "http",
      "type": "plantuml-server",
      "host": "www.plantuml.com",
      "port": "80",
      "path": "/plantuml/svg/",
      "language": "asciidoc",
      "format": "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.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago