From a19528d971c7d6e2219ec922c82f30b79525ec05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Fri, 14 Feb 2025 09:31:42 +0100 Subject: [PATCH] update documentation of badges (#84) * update documentation of badges * fix version url --- publish/set-up.qmd | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/publish/set-up.qmd b/publish/set-up.qmd index e845012..bd2491d 100644 --- a/publish/set-up.qmd +++ b/publish/set-up.qmd @@ -166,15 +166,32 @@ install.packages('tinkr') ``` Copy these instructions to your package `README.md` files to assist users. -You can also add an R-universe badge to indicate the deployed version: + +### Badge showing the number of the deployed version + +You can also add an R-universe badge to indicate the deployed version. The badge API is simply `/badges/` which will yield an SVG image that can directly be embedded into your markdown files, showing the deployed version for the given package: ```md -![r-universe](https://r-lib.r-universe.dev/badges/cpp11) +[![r-universe version](https://r-lib.r-universe.dev/cpp11/badges/version)](https://r-lib.r-universe.dev/cpp11) ``` +### Badge showing the status of the latest check + +Alternatively, or as a complement, you can add an R-universe badge to indicate the check status. + +```md +[![r-universe status](https://r-lib.r-universe.dev/cpp11/badges/checks)](https://r-lib.r-universe.dev/cpp11) +``` + +The current implementation includes status for building vignettes and check results for R-release and R-devel on Windows, macOS and Linux. +It shows the "worst result" of those checks, similar to what GitHub Action check badges do: if there is 1 "error", 1 "warning and 5 ok, the badge shows "error". + +The check status ignores R-oldrel and platforms where we only build binaries but do not check (webassembly), to avoid false positives. + +### Badges customization -For example this would produce the following badge: +Refer to https://r-lib.r-universe.dev/badges for examples of badges and information on how to customize them (color, scale, style). ## Linking to your universe from other websites