Closed astrojuanlu closed 10 months ago
Looks like the pupetteer version pinned by mermaid-cli is quite old https://github.com/mermaid-js/mermaid-cli/issues/627
Upstream issue https://github.com/puppeteer/puppeteer/issues/10556
Ways we can try to fix this:
We'd need a package.json
for this https://github.com/mermaid-js/mermaid-cli/issues/627#issuecomment-1853769076
Or commit a pre-rendered PNG to the source tree and remind ourselves to re-render it when the source changes (which doesn't happen that often??)
I like that option TBH have never been a big fan of using Mermaid to build dynamic graphics when a PNG will do.
I want to make some changes to the docs that use the mermaid graphic anyway so will factor in a change to the graphics at the same time.
sphinxcontrib-mermaid doesn't seem to support static pre-rendering https://github.com/mgaitan/sphinxcontrib-mermaid/issues/134
I've been looking at tools for this like https://discourse.joplinapp.org/t/ability-to-save-export-mermaid-graphs-as-image/23491
Yeah we can actually take the output from build/html
and paste it in our images directory. There is a number of workarounds, but it looks like we'd lose the convenience of having the Mermaid code there.
We can put it in a comment though, right?
That's where my mind was right now...
Essentially we can call mermaid-cli ourselves once with these parameters, store the PNG under version control, and have the Mermaid code as a comment next to the diagram itself.
I'll send a PR with this.
Recently I've been spotting some intermittent failures caused by the Mermaid rendering:
https://readthedocs.org/projects/kedro/builds/22757197/