Skip to content
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

Support for Mermaid diagrams #6811

Open
basil opened this issue Nov 3, 2023 · 1 comment
Open

Support for Mermaid diagrams #6811

basil opened this issue Nov 3, 2023 · 1 comment

Comments

@basil
Copy link
Contributor

basil commented Nov 3, 2023

Suggestion

In #6809 I tried to include a Gantt chart via Mermaid and asciidoctor-diagram, but it wasn't practical. Even after adding asciidoctor-diagram to Gemfile and after adding @mermaid-js/mermaid-cli to package.json, I still ran into a number of issues. For one, there was no straightforward way to enable the asciidoctor-diagram extension from Awestruct. But even after hacking around this, I ran into a fundamental problem. asciidoctor-diagram requires the mmdc tool from mermaid-cli to be installed when it is running, but that is a JavaScript (not Ruby) package, and our build currently has separate stages and separate Docker environments for JavaScript and Ruby, so each environment is unavailable from the other. This does keep the build nice and simple by allowing us to use unmodified upstream Docker images, in contrast to having to maintain an omnibus build environment ourselves with every possible tool installed. But it also means that the Ruby environment running asciidoctor has no access to the JavaScript environment with mermaid-cli.

I worked around this issue in #6809 by running asciidoctor-diagram locally with its SVG backend to generate rendered SVG versions of the Gantt charts, which I included in that PR. But in the future it would be nice to be able to automatically render Mermaid markup. This would likely involve some deeper changes to the build.

Links

No response

@zbynek
Copy link
Contributor

zbynek commented Nov 3, 2023

Ssince your usecase involved writing a blog post, it would be useful to know whether/when will the blog be split from the main site as suggested in #5474 (comment) (I'd imagine having all tools Node.js-based would simplify Mermaid integration a lot).

in contrast to having to maintain an omnibus build environment ourselves with every possible tool installed.

btw. the infra.ci builds are done using such omnibus image which overrides the use of dockerized Node and Ruby using env variables to use its own Node version 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants