Theme option reference¶
Theme options are entries in the Sphinx html_theme_options dictionary.
html_theme = "fuma"
html_theme_options = {
"layout": "docs",
"color_preset": "amber",
}
Options¶
Option |
Default |
Accepted values |
Description |
|---|---|---|---|
|
|
|
Controls whether the header sits beside the sidebar or spans the page. |
|
|
|
Controls the right-hand table of contents. |
|
|
|
Sets the primary color in light and dark modes. |
|
|
Boolean |
Shows the search buttons and dialog. |
|
|
|
Loads the bundled Geist and JetBrains Mono fonts or uses system stacks. |
|
|
Boolean |
Hides the project name beside the logo. |
|
|
Integer |
Sets the sidebar tree depth expanded by default. |
|
|
URL string |
Adds GitHub links and derives edit-page links for GitHub repositories. |
|
|
URL template |
Overrides the edit-page URL derived from |
|
|
Link mappings, pairs, or a compact string |
Adds links to the header and sidebar toolbar. |
|
|
Tab mappings |
Adds a section navigator beneath the project name. |
|
|
String |
Adds a banner above the page layout. |
|
|
String |
Adds text to the page footer. |
|
|
CSS variable mapping |
Overrides design tokens in light mode. |
|
|
CSS variable mapping |
Overrides design tokens in dark mode and dark system preference. |
Unsupported values for enumerated options fall back to their defaults.
Standard Sphinx settings¶
The theme also uses standard Sphinx HTML settings:
Setting |
Theme behavior |
|---|---|
|
Displays a project logo beside the project name. |
|
Set the site and brand titles. |
|
Shows or hides the page source link in the right rail. |
|
Shows or hides the Sphinx attribution in the footer. |
|
Adds the last-updated date to the footer. |
|
Adds the copyright notice to the footer. |
Layout¶
docs uses the three-column documentation layout. The project header is part of the left sidebar on desktop and becomes a compact top bar at smaller widths.
notebook keeps the top bar visible across the page. Both layouts retain the responsive sidebar and page table of contents.
Search¶
Search uses the static index provided by sphinx-searchlite. Readers can open the dialog from the header or sidebar, with /, or with Cmd/Ctrl+K. Arrow keys move through results, Enter follows the selected result, and Esc closes the dialog.
Set search to false to hide the search controls and dialog.
Edit-page links¶
A GitHub repository URL produces edit links in this form:
https://github.com/OWNER/REPOSITORY/edit/HEAD/{filename}
edit_page_url_template replaces that default. Supported placeholders are {filename}, {path}, and {pagename}. {filename} and {path} include the page’s source suffix; {pagename} does not.
html_theme_options = {
"edit_page_url_template": "https://example.com/edit/main/{filename}",
}
Color presets and variables¶
Color presets replace --color-fd-primary in both color modes. Entries in light_css_variables and dark_css_variables override the preset and may replace any theme design token:
html_theme_options = {
"color_preset": "purple",
"light_css_variables": {
"color-fd-background": "#fafafa",
"color-fd-primary": "#7c3aed",
},
"dark_css_variables": {
"color-fd-background": "#09090b",
"color-fd-primary": "#c4b5fd",
},
}
Variable names may include or omit the leading --. Color tokens are:
color-fd-backgroundcolor-fd-foregroundcolor-fd-mutedcolor-fd-muted-foregroundcolor-fd-popovercolor-fd-popover-foregroundcolor-fd-cardcolor-fd-card-foregroundcolor-fd-bordercolor-fd-primarycolor-fd-primary-foregroundcolor-fd-secondarycolor-fd-secondary-foregroundcolor-fd-accentcolor-fd-accent-foregroundcolor-fd-ring
Layout and typography tokens include fd-sidebar-width, fd-toc-width, fd-page-width, fd-page-max, fd-radius, fd-font-sans, and fd-font-mono.
Page icons¶
The icon page metadata value and sidebar_tabs[].icon use the same built-in icon set.
---
icon: terminal
---
Available names, in alphabetical order:
album, blocks, book, bookmark, box, braces, bug, code, cog, compass, database, file, files, flask, folder, gauge, graduation-cap, layers, lightbulb, package, play, puzzle, rocket, server, settings, sparkles, terminal, test-tube, wrench, zap.
Unknown names render no icon.