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: README.qmd
+36-18Lines changed: 36 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -169,18 +169,39 @@ while the size of the `rwasmrepo` is only 6.87 MB of the total compressed space.
169
169
170
170
## Accessing Binaries
171
171
172
-
Inside of a webR session, you can access the built binaries by using
173
-
the repository's GitHub Pages URL, e.g.
172
+
In a webR session, access the built binaries using the repository's GitHub Pages URL, for example:
174
173
175
-
```default
174
+
```
176
175
https://gh-username.github.io/repo-name
177
176
```
178
177
179
-
This can be set either using `options()` or specifying the location in each
180
-
`webr::install()` call.
178
+
Depending on where you are using the custom R WASM package binary, you can
179
+
register this repository in different ways:
180
+
181
+
1. Using the `repos` key inside of the `quarto-webr` extension;
182
+
2. Using `options()` to set values for both `repos` and `webr_pkg_repos`; or,
183
+
3. Using the `repos` parameter in each `webr::install()` call.
184
+
185
+
### `repos` Document key in `{quarto-webr}`
186
+
187
+
With version v0.4.0 of the `{quarto-webr}` extension, the repository
188
+
can be included by using the [`repos` key in the document header](https://quarto-webr.thecoatlessprofessor.com/qwebr-using-r-packages.html#custom-repositories):
189
+
190
+
```md
191
+
---
192
+
webr:
193
+
packages: ['pkgname']
194
+
repos:
195
+
- https://gh-username.github.io/repo-name
196
+
filters:
197
+
- webr
198
+
---
199
+
```
200
+
201
+
### Specifying repo urls with `options()`
181
202
182
-
The easiest is probably to define the location webR should search for in
183
-
`options()`.
203
+
To define the location webR should search for in`options()`, we need to
204
+
set both `repos` and `webr_pkg_repos`.
184
205
185
206
```r
186
207
## Run once at the start of the session
@@ -189,6 +210,7 @@ The easiest is probably to define the location webR should search for in
We do not suggest modifying at the initialization phase the [`repoUrl`](https://docs.r-wasm.org/webr/latest/api/js/interfaces/WebR.WebROptions.html#repourl) option in [`WebR({})`](https://docs.r-wasm.org/webr/latest/api/js/classes/WebR.WebR.html) as that will limit the packages to only one repository (e.g. the custom repository).
220
-
:::
221
-
222
243
:::{.callout-important}
223
-
Please make sure the repository's [GitHub Pages website is available over `HTTPS`](https://docs.github.com/en/pages/getting-started-with-github-pages/securing-your-github-pages-site-with-https#enforcing-https-for-your-github-pages-site) not `HTTP` (notice the lack of an `s`).
224
-
You can verify this option was selected by:
225
244
226
-
1. Going to the repository's **Settings** page
227
-
2. Selecting **Pages** under **Code and automation**
228
-
3. Checking the **Enforce HTTPS** button.
245
+
Ensure the repository's [GitHub Pages website is available over `HTTPS`](https://docs.github.com/en/pages/getting-started-with-github-pages/securing-your-github-pages-site-with-https#enforcing-https-for-your-github-pages-site) (not `HTTP`). Verify this option in the repository's **Settings** page under **Code and automation** > **Pages** > **Enforce HTTPS**.
229
246
230
-
Otherwise, you will receive the error message of:
247
+
Otherwise, you might encounter an error:
231
248
232
249
```
233
250
Warning: unable to access index for repository http://gh-username.github.io/repo-name/bin/emscripten/contrib/4.3
234
251
```
235
252
:::
236
253
254
+
237
255
## Verify
238
256
239
257
Go to the [webR REPL Editor](https://webr.r-wasm.org/v0.2.2/) (pinned to v0.2.2)
0 commit comments