Favicon in Shiny [英] Favicon in Shiny

查看:64
本文介绍了Favicon in Shiny的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的WebApp中添加一个网站图标

I wanted to add a favicon to my WebApp

我正在使用此行,但是不起作用:

I'm using this line, but it doesn't work:

HTML("<link rel=\"icon\" type=\"image/png\" href=\"image.png\" />")

在ui.R脚本内部和shinyUI()函数外部的

.我也有server.R和ui.R所在的image.png. (我也尝试过将它放在文件夹/www内)

inside the ui.R script and outside the shinyUI() function. Also I have the image.png where the server.R and ui.R are. (I've also tried putting it inside the folder /www )

你知道怎么做吗?谢谢

推荐答案

如果您使用的是本地运行应用程序,则将其放入其中 我相信/www/favicon.ico应该可以工作.

If you're using a local runapp, then putting one in /www/favicon.ico should work, I believe.

您也可以在用户界面的某个位置插入

You could also insert this somewhere in your UI:

tags $ head(tags $ link(rel ="shortcut icon",href ="URL-favicon"))

tags$head(tags$link(rel="shortcut icon", href="URL-to-favicon"))

郑乔

这篇关于Favicon in Shiny的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆