diff --git a/jupyterhub_config.py b/jupyterhub_config.py index 2a51eb4..697882c 100644 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -1,23 +1,30 @@ +""" +jupyterhub_config purely used for testing changes to templates. + +See README.md for information on how to test this out. +""" import pathlib from oauthenticator.generic import GenericOAuthenticator from jupyterhub.spawner import SimpleLocalProcessSpawner -c.JupyterHub.spawner_class = SimpleLocalProcessSpawner - HERE = pathlib.Path(__file__).parent +# Add templates from our local checkout to the path JupyterHub searches +# This allows us to override any template present in upstream +# jupyterhub (https://github.com/jupyterhub/jupyterhub/tree/main/share/jupyterhub/templates) +# locally c.JupyterHub.template_paths = [str(HERE / 'templates')] +# We use this so we can get a 'login' button, instead of a username / password +# field. c.JupyterHub.authenticator_class = GenericOAuthenticator -c.Authenticator.admin_users = [ - 'yuvipanda' -] - +# Variables that are passed through to templates! c.JupyterHub.template_vars = { 'custom': { "interface_selector": True, + "default_url": "/rstudio", 'org': { 'name': 'University of Foo', 'logo_url': 'https://jupyter.org/assets/nav_logo.svg', diff --git a/templates/login.html b/templates/login.html index 276a234..0512c69 100644 --- a/templates/login.html +++ b/templates/login.html @@ -34,13 +34,25 @@