question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gitbook-plugin-uml not work properly

See original GitHub issue

Summary

gitbook-plugin-uml, a plugin that renders plantuml diagram, does not work properly on HonKit. This is a problem of not the plugin but HonKit because it works on gitbook-cli.

  • HonKit version: 3.5.0

Step to reproduce

  1. npm init --yes
  2. npm install honkit --save-dev
  3. npx honkit init
  4. npm install gitbook-plugin-uml --save-dev
  5. edit book.json
  6. edit README.md
  7. npx honkit serve
  • Link to code example:

book.json

{
    "plugins": ["uml"]
}

README.md

```uml
@startuml

/'
  Comment
 '/

	Class Stage
	Class Timeout {
		+constructor:function(cfg)
		+timeout:function(ctx)
		+overdue:function(ctx)
		+stage: Stage
	}
 	Stage <|-- Timeout

@enduml
```

I guess a plantuml source including special characters like / failed to be rendered.

Expected results

The diagram would be rendered.

Actual results

An image that says there is an error appears.

$ npx honkit build --log=debug
debug: readme found at README.md 
debug: summary file found at SUMMARY.md 
debug: cleanup folder "/home/elferia/honkit-uml/_book" 
info: 6 plugins are installed 
info: 6 explicitly listed 
info: plugin "uml is loaded
info: plugin "highlight is loaded
info: plugin "search is loaded
info: plugin "lunr is loaded
info: plugin "fontsettings is loaded
info: plugin "theme-default is loaded
info: found 1 pages 
info: found 5 asset files 
debug: calling hook "config" 
debug: calling hook "init" 
warn: "book" property is deprecated, use "this" directly instead 
debug: copy assets from theme /home/elferia/honkit-uml/node_modules/@honkit/honkit-plugin-theme-default/_assets/website 
debug: copy resources from plugin /home/elferia/honkit-uml/node_modules/gitbook-plugin-fontsettings/assets 
debug: copy resources from plugin /home/elferia/honkit-uml/node_modules/gitbook-plugin-lunr/assets 
debug: copy resources from plugin /home/elferia/honkit-uml/node_modules/gitbook-plugin-search/assets 
debug: copy resources from plugin /home/elferia/honkit-uml/node_modules/gitbook-plugin-highlight/css 
debug: copy asset "assets/images/uml/65902d3d2519f65a9fe3a4e91401058002521178.svg" 
debug: copy asset "assets/images/uml/67802308346393fc5d1d4a0e1efc555904eb64ba.svg" 
debug: copy asset "assets/images/uml/c3c103d2bede49665226ff9cc9acb9a330da3174.svg" 
debug: copy asset "package-lock.json" 
debug: copy asset "package.json" 
debug: calling hook "finish:before" 
debug: calling hook "finish" 
debug: write search index 
info: >> generation finished with success in 0.4s !

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
elferiacommented, Jul 3, 2020

Hi

Workaround 2 looks better so I tried, but not worked. Diagrams are ignored, even error images are not rendered. I guess ansanloms/honkit-plugin-uml does not support syntax like

```uml
@startuml

as well as gitbook-plugin-puml-aleung, but not tested.

So I tried Workaround 1, then the diagrams rendered successfully. But other problems occurred. It it not proper to discuss other problems here, but I would like to report. For example, markdown as below will not be rendered as expected:

~~~md
 ```mermaid
 graph TD;
   A-->B;
   A-->C;
   B-->D;
   C-->D;
 ```
~~~

I would like to report this as another issue and hope to be fixed, but I cannot afford. I will try HonKit again in the future. Thank you.

0reactions
azucommented, Jul 6, 2020

Thanks to confirm! 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin.yml not working - Forums - Bukkit.org
So basically I've made a plugin that you would have to type /hello how was your day Then you would receive the answer...
Read more >
Jar does not contain plugin.yml · Issue #1186 - GitHub
The first and only plugin I installed was PlotSquared-Core-3.4.1-ae5e15e.jar, got this error message and can't load up the plugin. Make sure you ...
Read more >
Overriding a GitBook theme - stevemar.net
A few quick notes on how to customize the default GitBook theme.
Read more >
Why isn't my plugin.yml loading? Bukkit - Stack Overflow
In the YAML file you need to fill in the command properties. name: PluginH main: PluginH. ... You're not indenting the plugin.yml properly....
Read more >
yq - GitBook
a lightweight and portable command-line YAML processor. yq uses jq like syntax but works with yaml files as well as json. It doesn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found