View source: R/block_social_links.R
block_social_links | R Documentation |
With block_social_links()
, we can create a block of social sharing links
and links to websites, email, or RSS feeds. The function can accept as many
social_link()
calls as seen fit to email. Like all block_*()
functions,
block_social_links()
must be placed inside of blocks()
and the resultant
blocks
object can be provided to the body
, header
, or footer
arguments of compose_email()
.
block_social_links(...)
... |
One or more calls to |
# Create an email message with some
# articles in the `body`; in the footer,
# add some social sharing icons linking
# to web content using `block_social_links()`
email <-
compose_email(
body =
blocks(
block_title("Exciting Travel Destinations"),
block_articles(
article(
image = "https://i.imgur.com/dxSXzGb.jpg",
title = "Hong Kong",
content =
"Once home to fishermen and farmers,
modern Hong Kong is a teeming,
commercially-vibrant metropolis where
Chinese and Western influences fuse."
),
article(
image = "https://i.imgur.com/bJzVIrG.jpg",
title = "Australia",
content =
"Australia ranks as one of the best
places to live in the world by all
indices of income, human development,
healthcare, and civil rights."
)
)
),
footer =
blocks(
block_text("Thanks for reading! Find us here:"),
block_social_links(
social_link(
service = "pinterest",
link = "https://www.pinterest.ca/TravelLeisure/",
variant = "color"
),
social_link(
service = "tripadvisor",
link = "https://www.tripadvisor.ca/TravelersChoice",
variant = "color"
)
)
)
)
if (interactive()) email
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.