Replies: 2 comments 1 reply
-
Hi @teutoburg! Would you be willing to share a link to your repo, so I can take a closer look? |
Beta Was this translation helpful? Give feedback.
-
I think I'm having a similar issue -- downloading the (Though I would be interested in launch button if I could customize the url more, I just want I'm using text-based notebooks from myst-nb. I can open a bug report if this is unexpected behavior Versions of relevant packages:
Some more details:
|
Beta Was this translation helpful? Give feedback.
-
The (excellent) Sphinx book theme seems to provide the option to include both the (source)
.md
file and the (executed).ipynb
file in the "download button" in the header, for notebooks that use MyST-nb. An example of this can be seen e.g. in https://sphinx-book-theme.readthedocs.io/en/stable/reference/notebooks.htmlI really like this feature, because it allows to only keep the
.md
file in the repo, while also providing the.ipynb
file for users to download and "play with", without having to manually convert it with e.g. jupytext. However, even after two days of trying and googeling and looking through source code, I cannot seem to get this to work for our package's documentation. I have no issues getting the myst-based notebook to run and render in the final documentation, but the download button only shows.md
and.pdf
options.I did find the (probably) relevant section in the theme here: https://github.com/executablebooks/sphinx-book-theme/blob/c47d8e46fbce78492abd8a5adfe41083bb7ba121/src/sphinx_book_theme/header_buttons/launch.py#L59C5-L75C54
But I can't figure out how to get the "paired notebook" in the _sources directory during the build on readthedocs. I thought of putting a jupytext converting command in somewhere, but sphinx-book-theme's own documentation seems to manage it without this arguably hacky solution.
Any help or guidance on this would be greatly appreciated!! I also found a discussion from another project (from May 2023) talking about the exact same issue, without any conclusion, so it would probably be a very useful addition for the theme's documentation in general.
Beta Was this translation helpful? Give feedback.
All reactions