Customize the primary sidebar#
The primary sidebar generally contains the site navigation and logo. By default it is on the left side of the site. This page describes ways that you can control and customize the primary sidebar.
Add a header to your Table of Contents#
If you’d like to add a header above a section of TOC links, use :caption: My header text
in your toctree
directive for that section.
Customize the logo, title, and favicon#
You can customize the logo, title, and favicon of your site with the following Sphinx configuration in conf.py
:
html_title = "Your title"
html_logo = "path/to/logo.png"
html_favicon = "path/to/favicon.ico"
These will be placed in the top-left of your page.
To remove the site title below the logo, add this line in conf.py
:
html_theme_options = {
...
"logo_only": True,
...
}
Add the home page to your table of contents#
By default, your table of contents will begin with the first file that you add to a toctree
. You can also configure the theme to show the landing page of the theme in your navigation bar as well.
To add the landing page of your site to the table of contents, use the following configuration:
html_theme_options = {
...
"home_page_in_toc": True
...
}