Working on how to present UML diagrams written in plain text with PlantUML, and to be able to visualize them correctly from a Markdown file, I have found an interesting way to display the diagram and the text, but a problem has arisen.
I correctly make the diagram correctly in the markdown file, as follows:
- I insert an
img
tag that points to the PlantUML Service to generate the image, passing as a parameter raw file in github and the ordinal of the diagram to be displayed within the document. - I wrap the PlantUML code in a
section
tag with its correspondingsumaryze
to show/hide in code.
When I push the document, everything is updated, normal, but the image generated at https://camo.githubusercontent.com/ is not updated.
I have tried clearing the cache as indicated in About anonymized image URLs in GitHUB but have not gotten any satisfactory results. It must be said that it does not matter from which browser or computer is working.
Here, I leave you the examples, click on each one to see them. The most simple README.md
Here I present an example of how I have worked with markdown (I have changed some quotes inside code
, necessary so that markdown
into code
is admitted in this question);
<img src = "http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/srlopez/RUP/master/examples/fraccion_completo.md&idx=0" alt = "" / >
<details><summary>Code #0</summary>
'''plantuml
@startuml
:User: as u
rectangle system {
(Add 2 Fractions\nUC#1) as add
}
u - add
@enduml
'''
</details>
You can do the test in a README.md
of a local project.
Include the code that I have indicated, changing the quotes, push README.md, then locally change the code again and push.
You can see that everything has been updated, opening the section
tag, but the image remains the same.
This is a README.md example https://github.com/srlopez/Pruebas/blob/master/README.md