How can I link some JavaScript or CSS to multiple shiny-apps using shiny-server?
Let's say I have some JS and CSS code in my /home/assets/
directory.
/home/assets/
------jscode1.js
------jscode2.js
------style1.css
------style2.css
And I have several apps in /srv/shiny-server/
:
/srv/shiny-server/
------app1/
----------app.R
------app2/
----------app.R
------app3/
----------app.R
How can I include the javascript and css, without putting them in a www
directory of every app.
I would like to use for example tags$head(tags$script(src = "/home/assets/jscode1.js"))
in all of my apps.
I saw some recommendations (link1, link2) for addResourcePath()
but they were mostly related to packages and I don't know what prefix
to use.
Other options I thought about were includeScript
/includeCSS
/htmlDependency
but they all say to use relative paths.
Additionally how can I include files from the shared directory?
No comments:
Post a Comment