View source: R/fa_html_dependency.R
| fa_html_dependency | R Documentation |
html_dependencyThe fa_html_dependency() function adds a html_dependency object into a
Shiny or R Markdown context. This allows for the direct use of <i> tags
that refer to Font Awesome icons without having to use the fa_i() to create
these tags and also add the html_dependency to the document.
fa_html_dependency()
The html_dependency object is created internally with the following
invocation:
htmltools::htmlDependency(
name = "font-awesome",
version = fa_version,
src = "fontawesome",
package = "fontawesome",
stylesheet = c("css/all.min.css", "css/v4-shims.min.css")
)
The fa_version object is an internal object that provides the released
version number for the Font Awesome icons. This can be inspected by using
fa_metadata()$version.
An html_dependency object.
if (interactive()) {
# Create a Font Awesome `html_dependency`
fa_html_dependency()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.