Skip to content

docs: make section card grids includable from the top-level gallery#11

Merged
timtreis merged 1 commit into
mainfrom
docs/gallery-single-source
Jul 10, 2026
Merged

docs: make section card grids includable from the top-level gallery#11
timtreis merged 1 commit into
mainfrom
docs/gallery-single-source

Conversation

@timtreis

Copy link
Copy Markdown
Member

Companion to scverse/spatialdata-plot#746.

Why

The top-level docs/gallery.md in spatialdata-plot duplicated the per-notebook cards that also live here in tutorials/index.md / examples/index.md. The two lists were maintained independently across repos and drifted — a notebook added here but not carded in gallery.md was silently missing from the gallery (e.g. "Interactive region annotation" on stable).

What

  • Wrap each section's card grid in <!-- gallery-cards-start --> / <!-- gallery-cards-end --> markers.
  • Switch the card :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 into docs/gallery.md. Notebooks are only ever rendered inside the parent spatialdata-plot docs (mounted at docs/notebooks/, as preview.yaml does), so /notebooks/… is correct in every build.

Follow-up (parent repo)

Once merged, spatialdata-plot bumps its submodule pin and replaces the duplicated cards in docs/gallery.md with 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.html render all tiles (images + links) with no warnings.

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.
@github-actions

Copy link
Copy Markdown

📖 Docs preview: https://scverse.org/spatialdata-plot-notebooks/pr-11/gallery.html

Built from d1a09fc; redeployed on every push.

github-actions Bot pushed a commit that referenced this pull request Jul 10, 2026
@timtreis timtreis merged commit a286ebd into main Jul 10, 2026
3 checks passed
@timtreis timtreis deleted the docs/gallery-single-source branch July 10, 2026 14:21
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant