rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
325 stars 85 forks source link

Error publishing to RConnect with plugins #86

Open AMNakamura opened 3 years ago

AMNakamura commented 3 years ago

Hello. First of all, thank you for such a great package. I've found it tremendously useful! I posted this question on Stack Overflow and it was recommended I check here.

I've developed presentations using using the revealjs package (version 0.9) without issues in RStudio IDE (version 1.4.1103.4, Platform: x86_64-redhat-linux-gnu (64-bit), R version 3.6.0). However, I get the following error when publishing to RStudio Connect with the source code, if I add plugins.

Error in (function (incremental = FALSE, center = FALSE, slide_level = 2, :
04/03 14:25:02.921 (GMT)
Using reveal_plugins requires self_contained: false
04/03 14:25:02.921 (GMT)
Calls: local ... <Anonymous> -> create_output_format -> do.call -> <Anonymous>

Values for incremental and self-contained are set to TRUE and FALSE, respectively in my YAML, so the error isn't making sense to me. It seems I have two options for publishing successfully:

  1. With plug-ins, but without the source code
  2. With source code, but without plug-ins

I've included a simple example of the source code, below.

---
title: "My Title"
author: "Author Name"
date:  "`r Sys.Date()`"
output:
  revealjs::revealjs_presentation:
    incremental: true
    self_contained: false
    reveal_plugins: ["notes", "chalkboard", "menu"]
link-citations: yes
---

## Slide 1

- Bullet 1
- Bullet 2

Any help is much appreciated.

cderv commented 3 years ago

This is related to the self_contained: false constraint that we currently have in this package when using pluggins. Related to #115

This is a problem with RStudio Connect because I believe it will render while enforcing self_contained mode. the Rmd document on the server will be rendered using rmarkdown::render(..., output_options = list(self_contained = TRUE)) which will overwrite any configuration in the YAML header.

This is why it is working locally but not on the server.

Currently, there is no workaround to build slide deck on the RSC server. However, you can build the slide locally and publish the resulting folder / files (HTML + resources and no Rmd). RStudio Connect server will not try to render the Rmd in this case.

This is definitely something we need to have a look @apreshill. It seems revealjs does not work fully with self_contained mode in some cases and RStudio Connect will always enforce self_contained: true. I believe it was an issue also with xaringan slides and RSC.

I'll sync with the connect team and thing on how we could improve the experience.

AMNakamura commented 2 years ago

Thank you for researching this and for the thorough explanation. I really appreciate it!

Ann

Sent from my iPhone

On Sep 17, 2021, at 5:13 AM, Christophe Dervieux @.***> wrote:

 This is related to the self_contained: false constraint that we currently have in this package when using pluggins. Related to #115

This is a problem with RStudio Connect because I believe it will render while enforcing self_contained mode. the Rmd document on the server will be rendered using rmarkdown::render(..., output_options = list(self_contained = TRUE)) which will overwrite any configuration in the YAML header.

This is why it is working locally but not on the server.

Currently, there is no workaround to build slide deck on the RSC server. However, you can build the slide locally and publish the resulting folder / files (HTML + resources and no Rmd). RStudio Connect server will not try to render the Rmd in this case.

This is definitely something we need to have a look @apreshill. It seems revealjs does not work fully with self_contained mode in some cases and RStudio Connect will always enforce self_contained: true. I believe it was an issue also with xaringan slides and RSC.

I'll sync with the connect team and thing on how we could improve the experience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.