forked from pangeo-data/pangeo-custom-jupyterhub-templates
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjupyterhub_config.py
49 lines (43 loc) · 1.47 KB
/
jupyterhub_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
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
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
# 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',
'url': 'https://jupyter.org',
},
'operated_by': {
'name': 'Operating Org',
'url': 'https://2i2c.org',
'custom_html': '',
},
'funded_by': {
'name': '',
'url': '',
'custom_html': 'Funding <i>Org</i>',
},
'designed_by': {
'name': 'Funding Org',
'url': 'https://2i2c.org',
'custom_html': '',
}
}
}