Site icon R-bloggers

Embedding a Quarto presentation in a blog post

[This article was first published on datascienceconfidential - r, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This post is a simple demo of how to embed a Quarto presentation in your website.

Quarto is a pretty nice open-source scientific publishing system which enables you to make presentations (powered by revealjs). It’s available by default in recent versions of RStudio. I was recently invited to present one of my models at the Ministry of Transport Te Manatū Waka in New Zealand, and I thought it was a good opportunity to take Quarto for a spin, as I haven’t used it before.

It was quite easy to create a slide deck with a mixture of R, html, markdown, and LaTex. But how to share the slides? Well, it turns out that this is quite easy too. Following a tip from Scott Veirs you can simply place a link to your Quarto document inside an html iframe element. In my case the relevant code is:

<div style="width:90%; margin:0 auto;">
    <iframe src="https://rtrvale.github.io/Talks/mot.html" 
    style="height: 400px; width:100%; border:5px solid #2a76dd; border-radius:15px;"></iframe>
</div>

and here is how it looks:

In particular, the embedded HTML5 animations seem to run without any issues (at least on the browsers and platforms which I have tested so far).

If you’d like to learn more about the actual content of the presentation, I’ve written a longer blog post about it here.

To leave a comment for the author, please follow the link and comment on their blog: datascienceconfidential - r.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Exit mobile version