This repository holds a template for customising a Binder homepage.
See the BinderHub Customisation documentation for more details.
This can be any valid image type, for example PNG, JPEG, SVG...
Change <custom-logo-file>
on line 3 of page.html
to the name of your custom logo file.
Add the following to your config.yaml
file.
config:
BinderHub:
template_path: /etc/binderhub/custom/templates
extra_static_path: /etc/binderhub/custom/static
extra_static_url_prefix: /extra_static/
template_variables:
EXTRA_STATIC_URL_PREFIX: "/extra_static/"
initContainers:
- name: git-clone-templates
image: alpine/git
args:
- clone
- --single-branch
- --branch=master
- --depth=1
- --
- https://github.com/<your-github-username>/binderhub-custom-files
- /etc/binderhub/custom
securityContext:
runAsUser: 0
volumeMounts:
- name: custom-templates
mountPath: /etc/binderhub/custom
extraVolumes:
- name: custom-templates
emptyDir: {}
extraVolumeMounts:
- name: custom-templates
mountPath: /etc/binderhub/custom
NOTES:
- Remember to replace
<your-github-username>
in the repo URL - If you have commited the changes in steps 2 or 3 to any other branch of your fork, you either need to merge to
master
or change the--branch=
argument to match the name of your branch.
Upgrade your BinderHub with the following command.
helm upgrade <hub-name> jupyterhub/binderhub --version=0.2.0-<commit-hash> -f path/to/secret.yaml -f path/to/config.yaml
where <hub-name>
is the nam
/namespace
you gave to your BinderHub when you deployed it, and <commit-hash>
is the version of the BinderHub Helm Chart you deployed.
Other Helm Chart commit hashes are available here.
Now visit your Binder page to see your new logo!
To get the IP address, run the following command and copy the output of EXTERNAL-IP
into a browser.
kubectl get svc binder --namespace <hub-name>