{"id":16237597,"url":"https://github.com/vowstar/gitbook-plugin-uml","last_synced_at":"2025-03-16T12:32:34.881Z","repository":{"id":12245856,"uuid":"71321213","full_name":"vowstar/gitbook-plugin-uml","owner":"vowstar","description":"PlantUml plugin of gitbook/honkit which can draw UML graph in both markdown HTML and PDF","archived":false,"fork":false,"pushed_at":"2024-04-03T08:30:04.000Z","size":1254,"stargazers_count":32,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T19:03:03.453Z","etag":null,"topics":["gitbook","honkit","honkit-plugin","plantuml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vowstar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-19T05:13:31.000Z","updated_at":"2024-06-10T12:48:00.235Z","dependencies_parsed_at":"2023-01-11T18:16:46.023Z","dependency_job_id":"46337e1f-4ba6-4939-9a80-04c22fdd8c78","html_url":"https://github.com/vowstar/gitbook-plugin-uml","commit_stats":{"total_commits":138,"total_committers":14,"mean_commits":9.857142857142858,"dds":"0.21739130434782605","last_synced_commit":"b60c59765fd5ac0ab85326953ce7edd4c12e6231"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-uml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-uml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-uml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-uml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vowstar","download_url":"https://codeload.github.com/vowstar/gitbook-plugin-uml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814893,"owners_count":20352038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitbook","honkit","honkit-plugin","plantuml"],"created_at":"2024-10-10T13:36:17.982Z","updated_at":"2025-03-16T12:32:34.624Z","avatar_url":"https://github.com/vowstar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitbook-plugin-uml\n\n[![Build Status](https://github.com/vowstar/gitbook-plugin-uml/actions/workflows/test.yml/badge.svg)](https://github.com/vowstar/gitbook-plugin-uml/actions)\n[![Coverage Status](https://coveralls.io/repos/github/vowstar/gitbook-plugin-uml/badge.svg?branch=master)](https://coveralls.io/github/vowstar/gitbook-plugin-uml?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/gitbook-plugin-uml.svg?style=flat)](https://www.npmjs.org/package/gitbook-plugin-uml)\n[![NPM Downloads](https://img.shields.io/npm/dm/gitbook-plugin-uml.svg?style=flat)](https://www.npmjs.org/package/gitbook-plugin-uml)\n\n[PlantUml](http://www.plantuml.com/) Plugin for [Honkit](https://github.com/honkit/honkit) ~~and [GitBook](https://github.com/GitbookIO/gitbook)~~.\n\nThis is a sample plugin for ~~GitBook~~ Honkit and is specially adapted for ~~GitBook~~ Honkit from [PlantUML](http://www.plantuml.com/index.html). ~~Gitbook~~ Honkit PlantUml plugin is used to select from markdown uml and converting it into a picture format svg.\n\n## Installation\n\nInstall honkit instead of gitbook-cli(deprecated).\n\nInstall JRE or JDK please. Ensure your system have java.\n\nIt will download plantuml jar file automatically, so in some country and region you must install it behind a proxy, or it will download fail.\n\nGitbook PlantUml plugin can be installed from NPM using:\n\n```bash\nnpm install gitbook-plugin-uml\n```\n\nAdd this plugin into ``book.json``.\n\n```json\n{\n  \"plugins\": [\"uml\"]\n}\n```\n\n## FAQ\n\nImportant:\n\n** Please ensure your system have java!!! Or this plugin may not work, and get ```Error: spawn java ENOENT```\n\n** It will download plantuml jar file automatically, so in some country and region you must install it behind a proxy, or it will download fail.\n\n## Features\n\n* Support HTML, PDF, EPUB output(make sure your gitbook support SVG)\n* Support `` ``` ``flow code block quote\n* Multi code style support\n\n## Beautiful UML\n\n![ARCHIMATE](http://www.plantuml.com/plantuml/png/fLLDRzim33rFlqBeXc4Ru0uOi4kH1VNIjScXdR40EVN2saoYrQ8CIMvNRFtle-puAqk3fiiX2KNoYO-ao5FdmVfIvyBTAYh0WfOMKm-qod4qki4rt2bZnsFvMxoofgHiOYoXbPy-YqVX2giyoZStYJKfEYT_WZq1cwwL1eyVRqgdY8-ZebQtzZ17UwTItBA7eiXL2buPYbnjqRbCZ2uC8VazJcbZ8qHBGXvDWJB-JNDG-aXAS78waQDH6_LuF23w-kicx3x610fVMfGpMXghgzjggCdiKAWhuzNouPhYB5C11t8vzt2BQvDdQDrHGBsAvuV2BY1N6IUaybySwZsZEtHUhHg0Wraby50v9izo55o13r5cxYdY3FObPjuN5trXO9W8mRcFh5gjVSJWmJ6ahJjPY4LFcec-TJBea7aAH8fM5GEt4GAHfb6tYSHTqmswf7JUQ7uTa6bIpjjDep1gkb75cLQTwYLtX3Pskswe5F-BdrX5_aNikGDqU9xFT1HjdgEoYCQX3Px8KSzW5yLQ6yg_HxtOfvo99lPQvkPeqz2uRnqC--VCf6NmlwPB85XX_N_-u3pggZPdbzLxxeROdW9V8CzNoAzfykDo0CBoFo1FeamvaVAjZE-1HqrYsAGQENts5UWqJk9dXpO0FLS4bAeGwIxSynsuMnqGid9S5iT_nksZwvyrAHU1-EPiTuk8YaLZigFGeWgdmQsBBKIEAwHCvhZqujilq0LpN5gZfLypsJYi65TQ9idB0nnAvykCfzoxxmNI1I_3ulsnc2EAB_mHlQadJvhD9vlDjp5f7uOyaRt59PjjrvXrITiox3OSXgKMuXUd_1Ks-5y0)\n\n![WAVEFORM](http://www.plantuml.com/plantuml/png/VP5H2vim4CVVxrCSxd6K6QM3oHYkjDrx7zR74SsjXgPQabYxRx-SjaOPJ13k_lVB_tANqdbfVNypu6ff2BSe7OfjYdVz9EC0QjFLLwpD5GVj6xoJrPr20PLkfVs32RMoCfJmCMfdzVJfF4fsc2KblSIVqcWrLjG3wgwjjQEfjElTf5THbqfPSWwhLurpWF8pnyLWjQTV5LsW5Eb2eLP1aBQZP4cg5_Cb2em49WLgKJiqtG2guYX9dsa2tEQTvRyJiCDCFJXAmzdOVfC3JZwDlZIhIWOu--uFt_Uxm-6Oh0ZniXHBbHk-xRXLd6jzaobQr3yA9lu_KPOdl9wC7UOxYppYn_0nagtM4zjbOcKDx632xp5EWBvRF0T--D4PLPmvZ_Zq5ZFDoGIFrPtfgJW53KAtrSRmw-ORBeR60Xtv_evUt-WVEB0y_6f9uKGJBWHboFgR-Gi0)\n\n## How to use it\n\nTo include a PlantUML diagram, just wrap your definition in a \"uml\" code block. For example:\n\n![UML](./images/uml.png)\n\n*Text format uml:*\n\n\u003cpre\u003e\u003ccode\u003e```uml\n@startuml\n\n\tClass Stage\n\tClass Timeout {\n\t\t+constructor:function(cfg)\n\t\t+timeout:function(ctx)\n\t\t+overdue:function(ctx)\n\t\t+stage: Stage\n\t}\n \tStage \u0026lt;|-- Timeout\n\n@enduml\n```\n\u003c/code\u003e\u003c/pre\u003e\n\nAnd what's more, ```puml``` and ```plantuml``` code block also OK.\n\n\u003cpre\u003e\u003ccode\u003e```puml\n@startuml\n\n\tClass Stage\n\tClass Timeout {\n\t\t+constructor:function(cfg)\n\t\t+timeout:function(ctx)\n\t\t+overdue:function(ctx)\n\t\t+stage: Stage\n\t}\n \tStage \u0026lt;|-- Timeout\n\n@enduml\n```\n\u003c/code\u003e\u003c/pre\u003e\n\nAlso you can put in your book block as\n\n```markdown\n{% uml %}\n@startuml\n\n\tClass Stage\n\tClass Timeout {\n\t\t+constructor:function(cfg)\n\t\t+timeout:function(ctx)\n\t\t+overdue:function(ctx)\n\t\t+stage: Stage\n\t}\n \tStage \u0026lt;|-- Timeout\n\n@enduml\n{% enduml %}\n```\n\nThe block syntax also allows for a `src` attribute to import an external PlantUml file.\n\n```text\n{% uml src=\"test.plantuml\" %}{% enduml %}\n```\n\nOf course, you can also pass the parameters like this.\n\n\u003cpre\u003e\u003ccode\u003e```puml { src=\"test.plantuml\" }\n```\n\u003c/code\u003e\u003c/pre\u003e\n\n## Configuration\n\nbook.json add the uml options\n\nConfigure plugin in `book.json`.\n\n```json\n\"pluginsConfig\": {\n  \"uml\": {\n    \"format\": \"png\",\n    \"nailgun\": false\n  }\n}\n```\n\n## Build and serve\n\nThis plugin only works in your local machine. You need to play with local `gitbook` (command-line tool) to pre-compile all uml images.\n\n```terminal\ngitbook serve yourbook\n```\n\nor\n\n```terminal\ngitbook build yourbook\n```\n\n## Additional requirements\n\nFor Mac OS X users. Install *graphviz* package.\n\n```bash\nbrew install graphviz\n```\n\nFor Linux users, Install *graphviz* package.\n\n```bash\nsudo apt install graphviz\n```\n\n```bash\nsudo yum install graphviz\n```\n\nDebian/Ubuntu users may need install ``default-jre`` prevent Error: spawn java ENOENT.\n\n```bash\nsudo apt-get install default-jre\n```\n\n## Thanks\n\nThis plugin original from [lyhcode/gitbook-plugin-plantuml](https://github.com/lyhcode/gitbook-plugin-plantuml)\n\n## See also\n\nThese plugins are also available on honkit.\n\n|                                    Plugin                                     |                      Description                       |\n| ----------------------------------------------------------------------------- | ------------------------------------------------------ |\n| [gitbook-plugin-uml](https://github.com/vowstar/gitbook-plugin-uml)           | A plug-in that use plantuml to draw beautiful pictures |\n| [gitbook-plugin-wavedrom](https://github.com/vowstar/gitbook-plugin-wavedrom) | A plug-in that can draw waveforms and register tables  |\n| [gitbook-plugin-sequence](https://github.com/vowstar/gitbook-plugin-sequence) | A plug-in that can draw sequence diagrams              |\n| [gitbook-plugin-flow](https://github.com/vowstar/gitbook-plugin-flow)         | A plug-in that can draw flowchart.js diagrams          |\n| [gitbook-plugin-echarts](https://github.com/vowstar/gitbook-plugin-echarts)   | A plug-in that can draw various charts such as bar/pie |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowstar%2Fgitbook-plugin-uml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvowstar%2Fgitbook-plugin-uml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowstar%2Fgitbook-plugin-uml/lists"}