Skip to content
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

Exporting JupyterLite notebook site rooted on ./index.html #154

Open
psychemedia opened this issue Mar 21, 2024 · 2 comments
Open

Exporting JupyterLite notebook site rooted on ./index.html #154

psychemedia opened this issue Mar 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@psychemedia
Copy link

The current build (using the XML formatter) generates an element of the form:

 <NotebookLiteIframe height="600px" iframe_src="lite/tree/" prompt="Try classic Notebook!" prompt_color="True" search_params="false" width="100%">

where the the iframe_src points to the path lite/tree/ which in turn loads assests from the parent dir...

Is it possible to generate a "flat" distribution rooted on ./index.html?

I have a requirement of bundling the site as an html.zip file where the entry point MUST be ./index.html, rather than anything down a path.

@psychemedia psychemedia added the enhancement New feature or request label Mar 21, 2024
@Carreau
Copy link
Collaborator

Carreau commented Mar 25, 2024

As far as I can tell, JUPYTERLITE_DIR = "lite" is set as a global variable here:

And "tree" is set at least here:

Changing them to empty string make the build fails:

Handler <function overwrite_pygments_css at 0x1038618a0>
     for event 'build-finished' threw an exception
     (exception: [Errno 2] No such file or directory:
      '.../docs/build/html/_static/pygments.css')

So there are likely some interaction between sphinx and jupyterlite itself.

Is that ok, if just the index.html is moved, or do you really need all the lite/tree to also be flatten ?

@psychemedia
Copy link
Author

In my use case, the assets need to be delivered as a zip file with the index.html at the root and as the only entry point. (The use case is a learning environment that accepts a zip file the contents of which populate an iframe with a hardwired ./index.html src value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants