badges | R Documentation |
These helpers produce the markdown text you need in your README to include
badges that report information, such as the CRAN version or test coverage,
and link out to relevant external resources. To allow badges to be added
automatically, ensure your badge block starts with a line containing only
<!-- badges: start -->
and ends with a line containing only
<!-- badges: end -->
. The templates used by use_readme_md()
and
use_readme_rmd()
include this block.
use_badge(badge_name, href, src)
use_cran_badge()
use_bioc_badge()
use_lifecycle_badge(stage)
use_binder_badge(ref = git_default_branch(), urlpath = NULL)
use_r_universe_badge(repo_spec = NULL)
use_posit_cloud_badge(url)
badge_name |
Badge name. Used in error message and alt text |
href , src |
Badge link and image src |
stage |
Stage of the package lifecycle. One of "experimental", "stable", "superseded", or "deprecated". |
ref |
A Git branch, tag, or SHA |
urlpath |
An optional |
repo_spec |
Optional GitHub repo specification in this form: |
url |
A link to an existing Posit Cloud project. See the Posit Cloud documentation for details on how to set project access and obtain a project link. |
use_badge()
: a general helper used in all badge functions
use_bioc_badge()
: badge indicates BioConductor build status
use_cran_badge()
: badge indicates what version of your package is
available on CRAN, powered by https://www.r-pkg.org
use_lifecycle_badge()
: badge declares the developmental stage of a
package according to https://lifecycle.r-lib.org/articles/stages.html.
use_r_universe_badge()
: badge
indicates what version of your package is available on R-universe . It is assumed that you have already
completed the
necessary R-universe setup.
use_binder_badge()
: badge indicates that your repository can be launched
in an executable environment on https://mybinder.org/
use_posit_cloud_badge()
: badge indicates that your repository can be launched
in a Posit Cloud project
use_github_action()
helps with the setup of various continuous
integration workflows, some of which will call these specialized badge
helpers.
## Not run:
use_cran_badge()
use_lifecycle_badge("stable")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.