meta_social {metathis} | R Documentation |
Social Media Metadata
Description
Generate metadata tags for social media cards.
Usage
meta_social(
.meta = meta(),
title = NULL,
url = NULL,
image = NULL,
image_alt = NULL,
image_width = NULL,
image_height = NULL,
description = NULL,
twitter_card_type = c("summary", "summary_large_image", "app", "player"),
twitter_creator = NULL,
twitter_site = twitter_creator,
og_type = "website",
og_locale = "en_US",
og_author = NULL,
og_site_name = NULL,
facebook_app_id = NULL,
disable_pinterest = FALSE
)
Arguments
.meta |
A |
title |
Content title |
url |
Content URL |
image |
Image url for card. |
image_alt |
A description of what's in the image (not a caption) |
image_width |
The width of the image in pixels |
image_height |
The height of the image in pixels |
description |
Content description. If you have already used
|
twitter_card_type |
One of |
twitter_creator |
|
twitter_site |
|
og_type |
Open Graph card type, default is |
og_locale |
The locale these tags are marked up in. Of the format |
og_author |
Writers of the article. Multiple authors may be specified in a vector of character strings. |
og_site_name |
The name of the site hosting the content |
facebook_app_id |
The Facebook app ID. See the Facebook Open Graph Markup page for more information. |
disable_pinterest |
If |
Value
A meta
object, or a set of <meta>
HTML tags inside an HTML
<head>
tag. For use in rmarkdown::html_document()
, shiny::runApp()
,
or other HTML locations.
References
See Also
Other meta:
meta_apple_itunes_app()
,
meta_apple_web_app()
,
meta_general()
,
meta_geo()
,
meta_google_scholar()
,
meta_name()
,
meta_tag()
,
meta_viewport()
,
meta()
Examples
meta() %>%
meta_social(
title = "R for Data Science",
description = "This book with teach you how to do data science with R",
url = "https://r4ds.had.co.nz",
image = "https://r4ds.had.co.nz/cover.png",
image_alt = "The cover of the R4DS book",
og_type = "book",
og_author = c("Garrett Grolemund", "Hadley Wickham"),
twitter_card_type = "summary",
twitter_creator = "@hadley"
)