diff --git a/docs-requirements.txt b/docs-requirements.txt index a2de834770..9a69d2bc63 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -5,3 +5,4 @@ sphinx==5.1.1 sphinx_autobuild sphinx_copybutton sphinx_design +sphinxcontrib-mermaid diff --git a/docs/conf.py b/docs/conf.py index 36b1089269..067822ed7c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,6 +32,7 @@ "myst_parser", "sphinx_copybutton", "sphinx_design", + "sphinxcontrib.mermaid", ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/explanations/cves_and_usns_explained.md b/docs/explanations/cves_and_usns_explained.md index 272c1d883b..fca33be30f 100644 --- a/docs/explanations/cves_and_usns_explained.md +++ b/docs/explanations/cves_and_usns_explained.md @@ -33,7 +33,27 @@ A USN is composed of different CVEs. If the same CVE appears on multiple USNs, w In the following image, we can see a visual representation of that concept, where USN-789 and USN-321 are related USNs because both are affected by CVE-2: -![Related USN example](../images/usn-related.png) +```{mermaid} +graph TD; + %% nodes + usn1[USN-123] + usn2[USN-456] + usn3[USN-789] + usn4[USN-321] + usn5[USN-654] + cve1((CVE-1)) + cve2((CVE-2)) + cve3((CVE-3)) + + %% arrows + usn1-->cve1 + usn1-->cve2 + usn1-->cve3 + cve1-->usn2 + cve2-->usn3 + cve2-->usn4 + cve3-->usn5 +``` A real example can be seen in [USN-5573-1](https://ubuntu.com/security/notices/USN-5573-1). diff --git a/docs/images/usn-related.png b/docs/images/usn-related.png deleted file mode 100644 index 9db73c0ffb..0000000000 Binary files a/docs/images/usn-related.png and /dev/null differ