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

Diagrams as code in Sphinx documentation #908

Closed
fabcor-maxiv opened this issue Mar 21, 2024 · 5 comments · Fixed by #954
Closed

Diagrams as code in Sphinx documentation #908

fabcor-maxiv opened this issue Mar 21, 2024 · 5 comments · Fixed by #954
Assignees

Comments

@fabcor-maxiv
Copy link
Contributor

fabcor-maxiv commented Mar 21, 2024

It could be nice to be able to have diagrams as code in the documentation.
The source code for the diagram itself would be stored as text/code inside the Markdown or ReStructuredText document within a directive.

Possible technical solutions:

@fabcor-maxiv
Copy link
Contributor Author

See the discussion that initiated this: #889 (comment)

@fabcor-maxiv
Copy link
Contributor Author

fabcor-maxiv commented Jul 2, 2024

I guess we should avoid Mermaid-based solutions for now. Mermaid is a Node.js tool, and mxcubecore has no dependency on Node.js. Same for D2, which is a Golang tool.

@fabcor-maxiv fabcor-maxiv self-assigned this Jul 2, 2024
@marcus-oscarsson
Copy link
Member

Very nice :). Mermaid seems a bit more capable than the other two. I had a look at PlantUML and that also looked pretty good so I would be happy with that.

@fabcor-maxiv
Copy link
Contributor Author

Mermaid seems a bit more capable than the other two.

If there is a preference for Mermaid, we can go with that. The Node.js dependency might not be that big of an issue, I do not know.

I had in mind that both Mermaid and PlantUML were using very similar notation -- implying that it would be easy-ish to switch from one to the other later on if needed -- but that does not seem to be the case after all now that I am looking at those a bit closer.

@fabcor-maxiv
Copy link
Contributor Author

Turns out there is no need for Node.js for Mermaid after all. At least not for HTML where the transformation from Mermaid code is made directly in the browser. So here is an attempt: #954

fabcor-maxiv added a commit to fabcor-maxiv/mxcubecore that referenced this issue Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants