-
Notifications
You must be signed in to change notification settings - Fork 84
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
Enable thumbnail galleries of notebooks #396
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Heya, just to quickly note, I am certainly interested in something like this 👍 See e.g.: |
Just to say that I support that, it would be a great feature! |
This would be quite useful for pymc as well: docs.pymc.io |
@twiecki, it seems that PyMC Examples already has a neat script set up to generate a gallery of notebooks:
Could this be adapted for use with MyST-NB? Would be happy to contribute to the PR once you have a first draft. We would be happy to see this feature in MyST-NB, since |
@michaelweinold That is using NBs directly it seems. I'm sure it could be adapted but I won't be able to help in that effort but would cheer on any such effort :). |
I wanted to check in, what is the current status of this? Has anyone put together a simple way to generate a thumbnail gallery? |
Describe the problem/need and solution
Context
I'm working on a pull request to consider switching from nbsphinx to MyST-NB. Our documentation currently has thumbnail galleries that were created using the
nbgallery
directive from nbsphinx. The instructions in the MyST-NB documentation currently state that the notebooks should be included in a Sphinx:toctree:
directive, which puts them in a table of contents format without thumbnail images.Problem / Idea
I would like to use MyST-NB and be able to generate thumbnail galleries of example notebooks.
Solution
Ideally, I would like to be able to use a directive similar to
nbgallery
from nbsphinx when using MyST-NB. One possibility would be to make it so that this directive would be able to be used when MyST-NB is enabled as a Sphinx extension.Another possibility would be to add an example in the documentation of how to use another Sphinx extension to create a thumbnail gallery while using MyST-NB for processing notebooks.
Benefit
The ability to generate a thumbnail gallery would remove a blocker that could prevent projects from switching to MyST-NB from nbsphinx or sphinx-gallery.
Guide for implementation
This comment describes a hack to generate a thumbnail gallery via nbsphinx while still using MyST-NB for tasks besides the thumbnail gallery.
My current understanding is that the code used to generate a thumbnail gallery has generally been bundled to the code used for processing notebooks. Ideally these would be decoupled from each other, which would make it easier to switch between sphinx-gallery, nbsphinx, and MyST-NB.
Along these lines, I'm also wondering if it would be possible to import only the
nbgallery
directive from nbsphinx to avoid needing to duplicate code.Thank you!
Tasks and updates
No response
The text was updated successfully, but these errors were encountered: