Generate metadata tags for social media cards.
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 )
.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 |
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.
Other meta:
meta_apple_itunes_app()
,
meta_apple_web_app()
,
meta_general()
,
meta_geo()
,
meta_name()
,
meta_tag()
,
meta_viewport()
,
meta()
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" )#> <meta name="twitter:title" content="R for Data Science"/> #> <meta name="twitter:description" content="This book with teach you how to do data science with R"/> #> <meta name="twitter:url" content="https://r4ds.had.co.nz"/> #> <meta name="twitter:image:src" content="https://r4ds.had.co.nz/cover.png"/> #> <meta name="twitter:image:alt" content="The cover of the R4DS book"/> #> <meta name="twitter:card" content="summary"/> #> <meta name="twitter:creator" content="@hadley"/> #> <meta name="twitter:site" content="@hadley"/> #> <meta property="og:title" content="R for Data Science"/> #> <meta property="og:description" content="This book with teach you how to do data science with R"/> #> <meta property="og:url" content="https://r4ds.had.co.nz"/> #> <meta property="og:image" content="https://r4ds.had.co.nz/cover.png"/> #> <meta property="og:image:alt" content="The cover of the R4DS book"/> #> <meta property="og:type" content="book"/> #> <meta property="og:locale" content="en_US"/> #> <meta property="article:author" content="Garrett Grolemund"/> #> <meta property="article:author" content="Hadley Wickham"/>