Support for RISE slides
See original GitHub issueDescription
RISE is a Jupyter extension that lets you define reveal.js
presentations with Jupyter Notebooks. It would be useful if, when Jupyter Book builds a book with a notebook that is “a RISE notebook”, that the notebook would be presented in the book as a RISE presentation, instead of a static page of content.
Bonus:
- Enable both slide and standard view (as in nbviewer), with default view set according to RISE’s configuration option in the notebook.
- Special rendering of notes cells in standard view. For now, I am embedding the text in each cell in a directive:
It would be nice to have such a directive on by default, with title “Speaker notes”.```{note} ```
Benefit
RISE is a very popular extension in Jupyter and has been around for a long time. Integrating it with Jupyter Book would offer a nice opportunity for a different pattern of reader interaction, and would support the many notebooks that are already built for RISE presentations.
Implementation
Notebooks are currently parsed by MyST-NB, so this is likely where the change would be. When that parsing is done, the outcome is a docutils doctree. This is the “state of the content” when Jupyter Book builds outputs.
One option would be to build a Sphinx extension that would know how to turn doctree
objects with certain metadata into RISE slideshows on the current page.
Another option would be to add logic to MyST-NB
so that if a RISE notebook is encountered, the RISE assets would also be generated and bundled with the output website, and these assets could be activated from within the page.
Tasks to complete
- Understand the right pattern of user interaction on a page
- Work out implementation details
Issue Analytics
- State:
- Created 3 years ago
- Reactions:24
- Comments:24 (12 by maintainers)
Top GitHub Comments
FYI, in the Scikit-Learn Course jupyter-book, slides are embedded with iframe in the markdown files. See for example: https://inria.github.io/scikit-learn-mooc/overfit/learning_validation_curves_slides.html
This yaml file appears to configure the continuous integration making the slides : https://github.com/INRIA/scikit-learn-mooc/blob/c1158f6492dfd8a8865b24e0268b4bc9a9c02d30/.github/workflows/slides.yml
It is based on the remarker Python package, “a command line tool for generating Remark.js presentations from markdown files.”.
This solution does not have the same purpose as RISE, but it could be nice to have it implemented as an alternative (just sharing the yaml continuous integration file with some doc?) or at least give some inspiration.
For the record: I made a quick attempt with jupyter lab: you can select a range of cells, then choose the cell-slide-type in the property inspector. But it seems to only change the current cell; not all the cells in the range.