metathis

Easy Custom Metadata Tags

By Garrick Aden-Buie

February 1, 2021

<meta> tags and social media cards for R-made web things.

Installation

You can install metathis from CRAN

install.packages("metathis")

or you can install the development version of metathis from r-universe or GitHub.

options(repos = c(
  gadenbuie = "https://gadenbuie.r-universe.dev", 
  getOption("repos")
))
install.packages("metathis")

# install.packages("remotes")
remotes::install_github("gadenbuie/metathis")

Why metathis?

The goal of metathis is to help you add HTML <meta> tags to your R Markdown and Shiny apps.

HTML <meta> tags provide browsers and social media with metadata about HTML pages. Using <meta> tags will help your users find your articles, Shiny apps, and presentations, and will help you make sure they look great in social media timelines.

metathis makes the process of adding these tags to your R Markdown pages and Shiny apps easier by using the htmltools package to add <meta> tags as a dependency, added directly to the document in an R code chunk or your Shiny app UI rather than requiring you to adjust templates or write additional files.

If you want great looking social media cards, the meta_social() function will help you add everything you need for Twitter, Facebook and other social media sites that support the Open Graph protocol.