@Ash Manda has figured out how to switch from dot/graphviz to mermaid: https://github.com/IQSS/dataverse/compare/develop...srmanda-cs:dataverse:12408-move-docs-jenkins-builds
Should we do it?
It looks like we can pip install https://pypi.org/project/sphinxcontrib-mermaid/
I'm not opposed to it (gives us more options for graphs), but here are some thoughts.
Good points. One thing I'll say is that removing the need to install graphviz will simplify everything. I've seen people stumble on this.
Using a Javascript wrapper like Mermaid might give them trouble, too. Browsers are picky when it comes to loading Javascript when you access the built HTML pages via files:///.
If you're like me, always using sphinx-autobuild, this won't be a problem at all.
My two cents when it comes to hosting the docs specifically:
I do love Mermaid. I get a nice preview in VS Code.
@Ash Manda you might not be aware, but we will always need to run a Sphinx build anyway. It's not enough to just drop the RST (or MD) files someplace. Does any other static site hoster aside from ReadTheDocs do that for us?
Well, like you said I obviously don't have the full context of how this change will affect people.
But from my perspective. For a GitHub pages hosting, you need two YAML files that require on-going maintenance.
On Cloudflare, this is all I pasted into the deployment: cd doc/sphinx-guides && pip install -r requirements.txt && make html && make epub && cp build/epub/Dataverse.epub build/html and it just worked, and it auto-updates both master and develop without me touching it.
I couldn't do that with graphviz because a lot of these serverless environment don't support installation of dot for the build step.
Again, I'm not saying we shouldn't go for Mermaid. Just raising the point of let's not force people to download Javascript from a different server and the generated graphs need to be checked for compatibility with the bootstrap based Sphinx CSS
Absolutely! Just giving my two cents from where I'm standing. The final decision is always the teams'. Just here to offer perspectives
Said another way, you like that https://guides.dataverse.org/en/6.10.1/_images/graphviz-e1d7238a02d1da6a8a101ce4c3238e0edc4eb546.png is a PNG, right, @Oliver Bertuch? No CSS to deal with. The final output is a PNG.
The mermaid extension may use some wrapping HTML code that is not 100% compatible with our CSS. No matter if it's rendered as SVG or PNG.
right, right
For example when using a filename on a codeblock, the CSS all of a sudden makes it full width. ![]()
This completely brakes the layout of the page...
edge cases, right
Does Mermaid work when building a PDF? dot/graphviz works fine:
![]()
From "PDF (experimental!)" at https://dataverse-smr.pages.dev/versions#guides-versions
I do not believe it can. At least not natively like graphviz
Hmm. So maybe we should keep graphviz.
We could switch graphviz to the PlantUML model. With that tool we encourage doc writers to build the images locally and commit them (and the source) into the repo.
https://guides.dataverse.org/en/6.10.1/_images/3webservers.png comes from https://github.com/IQSS/dataverse/blob/v6.10.1/doc/Architecture/components.uml for example.
Also we really should avoid doing that as well - it would be good to just use a proper build chain for it and use sphinx contrib plantuml.
Also, whatever we do with Mermaid is also possible with PlantUML (with whatever it supports), but suffers from the same potential problems.
yeah, you're probably right
Looking at https://sphinxcontrib-mermaid-demo.readthedocs.io/en/latest/, it says that for non-HTML exports it uses the mermaid-cli tool. This may need installation.
huh, ok!
I mean, at a high level to we want to get down to one tool, mermaid, instead of the two we have now, dot/graphviz and plantuml?
or do we want MORE TOOLS?!?
Sounds fine to me. (Single tool)
I do admit that I sometimes had trouble with Mermaid when creating larger diagrams using C4. PlantUML felt like more controlable with regards to layout.
I should also mention that we could drop graphviz in favor of PlantUML, too.
Potentially Mermaid is good enough. ![]()
I think I only have one graphviz image, that API Guide one above. The rest are yours, @Oliver Bertuch:
da [label="Direct Dependency A"]msp [label="Maven Super POM"]Stuff like that. ^^
And I'm fine with moving my one thing to whatever, including PlantUML.
Last updated: May 30 2026 at 06:18 UTC