Learn R Programming

metathis (version 1.1.4)

meta: Initialize a List of HTML Metadata Tags

Description

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.

Usage

meta()

is_meta(x)

as_meta(x)

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.

Arguments

x

A list or metathis object

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

Other meta: meta_apple_itunes_app(), meta_apple_web_app(), meta_general(), meta_geo(), meta_google_scholar(), meta_name(), meta_social(), meta_tag(), meta_viewport()

Examples

Run this code
meta() %>%
  meta_viewport() %>%
  is_meta()

list_of_meta_tags <- list(
  htmltools::tags$meta(github = "gadenbuie"),
  htmltools::tags$meta(twitter = "grrrck")
)

as_meta(list_of_meta_tags)

Run the code above in your browser using DataLab