diff --git a/README.md b/README.md index 15fa974..9708fb5 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,31 @@ make down See `values.yaml` for all configuration options. The chart wraps the [JupyterHub Helm chart](https://z2jh.jupyter.org/) - all `jupyterhub.*` values are passed through. +## Gallery + +Set `singleuser.gallery.enabled=true` and populate `singleuser.gallery.exhibits` +to surface curated starter notebooks/tutorials in JupyterLab's launcher. Each +exhibit is a Git repo that clones into the user's home on first open: + +```yaml +singleuser: + gallery: + enabled: true + title: "Examples" + destination: "/home/jovyan/gallery" + exhibits: + - title: "Tutorials" + git: "https://github.com/your-org/tutorials" + description: "End-to-end tutorial notebooks" + - title: "Starters" + git: "https://github.com/your-org/starter-notebooks" +``` + +The [jupyterlab-gallery](https://github.com/nebari-dev/jupyterlab-gallery) +extension is baked into the singleuser image; the values block above is the +only deploy-time configuration needed. See the extension README for the full +per-exhibit schema (icons, private-repo auth, etc.). + ## Shared Storage Per-group shared directories (`/shared/` in every user pod) need a diff --git a/templates/singleuser-config.yaml b/templates/singleuser-config.yaml index 88bccf3..f2f1bd8 100644 --- a/templates/singleuser-config.yaml +++ b/templates/singleuser-config.yaml @@ -15,3 +15,12 @@ data: c.TerminalManager.cull_interval = {{ .Values.singleuserCuller.terminal.cullInterval }} c.ServerApp.shutdown_no_activity_timeout = {{ .Values.singleuserCuller.server.shutdownNoActivityTimeout }} + {{- if .Values.singleuser.gallery.enabled }} + + # jupyterlab-gallery: curated notebook exhibits surfaced in the launcher. + # GalleryManager is the traitlet config namespace from + # https://github.com/nebari-dev/jupyterlab-gallery + c.GalleryManager.title = {{ .Values.singleuser.gallery.title | quote }} + c.GalleryManager.destination = {{ .Values.singleuser.gallery.destination | quote }} + c.GalleryManager.exhibits = {{ .Values.singleuser.gallery.exhibits | toJson }} + {{- end }} diff --git a/values.yaml b/values.yaml index ede006e..e71abd8 100644 --- a/values.yaml +++ b/values.yaml @@ -132,6 +132,33 @@ singleuser: gatewayName: nebari-gateway gatewayPort: 10443 + # --------------------------------------------------------------------------- + # jupyterlab-gallery — curated notebook exhibits surfaced in the JupyterLab + # launcher. The extension is baked into the singleuser image + # (images/jupyterlab/pixi.toml); this block controls whether it is + # configured and which exhibits show up. Disabled by default so existing + # deploys see no behavior change. + # https://github.com/nebari-dev/jupyterlab-gallery + # --------------------------------------------------------------------------- + gallery: + enabled: false + # Launcher card title. + title: "Gallery" + # Where exhibit repos are cloned in the user's home. The extension creates + # one subdirectory per exhibit, named after exhibit.title. + destination: "/home/jovyan/gallery" + # List of exhibits. Each entry produces one launcher card. Minimum + # fields: `title` and `git` (a public repo URL). Optional fields: + # `description` (subtitle), `icon` (URL to a thumbnail), `account` and + # `token` for private repos (typically templated from a Secret via + # singleuser.extraEnv rather than hard-coded here). See the extension + # README for the full per-exhibit schema. Example: + # exhibits: + # - title: "Tutorials" + # git: "https://github.com/your-org/tutorials" + # description: "End-to-end notebooks" + exhibits: [] + # ============================================================================= # Singleuser Idle Culler # =============================================================================