Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qhub_jupyterhub_theme-0.3.0.tar.gz (102.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page