8000 Let the PlantUML code block embed the generated image instead of the PlantUML server request · Issue #2200 · google/docsy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Let the PlantUML code block embed the generated image instead of the PlantUML server request #2200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adlerzei opened this issue Mar 14, 2025 · 1 comment
Labels
enhancement New feature or request needs-triage

Comments

@adlerzei
Copy link

The PlantUML code block does not embed the generated image when building the page. Instead, the image is regenerated each time the page is fetched. This has two disadvantages:

Firstly, there is a lot of unnecessary traffic.

But more importantly, the PlantUML server may not be accessible from anywhere on the web. In our case, our PlantUML server is hosted on the corporate network. When our page is built, it can be accessed. But from anywhere outside our network, the PlantUML diagrams will not load.

It would be nice if there was an option to embed the generated image when building the page, rather than having the image generated when the page is visited.

@adlerzei adlerzei added enhancement New feature or request needs-triage labels Mar 14, 2025
@at055612
Copy link
Contributor

I had a similar issue of not wanting to call out to an external server for the puml conversion. The approach I took is to have the puml in separate .puml files. This is possibly better when you have large diagrams or want to open the .puml file in an IDE that can preview the puml.

I have a script to convert all the .puml files (that have a different sha1 since last run) into a .puml.svg file. The svgs are then just included in the docs as standard svg images. This script can be run before serving the site locally and as part of the CI build pipeline.

The script is not doing anything clever, but is here in case it is useful:
https://github.com/gchq/stroom-docs/blob/master/container_build/docker_puml/convert_puml_files.sh

However, I agree that for inline puml code blocks, the conversion should ideally happen at build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 3C69 needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants
0