docs: make section card grids includable from the top-level gallery#11
Merged
Conversation
Wrap each section's card grid in <!-- gallery-cards-start/end --> markers and switch the card links/images to root-relative paths (/notebooks/...), which resolve identically on the section index pages and when included elsewhere in the spatialdata-plot docs. This lets docs/gallery.md include these card blocks instead of maintaining a second, hand-curated copy that silently drifts out of sync (scverse/spatialdata-plot#746). Notebooks are only ever rendered inside the parent spatialdata-plot docs (mounted at docs/notebooks/), so the root-relative paths are correct in every build.
|
📖 Docs preview: https://scverse.org/spatialdata-plot-notebooks/pr-11/gallery.html Built from d1a09fc; redeployed on every push. |
timtreis
added a commit
to scverse/spatialdata-plot
that referenced
this pull request
Jul 10, 2026
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.
timtreis
added a commit
to scverse/spatialdata-plot
that referenced
this pull request
Jul 10, 2026
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.
timtreis
added a commit
to scverse/spatialdata-plot
that referenced
this pull request
Jul 10, 2026
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.
Companion to scverse/spatialdata-plot#746.
Why
The top-level
docs/gallery.mdinspatialdata-plotduplicated the per-notebook cards that also live here intutorials/index.md/examples/index.md. The two lists were maintained independently across repos and drifted — a notebook added here but not carded ingallery.mdwas silently missing from the gallery (e.g. "Interactive region annotation" on stable).What
<!-- gallery-cards-start -->/<!-- gallery-cards-end -->markers.:link:/:img-top:to root-relative paths (/notebooks/tutorials/…,/notebooks/_static/img/…).Root-relative paths resolve identically (a) on these index pages and (b) when the block is
{include}-d intodocs/gallery.md. Notebooks are only ever rendered inside the parentspatialdata-plotdocs (mounted atdocs/notebooks/, aspreview.yamldoes), so/notebooks/…is correct in every build.Follow-up (parent repo)
Once merged,
spatialdata-plotbumps its submodule pin and replaces the duplicated cards indocs/gallery.mdwith an{include}of these marker blocks — so the gallery renders these exact tiles and can never fall out of sync again.Verification
Built the full parent docs against this branch: both the section index pages and the aggregated
gallery.htmlrender all tiles (images + links) with no warnings.