-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launch with JupyterLite and RetroLite #655
base: master
Are you sure you want to change the base?
Conversation
Use absolute URL without domain for retrolite
Co-authored-by: Chris Holdgraf <[email protected]>
for more information, see https://pre-commit.ci
/cc @jtpio. Getting this in here would get this into Jupyter Book, which would be a huge benefit |
I wanna say that @martinRenou was doing a lot of work on jupyterlite-sphinx too? We were chatting a bit about it at the jupyterlite meeeting which is what inspired me to breathe life into this PR again haha |
In terms of user experience, I imagine something like the following:
[I note that all source pages in the book source could be converted to
My original intention was simply to be able to run the code in a Jupyter Book page in a browser-based execution environment. When Thebe hits with JupyerLite support, that will provide another way of executing code in-broweser. The JupyterLite approach (Lab or Retro) means you can edit the notebooks and persist changes in browser storage, whereas the Thebe approach limits you to changing just code cell text and not persisting code changes. If a user edits the notebook and saves it to browser storage, there may be a mismatch between the saved, edited notebook and the rendered Jupyter Book/HTML page. (Loosely related: jupyter-book/jupyter-book#1459 ) |
@choldgraf @stevejpurves would you be able to bring me up to speed w.r.t whether this is the direction that we want to take jupyterlite in Jupyter Book (via sphinx-book-theme?) |
One issue I've noted with jupyterlite is that it doesn't seem to behave very well if it's down a path. eg if you publish a Jupyter Book on |
My 2 cents: having the "launch functionality" baked into the HTML theme is an anti-pattern, I'd rather have it handled in a more centralized place that many themes could use (e.g. so that a theme would have access to the URL needed to direct users to a JupyterLite / Binder / etc session, and could place that URL wherever they wanted in the UI). But it's baked into the book theme now so that's where people have been adding functionality. |
Just to say - I hacked this by putting a Makefile target in to do the JupyterLite build, - odsti/cfd-textbook@0c5d91c - and doing a minimal patch to this repo - matthew-brett@1892593 - result e.g. here: https://odsti.github.io/cfd-textbook/using_jupyter.html |
We got bogged down in the original PR1 and I don't have permissions to push to the original branch, so I've opened this one up where we can keep iterating and ported the commit history over to here.
This PR adds support for
jupyterlite-sphinx
as a "launch button". There are still some things to improve that need working out:To do
.ipynb
files so we can't test that this works. We should add one just for a reference in the examples.cc @martinRenou in case he has ideas for any of these, or thoughts on how we could get this working with the "launch buttons" in Jupyter Book.
Footnotes