Is it possible to use rmarkdown's site generator to create a site consisting of several Shiny Prerendered documents? I have created a website consisting of several Rmd
files using the shiny
runtime, and I attempted to switch them to the shiny_prerendered
runtime in order to take advantage of the improved performance provided by Shiny Prerendered documents. However, doing so causes site navigation to break, as the initial document is simply refreshed no matter which URL is visited on the site.
Looking at the source of rmarkdown::run()
, this appears, at first glance, to be due to the differences in the way rmarkdown handles converting Shiny and Shiny Prerendered documents into Shiny Apps. That is, when rmarkdown::run()
encounters a Shiny document, the generated Shiny App's server function creates a reactive expression for the rendered document, which updates whenever the file is changed. However, when rmarkdown::run()
encounters a Shiny Prerendered document, it simply parses the file and produces a Shiny App from the contents of said file.
Furthermore, the Shiny Server documentation states
Particular
Rmd
files can be accessed by referencing their full path including the filename, e.g.,http://myserver.org/mydocs/hello.Rmd
.
However, this does not appear to be the case if the Rmd
files use the shiny_prerendered
runtime. In this case, the index.Rmd
document is displayed no matter what URL is visited.
Is this a current limitation of Shiny Prerendered documents, or is there something that I am missing?
Thanks in advance for any help!