Skip to content

Conversation

@melissawm
Copy link
Contributor

My use case is the following: I'd like to use the jupyterlite directive to open the full page I am visiting as a Jupytext notebook. This PR adds that option to the JupyterLite directive.

Pending is finding the correct path for opening the current file as an ipynb file: since the source is an .md file, it will be converted into an .ipynb file at some point in the build process. For now, however, Sphinx can't process the directive since it will try to embed a link to the ipynb file before reading the current source .md file, and complain about the missing reference.

I am not sure if I am following the right path here so please let me know if I should approach this differently.

cc @agriyakhetarpal

@martinRenou martinRenou added the enhancement New feature or request label Apr 16, 2024
@melissawm
Copy link
Contributor Author

Here is an example of this working (partially): https://melissawm.github.io/scipy/tutorial/stats/sampling.html

@martinRenou
Copy link
Member

martinRenou commented Apr 16, 2024

Thanks for contributing!

It's deployed in the readthedocs preview: https://jupyterlite-sphinx--165.org.readthedocs.build/en/165/directives/jupyterlite.html

Changes look good to me. I was about to suggest doing the same for other directives, but when we implement #114, we can make sure the :new_tab: parameter works well with the coming :app: parameter, so let's not bother about this in this PR?

Leaving this open to let other people have a look.

@melissawm
Copy link
Contributor Author

I'm happy to do a follow up for that in the future, I might need some time togo over the app parameter and understand the effects if that's alright. Thanks!

Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
Copy link
Collaborator

@Carreau Carreau left a comment

Choose a reason for hiding this comment

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

All good on my side, I'll leave ~24h in case of objections and merge after that.

Thanks @melissawm

@Carreau
Copy link
Collaborator

Carreau commented May 7, 2024

Completely forgot to merge, sorry. Merging.

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

Successfully merging this pull request may close these issues.

3 participants