Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

onewelcome/gitbook-plugin-websequencediagrams-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websequencediagrams.com integration for GitBook

This plugin retrieves the diagram as image when the Gitbook is built.

Adding the plugin to a Gitbook project

Install plugin as npm dependency

npm install gitbook-plugin-websequencediagrams-generator --save

Add the plugin to book.json config

{
    "plugins": [ "websequencediagrams-generator"]
}

Optional configuration

  • websequencediagrams-generator-directory: The directory where the images are saved. Default value: diagrams.
  • websequencediagrams-generator-image-prefix: Filename prefix of the generated images. Default value: diagram-.

Using the plugin

Add a fragment in the syntax of websequencediagrams.com to your book, for example:

{% websd style="rose" %}
title Authentication Sequence

Alice->Bob: Authentication Request
note right of Bob: Bob thinks about it
Bob->Alice: Authentication Response
{% endwebsd %}

The style parameter is optional, and defaults to "default" if not set.

Test the plugin

Run the following command to test the generation of the diagram:

npm test

It saves an image in the testoutput directory.

About

Render diagrams from websequencediagrams.com in gitbook

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%