QHub jupyterhub theme
Project description
Please submit issues to https://github.com/quansight/qhub/issues
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
primary_color
secondary_color
accent_color'
text_color
h1_color
h2_color
Internal options:
cdsdashboards_enabled
cdsdashboards_restricted
qhub_theme_extra_js_urls
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.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 095cf80be3a9afd96326e9f8bf41c7cbd86858434ed5c87f6751a70b9814f005 |
|
MD5 | 7618f22dfaaa092fde1867c92ebf5f33 |
|
BLAKE2b-256 | c7dd70cf5219f8cc2dfe1afebf58860dda4c42cc8a73eee1bd1eda68723bc25e |