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.
from qhub_jupyterhub_theme import theme_extra_handlers, theme_template_paths
c.JupyterHub.extra_handlers = theme_extra_handlers
c.JupyterHub.template_paths = theme_template_paths
Finally customize the templates via the template_vars. Current
options are:
hub_titlehub_subtitlewelcomelogoprimary_colorsecondary_color- `accent_color'
text_colorh1_colorh2_colornavbar_text_colornavbar_hover_color
Internal options:
cdsdashboards_enabledcdsdashboards_restrictedqhub_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
To run in VSCode, here is a launch.json config:
{
"name": "JupyterHub test",
"type": "python",
"request": "launch",
"module": "jupyterhub",
"args": ["-f", "./test_jupyterhub_config.py"],
"cwd": "${workspaceFolder}"
}
You would need to make sure the Python virtualenv you've set up for this is active in the project.
Changelog
Version 0.3.6
- Extend navbar links #16
Version 0.3.5
- Updates to the version display style #15
Version 0.3.4
- Updades to Readme
- Expose navbar color options #12
- Add option to display Qhub version #13
Version 0.3.3
- Simplify the JupyterHub config (backwards-compatible)
- Added testing docs for VScode
Version 0.3.2
- Added Dashboards menu page and header
- Added custom js tag functionality #11
Version 0.3.1
- Add text color and defaults to template options #9
Version 0.3.0
- Adds colors! 🎉
Metadata
Release files for qhub-jupyterhub-theme 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qhub_jupyterhub_theme-0.3.6.tar.gz | 105.6 kB | Without provenance | Details for qhub_jupyterhub_theme-0.3.6.tar.gz |
Release files / qhub_jupyterhub_theme-0.3.6.tar.gz
| Download URL | qhub_jupyterhub_theme-0.3.6.tar.gz |
|---|---|
| Size | 105.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d6bac64035da6d65034f7f7797802ac233da36052d6f8850389fd78b58ddbe4
|
|
BLAKE2b-256 checksum How to use checksums |
fbb964ca85a42353128c627a1343d65652b56fd487d9418a548acabd54cc2135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.14
|
Security for qhub-jupyterhub-theme 0.3.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.