jupyterlite / jupyterlite-sphinx

Sphinx extension using JupyterLite to render Notebooks
https://jupyterlite-sphinx.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
67 stars 21 forks source link

Possible to make whole page activate as jupyter lite #2

Open ianhi opened 2 years ago

ianhi commented 2 years ago

Is it's possible to make the entire page active as a jupyter kernel? So if I wrote the docs as a notebook then they just become active.

Currently the jupyter part is contained: image

From this thebe issue: https://github.com/executablebooks/thebe/issues/465#issuecomment-908079835 I guess the struggle is that this would require implementing a new frontend to communicate with the backend?

Or maybe a wilder idea is a jlab extension to make jupyterlab look like a docs website, then it would be easy to have jupyterlite run everything.

martinRenou commented 2 years ago

Indeed, it would be nice to share one kernel for all the consoles in the page 👍🏽

bollwyvl commented 2 years ago

look like a docs website,

right, i think that's achievable, but probably out of scope for this initial go-around. the prototype form is https://github.com/jupyterlite/jupyterlite/issues/148, but we imagine extending it to a JSON schema for composing custom jupyter experiences from top-level applications.

share one kernel for all the consoles

this challenge is being discussed here: https://github.com/jupyterlite/jupyterlite/issues/463. the idea would be to offer more than just "iframe kernel," or "webworker kernel," but a composite of "webworker-in-an-iframe kernel" as a stand-in for "sharedworker kernel," which is not widely-distributed yet due to (sound) limitations by the browser security model.

amueller commented 2 years ago

So is there a downside to do the whole thing within a jupyter lab and have a plugin that renders the docs similar to what is shown in sphinx?