Prototype single files for web and slides#7
Draft
willgearty wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces some infrastructure to make a single longform module quarto file render well for both a webpage (
html) and for slides (revealjs). At the moment it uses no external extensions.There are two components:
web_and_slides.R: this script can be used to convert a standard longform quarto file to one that supports webpage/slides rendering::: {.narration}, which is treated as notes for revealjs and as normal prose for htmlweb_and_slides.luafilter to the yaml front matter if it isn't there (see # 2 below)execute: output-location: fragmentandexecute: echo: trueto the yaml front matter; this ensures that code chunk output is included in the slides and is added as fragments (separate slides) by defaultrevealjs.smaller = trueto the yaml front matter: this ensures that figures shrink to fit on slides#header with text after it)web_and_slides.lua: contains various filters and processing steps that alter the way the quarto file is rendered to slides.narration(notes for slides, prose for webpage)##) are promoted so each becomes its own slidefragmentfunctionality)So the general workflow would look something like this:
web_and_slides.R.narrationwherever text should be shown on slides verbatimRendered webpage:
https://palaeoverse.org/modules/pr-preview/pr-7/training/modules/ggplot/index.html
Rendered slides:
https://palaeoverse.org/modules/pr-preview/pr-7/training/modules/ggplot/index-slides.html
TODO:
.narrationusageNote that the script and .lua filter were generated iteratively over the course of a substantial conversation with Claude. The original module file was made entirely by me, and I've reviewed all of the code along the way.