Connect static web content with the hub#

The 2i2c hubs can be configured to provide static web content as a JupyterHub service, available at https://<hub-address>/services/docs. This can be a great tool to provide hub-specific documentation right from inside the hub.


To enable the docs service service for a hub:

  1. Mark it as enabled by setting jupyterhub.custom.docs_service.enabled to True in the appropriate file under config/clusters/<cluster-name>.

  2. Specify the GitHub repository where the static HTML files are hosted, by setting jupyterhub.custom.docs_service.repo.

  3. Specify the GitHub branch of the respository where the static HTML files are hosted, by setting jupyterhub.custom.docs_service.docs_service.branch.

Example config:

        enabled: true
        branch: <branch>


Depending on what Static Site Generator has been used to generate the website’s static content, it may or may not use relative paths routing by default. For example, Sphinx handles relative paths by default, whereas, Hugo leaves all relative URLs unchanged.

However, having relative URLS is a must in order for the hub docs service to work. Please check with the docs of your SSG of choice and enable relative URLs if they aren’t enabled already.