I am trying to figure out how to share Shiny’s
www directory across apps, such that I can share a stylesheet. My directory structure is such that I have a Git repo that contains many Shiny apps. I also have a static assets directory in that repo. One might imagine that its directory structure is:
shiny-app-repo/ ├── app1/ │ ├── server.R │ └── ui.R ├── app2/ │ ├── server.R │ └── ui.R ├── app3/ │ ├── server.R │ └── ui.R ├── assets/ │ └── style.css
I’m aware that all the Shiny apps expect to have a
www directory inside of them. Naturally, I’d prefer to not need to copy/paste/rename the
I’ve tried using
addResourcePath('www', '../assets'), but that doesn’t seem to work. I’ve also tried pointing my UI code at the shared directory, i.e.
tags$link(rel = "stylesheet", type = "text/css", href = "../../assets/style.css"), but that also does not seem to work for me.
What’s the recommended way of telling each Shiny app to find this