Supporting Diagrams in GitHub Previews #1260
Replies: 2 comments 4 replies
-
If we have a solution which supports c4 we can use the diagrams also with traceability tooling: useblocks/sphinx-needs#1304. For example: https://diagrams.mingrammer.com/docs/nodes/c4 |
Beta Was this translation helpful? Give feedback.
-
Dear @AlexanderLanin , @FScholPer , great thoughts, let me give my ones,
Regarding PlantUML Theme
Regarding traceability
Case c4 is wanted I could recommend struturizr developed and maintained by Simon Brown the c4 god-father.
In general I highly appreciate to see that SCORE drives arch-as-docs approach. I´m open for every kind of solution and willing to contribute. Let me know you want to continue? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Displaying diagrams on GitHub Pages is straightforward, since arbitrary processing can be done during site generation.
But what about the pure GitHub view, such as browsing files or reviewing a PR?
Idea generation in progress!
Here is what we have so far:
✅ Draw.io
Store
.drawio.svg
files in the repo. GitHub renders them natively in Markdown.✅ Mermaid
Supported in GitHub Markdown files (
.md
), GitHub issues and GitHub pull requests.(Also supported in
.rst
files? Needs verification.)🔄 PlantUML via proxy server
⚠️ Not suitable for sensitive content; depends on external availability.
⚠️ Only renders images from the
Embed images using links to an online or self-hosted PlantUML server:

main
branch. When viewing other branches or PRs, rendered diagrams may be outdated or incorrect.🔁 PlantUML with CI-generated SVGs/PNGs
Auto-generate diagrams from
.puml
files in CI and:✏️ Commit to the same PR branch
Append a commit to each PR that includes the updated
.svg
files — or enforce that the author generates them before submitting.📦 Commit to a separate branch/repo/cache
Avoid cluttering the main branch by storing generated images elsewhere, e.g.:
gh-pages
branchdiagrams
branchBeta Was this translation helpful? Give feedback.
All reactions