logo | R Documentation |
use_logo()
adds a logo to all of your slides. You can make the logo a
clickable link and choose where on the page it is placed. You can also set
which types of slides will not get the logo by default.
use_logo(
image_url,
width = "110px",
height = "128px",
position = css_position(top = "1em", right = "1em"),
link_url = NULL,
exclude_class = c("title-slide", "inverse", "hide_logo")
)
html_dependency_logo(
link_url = NULL,
exclude_class = c("title-slide", "inverse", "hide_logo"),
inline = NULL
)
image_url |
The URL to the image file of your logo. In general, either a full URL or the path to the image relative to your slides file. |
width |
Width in CSS units of the logo |
height |
Height in CSS units of the logo |
position |
The position of the logo from the sides of the slide. Use
|
link_url |
Optional. If provided, your logo becomes a clickable link. |
exclude_class |
The slide classes that should not receive the logo. By
default, the title slide, inverse slides and slides with the |
inline |
In |
An htmltools::tagList()
with the Add Logo dependencies, or an
htmltools::htmlDependency()
.
use_logo()
: Adds logo to your xaringan slides.
html_dependency_logo()
: Returns an htmltools::htmlDependency()
with the tile
view dependencies. Most users will want to use use_logo()
.
To add a logo to your xaringan presentation, add the following code chunk to your slides' R Markdown file.
```{r xaringan-logo, echo=FALSE} xaringanExtra::use_logo( image_url = "https://raw.githubusercontent.com/rstudio/hex-stickers/master/PNG/xaringan.png" ) ```
See the documentation for ?use_logo
for more options regarding sizing
and positioning. You can also make the logo a link using link_url
and
you can hide the logo for a particular slide by using the hide_logo
slide class.
xaringan_logo <- file.path(
"https://raw.githubusercontent.com/rstudio/hex-stickers/master",
"PNG/xaringan.png"
)
use_logo(xaringan_logo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.