Connect static web content with the hub
Connect static web content with the hub#
The 2i2c hubs can be configured to provide static web content as a JupyterHub service, available
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:
Mark it as enabled by setting
jupyterhub.custom.docs_service.enabledto True in the appropriate file under
Specify the GitHub repository where the static HTML files are hosted, by setting
Specify the GitHub branch of the respository where the static HTML files are hosted, by setting
jupyterhub: custom: docs_service: enabled: true repo: https://github.com/<static-web-files-repo-name> 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.