Render fenced D2 diagrams natively in GitHub Markdown #214097
Replies: 1 comment
|
Thank you for your interest in contributing to our community! We currently only accept discussions created through the GitHub UI using our provided discussion templates. Please re-submit your discussion by navigating to the appropriate category and using the template provided. This discussion has been closed because it was not submitted through the expected format. If you believe this was a mistake, please reach out to the maintainers. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
Please render fenced
d2code blocks as diagrams in GitHub Markdown, the way GitHub rendersmermaidblocks today. I maintain D2, an open-source language for software architecture diagrams.Google Cloud’s Scion project illustrates the difference. Its architecture guide has six D2 diagrams. On the published site, a reader can follow a request from the CLI through the Hub to a Runtime Broker. On GitHub, a reviewer opening the same document sees the diagram source and has to switch sites to inspect the layout. A native preview would let authors change the diagram in the same commit as the code and let reviewers see the result on GitHub. Source on GitHub · Rendered guide
A useful first release would support self-contained D2 blocks in READMEs and other repository Markdown files. Readers should be able to view and copy the source, including when a diagram fails to render. I’d also like to use D2 diagrams directly in issues and pull request descriptions.
D2 has a browser renderer that GitHub can host itself, so private diagram text can stay in the browser. I have a working isolated-renderer example and can share it with the team that owns Markdown previews. D2 browser package
This follows up on the earlier community question about D2 support.
All reactions