Initialize a metathis object (i.e. a list of HTML metadata tags), test if an object is a metathis object, or coerce a list of meta tags to be a metathis object.

meta()

is_meta(x)

as_meta(x)

Arguments

x

A list or metathis object

Value

A meta object, or a set of <meta> HTML tags inside an HTML <head> tag. For use in rmarkdown::html_document(), shiny::runApp(), or other HTML locations.

Functions

  • is_meta: Test if an objects is a metathis object

  • as_meta: Convert a list of meta tags into a metathis object.

See also

Examples

meta() %>% meta_viewport() %>% is_meta()
#> [1] TRUE
list_of_meta_tags <- list( htmltools::tags$meta(github = "gadenbuie"), htmltools::tags$meta(twitter = "grrrck") ) as_meta(list_of_meta_tags)
#> <meta github="gadenbuie"/> #> <meta twitter="grrrck"/>