QHub jupyterhub theme
Project description
Custom JupyterHub Template for QHub
This repo contains html jinja2 templates for customising the appearance of JupyterHub. Each HTML file here will override the files in https://github.com/jupyterhub/jupyterhub/tree/master/share/jupyter/hub/templates.
Usage
Install qhub_jupyterhub_theme
in your environment
pip install qhub_jupyterhub_theme
Add the following to the jupyterhub configuration to pickup the new jinja2 templates directory and static files.
import tornado.web
import qhub_jupyterhub_theme
c.JupyterHub.extra_handlers = [
(r'/custom/(.*)', tornado.web.StaticFileHandler, {"path": qhub_jupyterhub_theme.STATIC_PATH}),
]
c.JupyterHub.template_paths = [
qhub_jupyterhub_theme.TEMPLATE_PATH
]
Finally customize the templates via the template_vars
. Current
options are:
hub_title
hub_subtitle
welcome
logo
Inspiration is in the test jupyterhub configuration
test_jupyterhub_config.py
.
c.JupyterHub.template_vars = {
'hub_title': 'This is QHub',
'hub_subtitle': 'your scalable open source data science laboratory.',
'welcome': 'have fun.',
}
Testing
Install the development environment
conda env install -f environment.yaml
You do not need to restart jupyterhub to see changes in custom
and
templates
. Run jupyterhub via the test script
jupyterhub --config test_jupyterhub_config.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for qhub_jupyterhub_theme-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03117d170f74cee4eaf936c8238bfefdad1d7bd5fc6552e51973335e7b79b2b0 |
|
MD5 | f427d9bdd77b04834327402d752b0d84 |
|
BLAKE2b-256 | 175bf0a7687c727efea3fff7e5519a2daa55feb121a9d7c8aefe62cdd1ed7761 |