The Sphinx BlueBrain Theme must be installed from PyPi:

pip install sphinx-bluebrain-theme

You can then use the theme by specifying:

html_theme = "sphinx-bluebrain-theme"

in the for your documentation.

Generating tables of contents

When structuring your documentation in Sphinx, you generally require multiple toctree commands which define the structure of the documentation.

As sphinx-bluebrain-theme shows tables of contents (ToC) on each page, you can hide the ToC from the page body by specifying the :hidden: option:

.. toctree::
   :maxdepth: 2


By default you cannot navigate to pages which contain ToCs from the sidebar ToC. In order to allow users to view the content on these pages, you need to include self in the ToC on that page:

.. toctree::
   :maxdepth: 2

   Home <self>

Note that the above example also specifies a custom name for the self page. This is optional.

Metadata generation

You can generate required BlueBrain Project metadata from either your python package, or a .json file. In order to take advantage of this, specify the either the metadata_distribution or metadata_file variable in the html_theme_options dict in your


Provide the name of a python package (installed in the current python environment) from which to extract the required metadata.

The package you specify must provide at least the following metadata to setuptools. This is shown in the setup() function below, however it can be specified in any way compatible with setuptools:

 2   ...
 3   name="project-name",
 4   author="project-author",
 5   version="project-version",
 6   description="project-description",
 7   url="project-homepage-url",
 8   project_urls={
 9       "Tracker": "project-bug-tracker-url",
10       "Source": "project-source-repository-url",
11   },
12   license="project-license",
13   ...

Provide the path (relative to the of a .json which contains the required metadata. It must follow the structure of a standard package.json file, although it can be named differently.

The metadata may also contain a key contributors for attribution. If not provided, the top five contributors will be extracted from the git history of the directory containing the You may override this by providing the repo_path value in html_theme_options, it should be a path (relative to the to the .git folder of the repository.

Sphinx options

Most of the normal Sphinx configuration options should function as expected. However, some options will have different or no effect at all.


Passing custom sidebar templates/globbing patterns will have no effect. The sidebars are always: global table of contents on the left, and local table of contents on the right.

Hero header text

You can add hero text in the header for any page by adding hero metadata to any page. Example usage is shown below, this must be placed above all other content in the page’s .rst source:

:hero: This is some hero text for the header

Configuration options

The theme can be configured using the html_theme_options variable in the file. The following options are available:


Sets the author for the documentation which will be used in the HTML meta tags.


A brief description of the site which will be included in the HTML meta tags.


Set the url for the repository for the project you are documenting.


The name to be shown for the repository in the header.


An icon to be shown for the repository in the header. If none is specified, then the theme will attempt to choose one based on the repo_url providing logos for GitHub, BitBucket, and GitLab repositories.


If you wish to add tabbed navigation to the header of your documentation, you must set this value to True. Top level table of contents entries (which have children) will be shown in the header rather than in the Table of Contents.


When using tabs you cannot use self in any table of contents except the top level (usually index.rst) or tabs will break.