share_again {xaringanExtra} | R Documentation |
Share or Embed xaringan Slides
Description
The share again extension helps you share your xaringan slides. Adding the
extension to your slides with use_share_again()
enables a "share" bar that
only appears when your slides are embedded in a web page in an <iframe>
. To
embed your presentation in another page, like a blogdown post or a R Markdown
based site, use embed_xaringan()
. This function adds your slides in a
responsive aspect ratio container that seamlessly includes your slides in
the page. Finally, for perfect looking slides, use style_share_again()
to
style the share bar to match your slides' aesthetic. You can also use this
function to enable or disable specific social media sites and platforms from
the share menu.
Usage
use_share_again()
style_share_again(
foreground = "rgb(255, 255, 255)",
background = "rgba(0, 0, 0, 0.5)",
share_buttons = c("all", "none", "twitter", "facebook", "linkedin", "pinterest",
"pocket", "reddit")
)
Arguments
foreground |
The foreground color of the buttons and text in the share bar |
background |
The background color of the share bar |
share_buttons |
A vector of social media platforms to be included in the
share menu of the share bar. You can include |
Value
An htmltools::tagList()
with the HTML dependencies required for
share again.
Functions
-
use_share_again()
: Add the share again bar to your slides (only shown when embedded in an<iframe>
) -
style_share_again()
: Style the share again bar to match your slides, or choose the social media sites included in the share menu
See Also
Examples
# In your slides call
use_share_again()
# In the document where you want to embed the slides call
embed_xaringan("https://slides.yihui.org/xaringan/")