get_badge | R Documentation |
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
)
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.