Title: | Create A shields.io Badge URL |
---|---|
Description: | Build a URL for a custom shields.io badge to use in your project's README file or elsewhere. |
Authors: | Matt Dray [aut, cre] |
Maintainer: | Matt Dray <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2 |
Built: | 2024-11-09 04:22:20 UTC |
Source: | https://github.com/matt-dray/badgr |
Build a URL string that generates a shields.io metadata badge. For convenience, this function allows you to embed the URL in Markdown with a link and copies this to the clipboard for use in a README or elsewhere.
get_badge( label = "shields.io", message = "badge", color = "ff0000", style = "flat", label_color = NULL, md_link = NULL, link_left = NULL, link_right = NULL, logo_simple = NULL, logo_color = NULL, logo_width = NULL, logo_path = NULL, ext_override = NULL, browser_preview = TRUE, include_md = TRUE, to_clipboard = TRUE )
get_badge( label = "shields.io", message = "badge", color = "ff0000", style = "flat", label_color = NULL, md_link = NULL, link_left = NULL, link_right = NULL, logo_simple = NULL, logo_color = NULL, logo_width = NULL, logo_path = NULL, ext_override = NULL, browser_preview = TRUE, include_md = TRUE, to_clipboard = TRUE )
label |
Text string to display on the left side of the badge. |
message |
Text string to display on the right side of the badge. |
color |
The background color of the right side of the badge. Should be one of hex, RGB, RGBA, HSL, HSLA or a CSS named color. |
style |
One of |
label_color |
The background color of the left side of the badge. Should be one of hex, RGB, RGBA, HSL, HSLA or a CSS named color. |
md_link |
A URL string to be used in your badge's Markdown output. If used, clicking the rendered HTML badge output will take you to this site. |
link_left |
A URL string for the left side of the badge. (Included for
completeness; you probably want |
link_right |
A URL string for the right side of the badge. (Included for
completeness; you probably want |
logo_simple |
Text string that names a logo from
simple-icons.org to be placed on the
far left of the badge. (Use either a named logo with |
logo_color |
A color for the logo specified by |
logo_width |
Horizontal spacing width around the logo. |
logo_path |
URL string for your custom logo image. (Use either a named
logo with |
ext_override |
Provide a file extension that overrides the one in
|
browser_preview |
Do you want to preview the badge in the browser? Requires an internet connection. |
include_md |
Do you want to prepare the URL with Markdown syntax
( |
to_clipboard |
Do you want the string to be copied to your clipboard so you can paste it elsewhere? Will overwrite your current clipboard items. |
A Markdown text string.
get_badge( label = "Label", message = "Message", color = "blue", browser_preview = FALSE, to_clipboard = FALSE )
get_badge( label = "Label", message = "Message", color = "blue", browser_preview = FALSE, to_clipboard = FALSE )
Build a URL string that generates a shields.io metadata badge to display your CRAN package's DOI. For convenience, this function allows you to embed the URL in Markdown with a link and copies this to the clipboard for use in a README or elsewhere.
get_cran_doi_badge(package_name, ...)
get_cran_doi_badge(package_name, ...)
package_name |
Single character string. Must be a package named on CRAN. |
... |
Optional arguments passed to |
A Markdown text string.
get_cran_doi_badge( package_name = "datapasta", browser_preview = FALSE, to_clipboard = FALSE )
get_cran_doi_badge( package_name = "datapasta", browser_preview = FALSE, to_clipboard = FALSE )