add_og_card: Create open graph meta tags

View source: R/add_og_card.R

add_og_cardR Documentation

Create open graph meta tags

Description

An easy way to create open graph meta tags for your blogdown post. For more details on the meta tags see http://ogp.me/

Usage

add_og_card(card_type = c("website", "article", "book"), title, image,
  url, description = NULL, image_alt = NULL, site_name = NULL,
  video = NULL, audio = NULL, author = NULL, file = "og_card.html")

Arguments

card_type

Required. Open graph card type. See http://ogp.me/#types for list

title

Required. Title for card content.

image

Required. Link for the content image.

url

Required. Canonical URl to be used as permanent ID in the graph.

description

Description for card content. One to two sentences.

image_alt

Alternate text to display if image fails.

site_name

If your object is part of a larger web site, the name which should be displayed for the overall site.

video

URL to a video file that complements the object

audio

URL to an audio file that complements the object

author

Authors of the content if content type is "article" or "book"

file

Required. File name to put in the header of Rmd doc, must be .html.

Examples

add_og_card(title = "HeadR is great!",
       image = "https://www.rstudio.com/wp-content/uploads/2014/06/RStudio-Ball.png",
       url = "https://www.jumpingrivers.com",
       file = "hello.html")

jumpingrivers/headR documentation built on May 7, 2022, 2:22 a.m.