
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:
Markdown
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:
Markdown
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,
PURGE
, as follows:Shell
And Pixela also supports this way. Only if you set the URLs that you want to
PURGE
to purge_cache_urls
of the graph, you achieve that PURGE
requesting to the GitHub cache every time the graph is updated.The
purge_cache_urls
of the graphs should be set as follows, for example:Shell
Now you can embed your graphs in GitHub without worrying about whether the images of the graphs are cached by GitHub, right?
Notes
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 (
https://camo.githubusercontent.com/xxx/xxxx
).Therefore, Pixela supports that specifying up to 5 GitHub cache URLs in
purgeCacheURLs
property.