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

Fix the opening of notebooks in a new tab when using the JupyterLite, NotebookLite, and Voici directives #220

Conversation

agriyakhetarpal
Copy link
Member

Description

The JupyterLite directive allows for a :new_tab: configuration option that was established in #165, which does what it says: provide a button to open a notebook file passed to it with the JupyterLite interface in a new tab. This PR adds the index.html prefix to the URL similar to #182 to fix the loading of the notebooks – without this, we arrive at the file server and JupyterLite does not load until we browse into the docs/_contents/ directory ourselves.

Changes made

  • The index.html prefix has been added to the JupyterLite app URLs for all directives/apps. This prefix previously existed only for the TryExamples directive.

Additional context

I came across this when testing the SciPy docs builds locally when attempting a fix for #191 while working on the scipy.stats notebooks, which did not load properly in new tabs until this change was made.

cc: @melissawm

@agriyakhetarpal agriyakhetarpal force-pushed the fix/new-tab-for-jupyterlite-directive branch from a831b91 to 4bb0660 Compare December 3, 2024 02:04
@agriyakhetarpal agriyakhetarpal added this to the 0.16.6 milestone Dec 3, 2024
Copy link
Contributor

@melissawm melissawm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@agriyakhetarpal agriyakhetarpal deleted the fix/new-tab-for-jupyterlite-directive branch December 11, 2024 22:50
@agriyakhetarpal agriyakhetarpal restored the fix/new-tab-for-jupyterlite-directive branch December 11, 2024 22:50
@agriyakhetarpal
Copy link
Member Author

Closed in error, wanted to delete a different branch!

@agriyakhetarpal
Copy link
Member Author

Actually, I'd like to self-merge this for now since the changes are pretty minimal, and I'm opening a new PR that relies on them 😄 Thanks!

@agriyakhetarpal agriyakhetarpal changed the title Fix the opening of notebooks in a new tab when using the JupyterLite directive Fix the opening of notebooks in a new tab when using the JupyterLite and Voici directives Dec 11, 2024
@agriyakhetarpal agriyakhetarpal merged commit d035b9e into jupyterlite:main Dec 11, 2024
7 of 8 checks passed
@agriyakhetarpal agriyakhetarpal deleted the fix/new-tab-for-jupyterlite-directive branch December 11, 2024 22:55
@agriyakhetarpal agriyakhetarpal changed the title Fix the opening of notebooks in a new tab when using the JupyterLite and Voici directives Fix the opening of notebooks in a new tab when using the JupyterLite, NotebookLite, and Voici directives Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants