Where to put RevealJS libraries

I'm a professor and I write a lot of lectures using RMarkdown and RevealJS.

One annoyance that I have is that knitting a file involves either 1) Having a ton of revealjs files in the directory with my HTML file or 2) Creating a standalone file that takes a while to generate and is unnecessarily large. Option 1 isn't terrible but it has some downsides, e.g., cluttering up my git history and making it tough to track important changes.

The ideal (IMO) is to be able to point my Quarto file at a libs directory where all of the CSS and revealjs files can go, and all of my presentations can just share that directory. A hero created a way to do that - Allow `lib_dir` not to be a descendant of the base directory for documents derived from `html_document_base` by jonathan-g · Pull Request #2199 · rstudio/rmarkdown · GitHub - but it looks like it isn't supported in Quarto, which (AFAICT) no longer even offers the option to change the lib directory.

Am I missing something?

yes Quarto works a bit differently that rmarkdown and there is not lib_dir configuration. Managing paths is complicated and prone to errors so everything is currently located right next to the files. However, lib_dir is a output type of folder, not a source type. Using Quarto projects, you could have specific output directory to store everything.

I understand from the above that you are tracking on git your output and not just your inputs ? is that right ? Usually the source should be enough to reproduce and track on git. Especially using the freeze feature that allow to quickly reproduce an output without any recompute if nothing changed. (see Quarto - Managing Execution)

If none exist yet, you could open an issue in Quarto repo to discuss a solution.

Only option that could help for revealjs is reveal-js-url to change the revealjs version used: Quarto - Revealjs Options

Thanks so much for the response.

I have been using Github Pages to serve the RevealJS slides, so that is why I am tracking the outputs.

In my case, having the reveal-js-url option will make a big difference. Thanks so much for the pointer!

I see. Quarto has a way to publish to gh-pages easily: Quarto - GitHub Pages. Usually duplication of resources is not something I look too much as it leaves in another branch where I published directly without checking change - I am trusting review in source.

Anyhow, possibly reveal-js-url will help you here;

Do no hesitate to open a feature request if something is missing for your workflow.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.