Based off Seminar
-
Seminar plugin allows users to control the presentation for other users who open the same presentation by connecting the presentation to a socket.io server
-
The plugin works great natively in
revealjshowever, in quarto the plugin must involve a postprocessing script otherwise it will not work
-
The
yamlin quarto cannot currently call functions to otherjavascriptcode. Allyamlseems to get rendered with quotations (but this is by design of ayaml) -
The
postprocess.pycarries out a search and replace for theyamlwords that need to be changed.
-
This inherently stops some usability, however again this is by design to prevent the rendering of quarto documents from breaking entirely
-
This however means that custom things can be hard to accomplish (like the Seminar plugin) without a postprocessing script
- An example
yamlfor using seminar
title: Quarto and seminar plugin
format:
revealjs:
self-contained: true
revealjs-plugins:
- seminar
include-after-body: custom.js
menu:
themes: false
transitions: false
markers: true
hideMissingTitles: true
custom:
- title: "Broadcast"
icon: '<i class="fas fa-rss"></i>'
content: foobar- Here foobar is replaced to call the function
getSeminarMenu()
quarto render
(If not using the _quarto.yml file then manually after quarto render:
- run
uv run postprocess.py
Do not change foobar (located inside index.qmd) and barfoo (located inside ./seminar/plugin.yml) these are necessary to inject some custom html and/or javascript later during the postprocessing.
- The user can edit the fields
-
server
-
room and
-
hash in the file
./seminar/plugin.yml
plugin.yml. These should be changed so that it works with your socket.io server. An example socket.io server