Header logo or title#
The header can show either a logo image or text, giving your documentation immediate branding. Swapping variants and tailoring light/dark mode versions is straightforward. The logo region spans roughly half the header width to fit even wide logos or names.

No logo (text only)#
Instead of an image you can display arbitrary text — commonly a project or organization name.
Set header text instead of logo
In
conf.pyunset the logo:html_logo = None.Set text via
html_title(default is <project> <release> documentation). Ifproject = "Foo"and release is1.0, the text becomes Foo 1.0 documentation.html_logo = None html_title = "My project"
Tip
Set the same project and HTML title:
project = html_title = "My Awesome Project"

Same logo for light and dark mode#
Use the standard Sphinx html_logo; the file appears in both modes.
Set a header logo
In
conf.pysethtml_logoto a path relative toconf.pyor an external URL.html_logo = "logo.svg"
Different logo for light and dark mode#
If the light logo doesn’t look good against a dark background, supply a separate dark variant.
Set a dark mode logo
Set the light variant with
html_logooption.Set the dark variant using
html_theme_options’slogo_darkoption.Add the dark logo file (or its folder) to
html_static_pathso Sphinx copies it. (The light logo is copied automatically.)
For example:
html_static_path = ["_static"]
html_logo = "_static/logo.svg"
html_theme_options = {
"logo_dark": "_static/logo-dark.svg"
}
Automatic dark mode logo#
Alternatively, invert the light logo automatically. This can be “good enough” if you lack a dedicated dark asset.
Turn on automatic dark logo
Set the light variant with
html_logo.Enable inversion with
html_theme_options’slogo_dark_invertoption.html_theme_options = { "logo_dark_invert": True }
Logo link#
The logo (or title) links to the root document by default (usually index.md / index.rst).
Change logo link
In
conf.py’shtml_theme_options, setlogo_urloption. The value might be any browser valid URL address.html_theme_options = { "logo_url": "https://readcraft.io" }