-
Make sure you have quarto installed.
-
Install the
shinylivefor both R and python. Note that you have to install the development version ofshinylivepackage for R because in order to use both R and python shinylive they must use the same assets.
# install.packages("pak")
pak::pak("posit-dev/r-shinylive")pip install shinylive- Install the quarto extension for shinylive.
quarto add quarto-ext/shinylive- Install the quarto extension for WebAssembly powered code blocks in R and Python.
quarto add r-wasm/quarto-live- Render the document using the following command:
quarto renderNow the _site directory will contain all the required static files needed to host and view this content. You can start the static server using any method you prefer. Here are a couple of examples:
- Using Python:
python3 -m http.server 8000 --directory _sitehttpuv::runStaticServer(dir = "_site/")