r-multiverse / help

Discussions, issues, and feedback for R-multiverse
https://r-multiverse.org
MIT License
2 stars 2 forks source link

`r-releases` badges #14

Closed shikokuchuo closed 4 months ago

shikokuchuo commented 4 months ago

It is pretty easy to create dynamic badges like the ones for R-universe, connecting shields.io with R-universe's API.

See the one I created at https://shikokuchuo.net/nanonext/

The markdown is simply:

[![r-releases status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fr-releases.r-universe.dev%2Fapi%2Fpackages%2Fnanonext&query=%24.Version&label=r-releases&color=0043ce)](https://r-releases.r-universe.dev/nanonext)

I wonder what's the best way to make these available. Probably something like an automated constructor on the help page. Using shields.io isn't the only choice but it's convenient as we don't have to serve anything using our own infrastructure.

wlandau commented 4 months ago

Maybe there could be a function to generate badges as part of the user-facing package in #6?

shikokuchuo commented 4 months ago

Such a function would be trivially simple. But seems a bit hidden away in a package - not an obvious place for it?

wlandau commented 4 months ago

In that case, maybe a quick explanation in https://github.com/r-releases/help/blob/main/README.md#how-to-register-your-package-with-r-releases?

shikokuchuo commented 4 months ago

Yes, good idea. I've drafted a PR for your review. I was initially thinking of an interactive constructor to make it really easy like they have at shields.io, but actually I think it's overkill for what we need here.

shikokuchuo commented 4 months ago

Great, thanks!