Skip to content

docs: add Jupyter Gallery configuration page - #219

Merged
viniciusdc merged 4 commits into
mainfrom
docs/gallery-configuration
Sep 16, 2026
Merged

viniciusdc merged 4 commits into
mainfrom
docs/gallery-configuration

Conversation

@viniciusdc

Copy link
Copy Markdown
Contributor

Adds a Jupyter Gallery page to the docs site, closing #218.

Documents the current reality on main: exhibits have to live in a jupyter_gallery_config.py on the singleuser config path, injected via singleuser.extraFiles. GalleryManager only exists in the singleuser server, so putting it under hub.extraConfig silently no-ops (that was #134).

The page covers three things:

  • Config placement with the verified z2jh singleuser.extraFiles snippet.
  • Exhibit schema (git, title, homepage, description, icon, branch, depth, and account/token for private repos, with the PAT-via-env-var note pointing at the upstream README).
  • The remote-icon trap from the issue thread: an exhibit whose icon is a remote URL fails to load on air-gapped / restricted-egress clusters and leaves a broken-image placeholder with no fallback. The recommendation is to point icon at a local, same-origin asset on those deployments.

I scoped the page deliberately as a workaround doc. #118 proposes a first-class singleuser.gallery values key that removes the hand-rolled config file entirely; if it lands, this page collapses to the values key. There's a "Looking ahead" section that says exactly that so we don't ossify around the workaround. I'm about to run a full review on #118 separately to see if we can just unblock it.

Also adds the page to the Guides sidebar and a row in the configuration reference table.

Documents the current jupyterlab-gallery setup: exhibits must live in a
jupyter_gallery_config.py on the singleuser config path (injected via
singleuser.extraFiles), since GalleryManager only exists in the singleuser
server and hub.extraConfig silently no-ops (#134).

Covers the exhibit schema and the remote-icon trap: an exhibit whose icon is
a remote URL fails to load on restricted-egress clusters with no fallback, so
locked-down deployments should point icon at a local, same-origin asset.

Notes that a first-class singleuser.gallery values key (#118) would supersede
this workaround, so the page is scoped to be replaced once that lands.

Closes #218.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview for docs/gallery-configuration:
https://docs-gallery-configuration.data-science-pack.pages.dev

Comment thread docs/src/content/docs/configuration.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved
Each entry in `c.GalleryManager.exhibits` is a dict. The keys the upstream
`GalleryManager` understands:

| Key | Purpose |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which of these are required?

Comment thread docs/src/content/docs/gallery.md Resolved
Comment thread docs/src/content/docs/gallery.md Resolved

For private repositories, supply `account` and a personal access `token`.
Rather than embedding the token literally in the config, reference it from an
environment variable set on the singleuser pod (for example via

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I actually set this on my deployment? Its something I have to manually set a the k8s level? Will I lose it if I upgrade NIC?

@viniciusdc
viniciusdc merged commit a768c00 into main Sep 16, 2026
15 checks passed
@viniciusdc
viniciusdc deleted the docs/gallery-configuration branch September 16, 2026 16:46
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.

3 participants