blogdown serve_site() error with shiny: Error: path for html_dependency not provided

I am trying to build a shiny notebook, but I'm running into an issue with blogdown when I try to run serve_site(). I'm getting the following error: Error: path for html_dependency not provided

I have cleared my knitr cache, but that does not appear to have solved the issues. serve_site is working for other pages. Also, the Rmd file renders fine when I click Run Document

Here's a simple example showing the issue:

title: Shiny Test
runtime: shiny

sliderInput(inputId = "test", label = "Test",
                     min = 1, 
                     max = 10,
                     step = 1,
                     value = 5)

Session info:

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shiny_1.4.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 rstudioapi_0.10 knitr_1.26 servr_0.15 magrittr_1.5
[6] xtable_1.8-4 R6_2.4.1 rlang_0.4.2 fastmap_1.0.1 stringr_1.4.0
[11] tools_3.6.1 packrat_0.5.0 xfun_0.11 htmltools_0.4.0 yaml_2.2.0
[16] digest_0.6.23 bookdown_0.16 later_1.0.0 promises_1.1.0 rsconnect_0.8.15
[21] evaluate_0.14 mime_0.7 rmarkdown_2.0 blogdown_0.17 stringi_1.4.3
[26] compiler_3.6.1 jsonlite_1.6 lubridate_1.7.4 httpuv_1.5.2

Welcome to RStudio Community!

Do I understand correctly that you are trying to put a Shiny-based rmarkdown document in a blogdown-based site?

Since blogdown sites are static they can't run Shiny apps directly. The main option I've seen given for Shiny plus blogdown is to put the Shiny app in an iframe. You can see that the iframe is mentioned as an option in this blogdown GitHub issue as a way to embed an app in blogdown. I also saw this short blog post on the topic last year that looked useful.

Thanks for the info!

I was hoping it was possible based on this section of the bookdown book. I'll give the embedding in an iframe a try.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.