我尝试添加以下内容,但发布的应用似乎不包含我的元标记。源代码显示 head 标签内的内容似乎是默认内容。我想让我的应用程序可搜索。
tags$head(
tags$meta(charset="UTF-8"),
tags$meta(name="description", content="..."),
tags$meta(name="keywords", content="..."),
tags$meta(name="viewport", content="width=device-width, initial-scale=1.0")
)
ui<-fluidPage(...)
最佳答案
只需确保在 fluidPage
对象中包含元标记。 Shiny 会将 head
中的所有标签拉出到合适的位置。
ui<-fluidPage(
tags$head(
tags$meta(charset="UTF-8"),
tags$meta(name="description", content="..."),
tags$meta(name="keywords", content="..."),
tags$meta(name="viewport", content="width=device-width, initial-scale=1.0")
), ...)
关于r - 如何在我的 R Shiny 应用程序中包含元标记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51294246/