How to insert html metadata in my R-shiny app?

Question. how can I make my R-shiny app insert meta information into the HTML header of an output webpage? I am using pageWithSidebar().

Details. This is so I can create shiny-enabled webpages for my students that are amenable for citation-extraction using Zotero. I know that Zotero will discover author information if I set e.g. <meta name="author" content="My Name"> within the <head> element. I'll be using R-shiny apps a fair bit for remote teaching this term, and I want my students to use Zotero for gathering references for all material, including R-shiny material.

Thanks!

Hi,

You can simply add the meta tag into the head tag like this:

ui <- fluidPage(
  tags$head(
    tags$meta(name="author", content="My Name"),
    tags$meta(name="creation_date", content="21/08/2020")
  )
)    

Hope this helps,
PJ

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.