From bec0c963358b6ee13acde6d7687b87265798efbc Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:17:05 +0200 Subject: [PATCH] separate repo for quarto profile --- book/shinylive.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/shinylive.qmd b/book/shinylive.qmd index 8289f16846..1a6e4dc076 100644 --- a/book/shinylive.qmd +++ b/book/shinylive.qmd @@ -18,6 +18,7 @@ we have to put some code upfront - currently shinylive is using webr@v0.2.2 which is missing a feature of shimming `library()` calls - need to add this manually --!> ```{r shinylive-constructor, echo=FALSE, results='asis'} +repo_url <- ifelse(identical(Sys.getenv("QUARTO_PROFILE"), "stable"), "https://insightsengineering.r-universe.dev", "https://pharmaverse.r-universe.dev") text <- unlist(c( "```{shinylive-r}", "#| standalone: true", @@ -26,7 +27,7 @@ text <- unlist(c( "#| layout: vertical", "", "# -- WEBR HELPERS --", - "options(webr_pkg_repos = c(\"r-universe\" = \"https://pharmaverse.r-universe.dev\", getOption(\"webr_pkg_repos\")))", + sprintf("options(webr_pkg_repos = c(\"r-universe\" = \"%s\", getOption(\"webr_pkg_repos\")))", repo_url), "if (packageVersion(\"webr\") < \"0.3.0\") {", " .e <- as.environment(\"webr_shims\")", " .e[[\"library\"]] <- function(pkg, ...) {",