jupyterlite-sphinx icon indicating copy to clipboard operation
jupyterlite-sphinx copied to clipboard

Add an `:app:` parameter to the `jupyterlite` directive

Open jtpio opened this issue 2 years ago • 1 comments

Problem

Currently we have a couple of directives for either using the full JupyterLab interface, Notebook or REPL.

However this could be a bit tedious to maintain over time if more apps are added.

Proposed Solution

As noticed in https://github.com/jupyterlite/jupyterlite-sphinx/pull/113#discussion_r1391094214, we could start introduce an :app: parameter to the directive.

To use Jupyter Notebook, this would mean using the notebooks app from JupyterLite:

.. jupyterlite::
   :width: 100%
   :height: 600px
   :app: notebooks
   :prompt: Try classic Notebook!

For JupyterLab:

.. jupyterlite::
   :width: 100%
   :height: 600px
   :app: lab

For REPL:

.. jupyterlite::
   :width: 100%
   :height: 600px
   :app: repl

Additional context

Follow-up to https://github.com/jupyterlite/jupyterlite-sphinx/pull/113#discussion_r1391094214

jtpio avatar Nov 13 '23 13:11 jtpio

That looks like a nice API indeed, thanks for the suggestion! The notebooks app could be used by default.

martinRenou avatar Nov 13 '23 14:11 martinRenou