You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: R-shinylive-demo.qmd
+74-2
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ filters:
10
10
11
11
This document contains just the [Shiny App source code](https://github.com/jcheng5/posit-conf-2023-shinylive/blob/d385ad18eb0d867f25cc4721d9e8c25aeb2dfb90/slides.qmd#L299) used in Joe Cheng's [posit::conf(2023) demo](https://jcheng5.github.io/posit-conf-2023-shinylive/#/option-3-include-1) (Warning: Large file size, don't open on mobile!)
12
12
13
-
For a detailed breakdown, please see the <index.qmd> file.
13
+
For a detailed breakdown, please see the [index.qmd](index.qmd) file.
14
14
15
15
```{shinylive-r}
16
16
#| standalone: true
@@ -67,4 +67,76 @@ server <- function(input, output, session) {
67
67
68
68
# Create Shiny app ----
69
69
shinyApp(ui = ui, server = server)
70
-
```
70
+
```
71
+
72
+
73
+
Document Source (minus links):
74
+
75
+
````md
76
+
---
77
+
title: "Joe Cheng's r-shinylive App in a Quarto document!"
Copy file name to clipboardexpand all lines: README.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# r-shinylive-demo
2
2
3
-
Interested in deploying a Shiny application for R within Quarto? This is the repository for you! Here's a summary of what you can find in the repository:
3
+
Interested in deploying a serverless Shiny application for R within Quarto? This is the repository for you! Here's a summary of what you can find in the repository:
4
4
5
5
-**[index.qmd](index.qmd):** This file contains a tutorial that provides step-by-step instructions and guidance on using `r-shinylive` to embed Shiny applications in Quarto documents.
6
6
7
7
-**[R-shinylive-demo.qmd](R-shinylive-demo.qmd):** Inside this file, you can find a working example of the Shiny app that was used in Joe Cheng's [posit::conf(2023) demo](https://jcheng5.github.io/posit-conf-2023-shinylive/#/option-3-include-1). Please note that Joe's presentation contains files that are large in size and is not recommended for mobile devices. You can also refer to the [source code](https://github.com/jcheng5/posit-conf-2023-shinylive/blob/d385ad18eb0d867f25cc4721d9e8c25aeb2dfb90/slides.qmd#L299) of the demo.
8
8
9
9
-**[template-r-shinylive.qmd](template-r-shinylive.qmd):** This file provides a skeleton template that you can use to populate your own Shiny apps. It serves as a starting point for creating your interactive Quarto documents with Shiny applications. Please note that you will still need to install the required software as mentioned in the tutorial.
10
10
11
-
-**[_quarto.yml](_quarto.yml):** This configuration file is essential for Quarto and `shinylive` to work together effectively.
11
+
-**[_quarto.yml](_quarto-default.yml):** This configuration file is essential for Quarto and `shinylive` to work together effectively.
12
12
13
13
-**[.github/workflows/publish-demo.yml](.github/workflows/publish-demo.yml):** This file contains a sample workflow configuration for creating a website that embeds R Shiny applications using GitHub Actions and deploys it to GitHub Pages.
14
14
@@ -24,6 +24,14 @@ You can see the live version built from the repository here:
Prefer a hands-on visual guide? Check out the following YouTube video:
30
+
31
+
[](https://www.youtube.com/watch?v=6y2FnAugP8E)
32
+
33
+
We'll go through every step and provide some commentary along the way!
34
+
27
35
# Using r-shinylive for Serverless Shiny Apps in Quarto Documents
28
36
29
37
Are you interested in creating your own Quarto document with embedded static Shiny apps? This tutorial will guide you through the process of using the `r-shinylive` R package to achieve just that. Let's get started!
@@ -49,14 +57,24 @@ quarto create project default
49
57
50
58

51
59
52
-
During project creation, you'll be prompted to provide a directory name. This name will also serve as the Quarto document filename. Please note that if you skip this step, a `_quarto.yml` file won't be generated, resulting in an error when you attempt to render the document.
60
+
61
+
While creating the project, you'll be prompted to specify a directory name. This name will also serve as the filename for your Quarto document. It's crucial to note that skipping this step will result in the absence of a `_quarto.yml` file, leading to an error when you attempt to render the document. The error message will resemble the following:
53
62
54
63
```md
55
64
ERROR:
56
65
The shinylive extension must be used in a Quarto project directory
57
66
(with a _quarto.yml file).
58
67
```
59
68
69
+
Ensure that the contents of the `_quarto.yml` file match the following structure:
70
+
71
+
```yaml
72
+
project:
73
+
title: "R-shinylive-demo"
74
+
```
75
+
76
+
Here, the `title` field should contain the name of the Quarto file up to the extension.
77
+
60
78
## Installing the Quarto Extension for r-shinylive
61
79
62
80
**Step 3:** Install the Quarto extension for `shinylive`. In the Terminal tab, run the following command:
Copy file name to clipboardexpand all lines: index.qmd
+18-1
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,14 @@ server <- function(input, output, session) {
77
77
shinyApp(ui = ui, server = server)
78
78
```
79
79
80
+
## Video Tutorial
81
+
82
+
Prefer a hands-on visual guide? Check out the following YouTube video:
83
+
84
+
[](https://www.youtube.com/watch?v=6y2FnAugP8E)
85
+
86
+
We'll go through every step and provide some commentary along the way!
87
+
80
88
# Using r-shinylive for Serverless Shiny Apps in Quarto Documents
81
89
82
90
Are you interested in creating your own Quarto document with embedded static Shiny apps? This tutorial will guide you through the process of using the `r-shinylive` R package to achieve just that. Let's get started!
@@ -102,14 +110,23 @@ quarto create project default
102
110
103
111

104
112
105
-
During project creation, you'll be prompted to provide a directory name. This name will also serve as the Quarto document filename. Please note that if you skip this step, a `_quarto.yml` file won't be generated, resulting in an error when you attempt to render the document.
113
+
While creating the project, you'll be prompted to specify a directory name. This name will also serve as the filename for your Quarto document. It's crucial to note that skipping this step will result in the absence of a `_quarto.yml` file, leading to an error when you attempt to render the document. The error message will resemble the following:
106
114
107
115
```md
108
116
ERROR:
109
117
The shinylive extension must be used in a Quarto project directory
110
118
(with a _quarto.yml file).
111
119
```
112
120
121
+
Ensure that the contents of the `_quarto.yml` file match the following structure:
122
+
123
+
```yaml
124
+
project:
125
+
title: "R-shinylive-demo"
126
+
```
127
+
128
+
Here, the `title` field should contain the name of the Quarto file up to the extension.
129
+
113
130
## Installing the Quarto Extension for r-shinylive
114
131
115
132
**Step 3:** Install the Quarto extension for `shinylive`. In the Terminal tab, run the following command:
0 commit comments