diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 4e7e73a..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# From https://github.com/devcontainers/images/tree/main/src/base-ubuntu -# [Choice] Ubuntu version (use jammy on local arm64/Apple Silicon): jammy, focal -ARG VARIANT="jammy" -FROM buildpack-deps:${VARIANT}-curl - -LABEL dev.containers.features="common" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a4580d1..516dd87 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,69 +1,28 @@ -// For format details, see https://aka.ms/devcontainer.json. -// Base image from https://github.com/devcontainers/images/tree/main/src/base-ubuntu. { - "name": "Quarto", - // "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04", - "build": { - "dockerfile": "./Dockerfile", - "context": ".", - "args": { - "VARIANT": "jammy" - } - }, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + "name": "Quarto Codespaces", + "image": "ghcr.io/mcanouil/quarto-codespaces:latest", "remoteUser": "vscode", - - // Features to add to the dev container. More info: https://containers.dev/features. "features": { - // Setup a non-root user. Note that UID and GID will be updated with local user values. - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": "true", - "username": "vscode", - "userUid": "1000", - "userGid": "1000", - "upgradePackages": "true" - }, - // To latest the latest build of Git. - "ghcr.io/devcontainers/features/git:1": { - "version": "latest", - "ppa": "false" - }, - // To install the latest RIG v1.*. - "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { - "version": "release", // To install the latest R version (default) and other. - "vscodeRSupport": "full", - "installDevTools": "false", - "installREnv": "false", - "installRMarkdown": "false" - }, - // To install the latest Python - // "ghcr.io/devcontainers/features/python:1": { - // "version": "latest" - // }, - // To install the latest Quarto v1.*. - "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": { - "version": "prerelease", - "installTinyTex": "false", - "installChromium": "true" - } + // "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": { + // "version": "prerelease", + // "installTinyTex": "false", + // "installChromium": "false" + // } }, - - // Configure tool-specific properties. "customizations": { "vscode": { "extensions": [ "quarto.quarto", - "REditorSupport.r", - "usernamehw.errorlens" + "REditorSupport.r" ], "settings": { "r.rterm.option": [ "--no-save", "--no-restore-data", "--quiet" - ] + ], + "r.useRenvLibPath": true } } - }, + } } diff --git a/_extensions/coatless/webr/_extension.yml b/_extensions/coatless/webr/_extension.yml index 172077e..934613c 100644 --- a/_extensions/coatless/webr/_extension.yml +++ b/_extensions/coatless/webr/_extension.yml @@ -1,7 +1,7 @@ name: webr title: Embedded webr code cells author: James Joseph Balamuta -version: 0.3.6 +version: 0.3.9 quarto-required: ">=1.2.198" contributes: filters: diff --git a/_extensions/coatless/webr/webr-serviceworker.js b/_extensions/coatless/webr/webr-serviceworker.js index 82f8978..4022c54 100644 --- a/_extensions/coatless/webr/webr-serviceworker.js +++ b/_extensions/coatless/webr/webr-serviceworker.js @@ -1 +1 @@ -importScripts('https://webr.r-wasm.org/v0.2.1/webr-serviceworker.js'); +importScripts('https://webr.r-wasm.org/v0.2.2/webr-serviceworker.js'); diff --git a/_extensions/coatless/webr/webr-worker.js b/_extensions/coatless/webr/webr-worker.js index 12dd0d5..8aa663a 100644 --- a/_extensions/coatless/webr/webr-worker.js +++ b/_extensions/coatless/webr/webr-worker.js @@ -1 +1 @@ -importScripts('https://webr.r-wasm.org/v0.2.1/webr-worker.js'); +importScripts('https://webr.r-wasm.org/v0.2.2/webr-worker.js'); diff --git a/_extensions/coatless/webr/webr.lua b/_extensions/coatless/webr/webr.lua index d4fd401..091b636 100644 --- a/_extensions/coatless/webr/webr.lua +++ b/_extensions/coatless/webr/webr.lua @@ -9,7 +9,7 @@ local hasDoneWebRSetup = false -- https://docs.r-wasm.org/webr/latest/api/js/interfaces/WebR.WebROptions.html -- Define a base compatibile version -local baseVersionWebR = "0.2.1" +local baseVersionWebR = "0.2.2" -- Define where WebR can be found local baseUrl = "https://webr.r-wasm.org/v".. baseVersionWebR .."/" @@ -33,6 +33,9 @@ local showHeaderMessage = "false" -- Define an empty string if no packages need to be installed. local installRPackagesList = "''" + +-- Define whether R packages should automatically be loaded +local autoloadRPackages = "true" ---- --- Setup variables for tracking number of code cells @@ -105,9 +108,9 @@ function setWebRInitializationOptions(meta) -- https://docs.r-wasm.org/webr/latest/api/js/interfaces/WebR.WebROptions.html#channeltype if not is_variable_empty(webr["channel-type"]) then channelType = convertMetaChannelTypeToWebROption(pandoc.utils.stringify(webr["channel-type"])) - if not (channelType == "ChannelType.Automatic" and channelType == "ChannelType.ServiceWorker") then - hasServiceWorkerFiles = false - end + + -- Starting from webR v0.2.2, service workers are only deployed when explicitly requested. + hasServiceWorkerFiles = (channelType == "ChannelType.ServiceWorker") end -- The base URL from where to load JavaScript worker scripts when loading webR @@ -150,6 +153,11 @@ function setWebRInitializationOptions(meta) end installRPackagesList = table.concat(package_list, ", ") + + if not is_variable_empty(webr['autoload-packages']) then + autoloadRPackages = pandoc.utils.stringify(webr["autoload-packages"]) + end + end @@ -292,7 +300,8 @@ function initializationWebR() ["CHANNELTYPE"] = channelType, ["SERVICEWORKERURL"] = serviceWorkerUrl, ["HOMEDIR"] = homeDir, - ["INSTALLRPACKAGESLIST"] = installRPackagesList + ["INSTALLRPACKAGESLIST"] = installRPackagesList, + ["AUTOLOADRPACKAGES"] = autoloadRPackages -- ["VERSION"] = baseVersionWebR } diff --git a/assets/images/pandoc-org.png b/assets/images/pandoc-org.png index 10fd3c0..be79eb4 100644 Binary files a/assets/images/pandoc-org.png and b/assets/images/pandoc-org.png differ diff --git a/assets/images/quarto-chocolatey.png b/assets/images/quarto-chocolatey.png index 9c68608..8c25324 100644 Binary files a/assets/images/quarto-chocolatey.png and b/assets/images/quarto-chocolatey.png differ diff --git a/assets/images/quarto-download.png b/assets/images/quarto-download.png index 63f4290..f3dcefc 100644 Binary files a/assets/images/quarto-download.png and b/assets/images/quarto-download.png differ diff --git a/assets/images/quarto-get-started-jupyter.png b/assets/images/quarto-get-started-jupyter.png index 850180c..da694b6 100644 Binary files a/assets/images/quarto-get-started-jupyter.png and b/assets/images/quarto-get-started-jupyter.png differ diff --git a/assets/images/quarto-get-started-neovim.png b/assets/images/quarto-get-started-neovim.png index f777a6c..2cfbb72 100644 Binary files a/assets/images/quarto-get-started-neovim.png and b/assets/images/quarto-get-started-neovim.png differ diff --git a/assets/images/quarto-get-started-rstudio.png b/assets/images/quarto-get-started-rstudio.png index 75b3af0..5e91a07 100644 Binary files a/assets/images/quarto-get-started-rstudio.png and b/assets/images/quarto-get-started-rstudio.png differ diff --git a/assets/images/quarto-get-started-text-editor.png b/assets/images/quarto-get-started-text-editor.png index a8dd8d2..752ffde 100644 Binary files a/assets/images/quarto-get-started-text-editor.png and b/assets/images/quarto-get-started-text-editor.png differ diff --git a/assets/images/quarto-get-started-vscode.png b/assets/images/quarto-get-started-vscode.png index 31a8b9d..21dbc1a 100644 Binary files a/assets/images/quarto-get-started-vscode.png and b/assets/images/quarto-get-started-vscode.png differ diff --git a/assets/images/quarto-org.png b/assets/images/quarto-org.png index f43973c..3219089 100644 Binary files a/assets/images/quarto-org.png and b/assets/images/quarto-org.png differ diff --git a/assets/images/quarto-project-blog.png b/assets/images/quarto-project-blog.png index 5e8d800..a7a2b8c 100644 Binary files a/assets/images/quarto-project-blog.png and b/assets/images/quarto-project-blog.png differ diff --git a/assets/images/quarto-project-book.png b/assets/images/quarto-project-book.png index e7a5b78..7d89a98 100644 Binary files a/assets/images/quarto-project-book.png and b/assets/images/quarto-project-book.png differ diff --git a/assets/images/quarto-project-default.png b/assets/images/quarto-project-default.png index fddff5a..fec066f 100644 Binary files a/assets/images/quarto-project-default.png and b/assets/images/quarto-project-default.png differ diff --git a/assets/images/quarto-project-manuscript.png b/assets/images/quarto-project-manuscript.png index 843e1f0..d837e73 100644 Binary files a/assets/images/quarto-project-manuscript.png and b/assets/images/quarto-project-manuscript.png differ diff --git a/assets/images/quarto-project-website.png b/assets/images/quarto-project-website.png index 967727d..54fa79f 100644 Binary files a/assets/images/quarto-project-website.png and b/assets/images/quarto-project-website.png differ diff --git a/assets/images/quarto-visual-editor-rstudio.png b/assets/images/quarto-visual-editor-rstudio.png index 2f45dfd..3e3bd91 100644 Binary files a/assets/images/quarto-visual-editor-rstudio.png and b/assets/images/quarto-visual-editor-rstudio.png differ diff --git a/assets/images/quarto-visual-editor-vscode.png b/assets/images/quarto-visual-editor-vscode.png index abf903f..930ce6f 100644 Binary files a/assets/images/quarto-visual-editor-vscode.png and b/assets/images/quarto-visual-editor-vscode.png differ diff --git a/demo/Blog/posts/post-with-code/index.qmd b/demo/Blog/posts/post-with-code/index.qmd index 9d2d00c..6c603e7 100644 --- a/demo/Blog/posts/post-with-code/index.qmd +++ b/demo/Blog/posts/post-with-code/index.qmd @@ -1,7 +1,7 @@ --- title: "Post With Code" author: "Harlow Malloc" -date: "2023-10-20" +date: "2023-11-22" categories: [news, code, analysis] image: "image.jpg" --- diff --git a/demo/Blog/posts/welcome/index.qmd b/demo/Blog/posts/welcome/index.qmd index ccb9dfb..6d6781d 100644 --- a/demo/Blog/posts/welcome/index.qmd +++ b/demo/Blog/posts/welcome/index.qmd @@ -1,7 +1,7 @@ --- title: "Welcome To My Blog" author: "Tristan O'Malley" -date: "2023-10-17" +date: "2023-11-19" categories: [news] --- diff --git a/demo/Book/_quarto.yml b/demo/Book/_quarto.yml index d25194d..3255641 100644 --- a/demo/Book/_quarto.yml +++ b/demo/Book/_quarto.yml @@ -4,7 +4,7 @@ project: book: title: "Book" author: "Norah Jones" - date: "10/20/2023" + date: "11/22/2023" chapters: - index.qmd - intro.qmd diff --git a/gentle-intro-to-quarto.qmd b/gentle-intro-to-quarto.qmd index 77fa9a5..d269030 100644 --- a/gentle-intro-to-quarto.qmd +++ b/gentle-intro-to-quarto.qmd @@ -18,6 +18,8 @@ filters: resources: - webr-serviceworker.js - webr-worker.js +webr: + show-startup-message: false --- ::: {.content-visible when-profile="rlille"} diff --git a/poster.r b/poster.r index 870d8d4..c325246 100644 --- a/poster.r +++ b/poster.r @@ -2,5 +2,6 @@ webshot2::webshot( url = "gentle-intro-to-quarto.html", file = "gentle-intro-to-quarto.png", vwidth = 1920, - vheight = 1080 + vheight = 1080, + delay = 1 ) diff --git a/quarto-extensions.sh b/quarto-extensions.sh index 5e0bedd..1375464 100644 --- a/quarto-extensions.sh +++ b/quarto-extensions.sh @@ -3,3 +3,4 @@ quarto add mcanouil/quarto-revealjs-coeos@v1.3.0 quarto add mcanouil/quarto-iconify@v1.0.7 quarto add quarto-ext/attribution@main +quarto add coatless/quarto-webr@0.3.9 diff --git a/webr-serviceworker.js b/webr-serviceworker.js index 82f8978..4022c54 100644 --- a/webr-serviceworker.js +++ b/webr-serviceworker.js @@ -1 +1 @@ -importScripts('https://webr.r-wasm.org/v0.2.1/webr-serviceworker.js'); +importScripts('https://webr.r-wasm.org/v0.2.2/webr-serviceworker.js'); diff --git a/webr-worker.js b/webr-worker.js index 12dd0d5..8aa663a 100644 --- a/webr-worker.js +++ b/webr-worker.js @@ -1 +1 @@ -importScripts('https://webr.r-wasm.org/v0.2.1/webr-worker.js'); +importScripts('https://webr.r-wasm.org/v0.2.2/webr-worker.js');