Quarto websites that support shiny elements

Hi,
I'm wondering if in the future it will be possible to publish quarto websites and/or books which contain pages that have interactive shiny elements?

My limited understanding is that when I deploy my site, it cannot include pages with shiny elements because the website is deployed as a static document. I would like to be able to maintain the narrative driven layout of my Quarto website but incorporate some interactivity.

I am trying to work around this using shinylive but it seems to have limited app capabilities and is very slow. For example, shinylive apparently cannot use readxl::read_xlsx()..?

Maybe in the future it would be possible to deploy a website that is deployed as an app rather than a static document? apologies for my rudimentary understanding, just trying to figure out the best way to get shiny interactivity on my website now and in the future.

Thank You!

Hi @AKates717
We recently rolled out a feature targeting the situation you describe. Check out [Product Update] Interactive Quarto Documents with Shiny for details. When your Quarto content includes interactive Shiny applications, we do not deploy it statically.

It's always possible we didn't consider something and the feature isn't working as intended. If you're having an experience that differs from the documentation, we'd welcome your feedback. Thanks!

Hi @mbaynton, thank you for the reply!

When I click "Run Document" on my .qmd file I get this error in R Studio:

ERROR: shiny.qmd uses server: shiny so cannot be included in a website project (shiny documents require a backend server and so can't be published as static web content).

Maybe I'm doing something wrong on my end? I have downloaded the latest version of quarto and checked:

check_newer_version()
:information_source: You are using the latest stable version of Quarto: 1.8.27.

Thanks!

Hi @AKates717
Sorry, I overlooked the essential detail in this request that you're working with a full quarto website. Unfortunately, when server-side Shiny elements are included, only single documents -- not multi-document websites -- are supported for now. Your use case makes sense though and I'll note your interest in this feature in our internal tracking systems.

Thanks, and sorry for the confusion.
Mike

1 Like

This is a +1 from me. I'm in the same situation, I want to use Quarto to handle the site navigation controls, and each page is a self-contained shiny app. What I'd like to do is to deploy the website to a shiny server. Right now I'm using shinylive, and it is much too slow.

The current version is up at Introductory Statistics Apps - Index of R Demonstrations for Intro Stat

quarto sources are on my github.

I've also personally thought from a convenience perspective that setting up an experience like this would be great. One (of many) complications we'd need to work out for an arrangement like that is what sort of computing resource pool is provided to each of those standalone shiny apps -- in Connect Cloud, most account tiers are limited in the number of Shiny apps they can deploy because we assume each Shiny app is fairly substantial and needs a decent chunk of computing resources made available to it.

I can see that in your particular use case most of these applications look very simple, so if we ran them all in one application's worth of resources / counting as only one "application" against the account, it would probably work out just fine.

1 Like

Thanks for continuing the conversation.

I think the solution we are asking for would eliminate the need for multiple standalone shiny apps, right?

For my project (and I think Russell's too) I just want some of the qmd files within the website project to have the same shiny reactivity that is currently available when deploying interactive quarto documents outside of a website project.

If the quarto website were deployed to a shiny server, as mentioned by Russell, could it essentially just be deployed like one single shiny app? It's mentioned in the documentation, publishing would "count against plan entitlements as an application, not a standard document" which makes sense.

In my case, I could technicaly just create a Shiny App and make it look like a website, but it would be amazing to be able to use Quarto to build the site properly and make it beautiful and narrative driven. I also think the computing resources would be the same either way, or even less with Quarto since a lot of the content would be static, but obviously I don't know how that all works on the back end.

Thanks again!

I don't know if this is any help, but if I was doing what @ralmond is doing, I would put all the apps in one app and use iframes and bookmarking to insert the specific example into the website. That way you can get the appearance of multiple apps from one app and once it is running, it should load another example pretty quickly. I did this in a workshop here: shinyworkshop/slides.qmd at c587714e135919aa53d6bafe91e3dac67a75542a · simon-smart88/shinyworkshop · GitHub running this app: shinyworkshop/layout.R at main · simon-smart88/shinyworkshop · GitHub If each 'app' was a module, the architecture could work out neatly.