Skip to content

Commit

Permalink
Allow markdown to receive the {webr-r} components. (#152)
Browse files Browse the repository at this point in the history
* Allow markdown to receive the webr-r components.

* Add Claudiu's and Cara's posts.

* Add release note
  • Loading branch information
coatless authored Feb 5, 2024
1 parent aafa8d9 commit b9036bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _extensions/webr/webr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ local function enableWebRCodeCell(el)

-- Verify the element has attributes and the document type is HTML
-- not sure if this will work with an epub (may need html:js)
if not (el.attr and quarto.doc.is_format("html")) then
if not (el.attr and (quarto.doc.is_format("html") or quarto.doc.is_format("markdown"))) then
return el
end

Expand Down
4 changes: 4 additions & 0 deletions docs/qwebr-community-examples.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Do you have your own project or example that incorporates `quarto-webr`? We invi

# Blog posts


- [Claudiu Papasteri](https://github.com/ClaudiuPapasteri)'s post on [Hugo blogdown posts with in-browser interactive code chunks using webR and Quarto?](https://claudiu.psychlab.eu/post/hugo-blogdown-interactive-code-chunk-webr-quarto/). Feb 5th, 2024.
- [Source](https://github.com/ClaudiuPapasteri/cpapasteri.github.io/tree/5697e7366fab31d17ab41665e37a0839bc9e1bab/content/post/2024-02-05-hugo-blogdown-posts-with-in-browser-interactive-code-chunks-using-webr-and-quarto)
- [Cara Thompson](https://github.com/cararthompson)'s post on [A quick experiment with WebR: how much can I do in under an hour?](https://www.cararthompson.com/posts/2024-02-01-experimenting-with-webr/). Feb 2nd, 2024.
- [Matt Dray](https://www.matt-dray.com/)'s post on [Pseudo-apps in the browser with WebR and Quarto?](https://www.rostrum.blog/posts/2024-01-20-webr-remote/). Jan 20th, 2024.
- [Source](https://github.com/matt-dray/rostrum-blog-2/tree/9a533bd968743c429a2376288c1600dd20a158b7/posts/2024-01-20-webr-remote)
- [James Goldie](https://github.com/jimjam-slam)'s post on [Your new R package? Write a WebR blog post for it](https://jamesgoldie.dev/writing/your-new-r-package-webr/). Jan 19th, 2024.
Expand Down
1 change: 1 addition & 0 deletions docs/qwebr-release-notes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ format:
- Added new CSS IDs governing the webR initialization state. ([#110](https://github.com/coatless/quarto-webr/issues/110))
- Added shim that overrides `install.packages()` with `webr::install()` through `webr::shim_install()` this requires webR v0.2.2 to be in use. ([#122](https://github.com/coatless/quarto-webr/issues/122))
- Added the keyboard shortcut for Run Code -- `Shift + Enter` -- to mouseover text for the Run Code button. ([#91](https://github.com/coatless/quarto-webr/pulls/138))
- Allow `{webr-r}` code cell to propagate into Quarto `markdown` formats for `hugo-md`. ([#150](https://github.com/coatless/quarto-webr/issues/150), h/t [@ClaudiuPapasteri](https://github.com/ClaudiuPapasteri))
- Updated the version of the MonacoEditor from 0.43.0 to 0.45.0. ([#130](https://github.com/coatless/quarto-webr/pull/130))
- Updated the version of the FontAwesome from 6.4.2 to 6.5.1. ([#131](https://github.com/coatless/quarto-webr/pull/131))

Expand Down

0 comments on commit b9036bd

Please sign in to comment.