Embedding Pixela graphs in GitHub
For example, let’s record the number of CI workflows executed in your repository to Pixela and embed the graph in the README. It will let people know how actively the repository is being developed.
GitHub supports Markdown format. So, whether it is READMEs or issues, you may embed your by writing the following:
However, there is one thing that you need to be careful of. That is, GitHub automatically caches assets such as images.
If you place an image in Markdown as shown above, the URL for that image will probably be something like this:
This means that even if you update Pixela graphs, the cached images of the graphs on GitHub will still be displayed. It is not possible to always display the latest information.
GitHub already provides a way to clear the caches. You can expire the caches by requesting it with GitHub’s custom HTTP method, , as follows:
And Pixela also supports this way. Only if you set the URLs that you want to to of the graph, you achieve that requesting to the GitHub cache every time the graph is updated.
The of the graphs should be set as follows, for example:
Now you can embed your graphs in GitHub without worrying about whether the images of the graphs are cached by GitHub, right?
Even if the Pixela graph that you will embed is the same, embedding the graph in different places in GitHub will generate each different URLs ( ).
Therefore, Pixela supports that specifying up to 5 GitHub cache URLs in property.