Jupyterhub Sphinx Theme

screenshot of Jupyterhub Sphinx Theme

A lightweight wrapper theme for Sphinx based on the PyData Sphinx Theme

Overview

The JupyterHub Documentation Theme is a lightweight theme built on the PyData Sphinx Theme. It is designed for use by the JupyterHub community and aims to standardize styles and a top-bar that can be shared across all JupyterHub documentation. The theme makes minimal changes to the PyData Sphinx Theme, primarily focusing on setting default values to ensure a consistent look and feel.

Features

  • Style: Sets the primary color to a slightly-darkened "Jupyter orange", removes the primary color from headers, and makes them bold to increase visibility. It also aligns the header links to the left.
  • Logo and Branding: Adds a light/dark mode JupyterHub logo and a favicon. It also includes icon links for Discourse, Team Compass, and Jupyter.org.
  • Extensions: Includes the sphinx-copybutton extension for copy buttons in code cells and sphinxext-opengraph for OpenGraph protocol metadata. The site_url is automatically detected via ReadTheDocs or GitHub Actions environment variables in CI/CD.

Summary

The JupyterHub Documentation Theme is a lightweight theme based on the PyData Sphinx Theme. It provides a standardized look and feel for JupyterHub documentation, including customizations to colors, headers, logo, and branding. The theme also includes useful extensions for copy buttons and OpenGraph protocol metadata. Installation is straightforward, involving adding the theme as a requirement, configuring Sphinx to use the theme, and making any desired customizations.