sphinx-book-theme icon indicating copy to clipboard operation
sphinx-book-theme copied to clipboard

Launch in jupyterlite

Open psychemedia opened this issue 3 years ago • 6 comments

Update to theme to demonstrate a RetroLite launcher that allows you to open a page generated from a notebook as a notebook in JupyterLite.

psychemedia avatar May 04 '22 15:05 psychemedia

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:

welcome[bot] avatar May 04 '22 15:05 welcome[bot]

This looks pretty awesome! Any way to get this reviewed?

yuvipanda avatar Jun 27 '22 21:06 yuvipanda

here is a PR to this PR that got it working for me: https://github.com/ouseful-PR/sphinx-book-theme/pull/3

yuvipanda avatar Jun 27 '22 22:06 yuvipanda

Once that PR lands and this lands, adding jupyterlite was trivial https://github.com/yuvipanda/textbook/commit/eb4edf23624de05097ad373c9e60c1da22549386

yuvipanda avatar Jun 28 '22 06:06 yuvipanda

IIRC, there was also a workflow issue in making sure files got copied over to the build/distribution directory. I think https://github.com/jupyterlite/jupyterlite-sphinx/commit/944ccf4ee977627dbf75b5ae1994c08718566c76 helps in this respect (I haven't tried, but it looks like you can specify a directory from which files are copied). It would perhaps be cleaner on the jupyterlite-sphinx side if you could also enable files that are build from from the Sphinx toc file get copied over if they are eeg .ipynb notebooks?

psychemedia avatar Jun 28 '22 08:06 psychemedia

Yeah - it looks like JupyterLite has the assumption of a user-provided folder of notebooks to launch JupyterLite with. What we want is to ensure that any page that is .ipynb also exists in the JupyterLite contents folder with the relative path maintained relative to the docs root

choldgraf avatar Jun 28 '22 08:06 choldgraf

I'm gonna close this one and take development over to this PR (after porting over commit history):

  • https://github.com/executablebooks/sphinx-book-theme/pull/655

I tried this out again and I think there's still some stuff to figure out before we can merge it in (e.g. the paths in the links don't seem to work properly right now).

choldgraf avatar Dec 09 '22 14:12 choldgraf