Bug 33 - Documentation: render Excalidraw diagrams on build
Summary: Documentation: render Excalidraw diagrams on build
Status: CONFIRMED
Alias: None
Product: passt
Classification: Unclassified
Component: build (show other bugs)
Version: unspecified
Hardware: All Linux
: Low feature
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2022-10-27 19:36 UTC by Stefano Brivio
Modified: 2023-07-04 20:03 UTC (History)
1 user (show)

See Also:


Attachments

Description Stefano Brivio 2022-10-27 19:36:04 UTC
Right now the Excalidraw diagrams from the homepage are rendered manually upon
need, and I'm just keeping the output around. There are some separate renderers
available now: get one to work and run that during the build process, or from
git hooks.
Comment 1 KuhnChris 2023-07-04 16:47:17 UTC
Well... i tried excalidraw-cli, but the docker image for that would need to be built by hand, or, optionally, have a nodejs/javascript environment on the deployment machine...
One quick alternative I found was kroki-cli, which basically uses the kroki demo server, or you self-host a kroki server, and converts excalidraw drawings. 
Drawback here is, it only converts from .excalidraw to .svg, so we need imagemagick or something similar to convert .svg to .png then.
Comment 2 Stefano Brivio 2023-07-04 20:03:44 UTC
Actually, I could run excalidraw-cli on the server -- I actually did that, installing it via npm. But then I ran into the issue that the fonts are not picked properly... I couldn't get a proper rendering with it.

If we manage to solve that (perhaps fixing stuff in excalidraw-cli?) then I think a functioning Node.js/npm environment is a reasonable dependency to have.

I also found kroki but didn't try it, because it looks like we would rely on specific container images. :/ ImageMagick is pretty much universally available, and we could even keep the output as SVG, so that part wouldn't really be an issue.

Note You need to log in before you can comment on or make changes to this bug.