From d1fccfcadf5e3b314d044e15f33dfa1b0660cf3f Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:33:12 +0200 Subject: [PATCH] simpler check if in pkgdown --- vignettes/teal-modules-general.Rmd | 2 +- vignettes/using-association-plot.Rmd | 2 +- vignettes/using-bivariate-plot.Rmd | 2 +- vignettes/using-cross-table.Rmd | 2 +- vignettes/using-data-table.Rmd | 2 +- vignettes/using-outliers-module.Rmd | 2 +- vignettes/using-regression-plots.Rmd | 2 +- vignettes/using-response-plot.Rmd | 2 +- vignettes/using-scatterplot-matrix.Rmd | 2 +- vignettes/using-scatterplot.Rmd | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vignettes/teal-modules-general.Rmd b/vignettes/teal-modules-general.Rmd index e6992fdf7..6969a0695 100644 --- a/vignettes/teal-modules-general.Rmd +++ b/vignettes/teal-modules-general.Rmd @@ -88,7 +88,7 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-association-plot.Rmd b/vignettes/using-association-plot.Rmd index cc1eb58a8..b303ff9b7 100644 --- a/vignettes/using-association-plot.Rmd +++ b/vignettes/using-association-plot.Rmd @@ -316,6 +316,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-bivariate-plot.Rmd b/vignettes/using-bivariate-plot.Rmd index 20f8199b4..a13de8866 100644 --- a/vignettes/using-bivariate-plot.Rmd +++ b/vignettes/using-bivariate-plot.Rmd @@ -642,6 +642,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-cross-table.Rmd b/vignettes/using-cross-table.Rmd index 4d2092193..73c823003 100644 --- a/vignettes/using-cross-table.Rmd +++ b/vignettes/using-cross-table.Rmd @@ -159,6 +159,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-data-table.Rmd b/vignettes/using-data-table.Rmd index a0419a7f4..686f61b14 100644 --- a/vignettes/using-data-table.Rmd +++ b/vignettes/using-data-table.Rmd @@ -129,6 +129,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-outliers-module.Rmd b/vignettes/using-outliers-module.Rmd index d2b6d7993..1d6ca8536 100644 --- a/vignettes/using-outliers-module.Rmd +++ b/vignettes/using-outliers-module.Rmd @@ -210,6 +210,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-regression-plots.Rmd b/vignettes/using-regression-plots.Rmd index cce69ae88..94c8aac14 100644 --- a/vignettes/using-regression-plots.Rmd +++ b/vignettes/using-regression-plots.Rmd @@ -289,6 +289,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-response-plot.Rmd b/vignettes/using-response-plot.Rmd index b73ec9922..f8054e4c8 100644 --- a/vignettes/using-response-plot.Rmd +++ b/vignettes/using-response-plot.Rmd @@ -398,6 +398,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-scatterplot-matrix.Rmd b/vignettes/using-scatterplot-matrix.Rmd index 5b50859a1..c89490ad4 100644 --- a/vignettes/using-scatterplot-matrix.Rmd +++ b/vignettes/using-scatterplot-matrix.Rmd @@ -177,6 +177,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-scatterplot.Rmd b/vignettes/using-scatterplot.Rmd index 0dd720404..bd28df325 100644 --- a/vignettes/using-scatterplot.Rmd +++ b/vignettes/using-scatterplot.Rmd @@ -393,6 +393,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && requireNamespace("pkgdown", quietly = TRUE) && getFromNamespace("in_pkgdown", "pkgdown")()} +```{r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} knitr::include_url(url, height = "800px") ```