docs(gallery): derive the gallery from the notebook sources#752
Merged
Conversation
b51c448 to
391bf18
Compare
The Gallery page duplicated the per-notebook cards that also live in the notebooks submodule's section index pages, and the two lists drifted across repos: a notebook added to the submodule but not carded in gallery.md was silently missing from the gallery (e.g. 'Interactive region annotation'). Include the section card blocks from the submodule (scverse/spatialdata-plot-notebooks#11 added the markers and root-relative paths) instead of maintaining a second copy, and bump the submodule pin. gallery.html now renders these exact tiles from a single source, so a newly added notebook appears automatically and the gallery can never fall out of sync. Removes the now-orphaned _static/gallery images (the section cards use _static/img). Fixes #746.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #746.
Problem
The Gallery page (
docs/gallery.md) duplicated the per-notebook grid cards that also live in the notebooks submodule's section index pages (notebooks/tutorials/index,notebooks/examples/index). Because the two lists are maintained independently in separate repos, they drift: adding a notebook requires editing both, and whengallery.mdis missed the Gallery silently omits the notebook.That's exactly what happened with "Interactive region annotation" — present on the Examples index page but missing from the Gallery on stable (v0.4.0). #689 patched that one card on
main, but the structural drift remained.Fix
Make the section index pages (which live next to the notebooks) the single source.
docs/gallery.mdkeeps its intro and a visible{toctree}to those pages instead of re-listing cards, so every notebook appears automatically and the Gallery can never fall out of sync. Removed the now-orphaned card images under_static/gallery/(the section cards use_static/img/).Verification
Built the docs (
nb_execution_mode = "off"): the generatedgallery.htmllinks all notebooks — including a WIPnormalization_and_contrasttutorial that has nogallery.mdcard, proving a new notebook now shows up with zerogallery.mdedits. No new gallery/toctree warnings.Notes
{include}the section card blocks instead — but the toctree is the drift-proof, single-repo change.