Skip to content
A fast, modern Sphinx theme with dark mode, full-text search, and Alpine.js interactivity. Star on GitHub ★

Configuration

Everything you can configure in Lumina — theme options, accent colors, and a complete reference.

Theme Options Reference

All options go in html_theme_options in your conf.py. Every option has a sensible default, so you only need to set what you want to change.

Appearance

Option

Type

Default

Description

accent_color

string

"#10b981"

Primary brand color used for links, active states, and accents. Any valid CSS color.

code_style

string

"default"

Syntax highlighting preset. Sets matched Pygments styles for light and dark modes. Options: "default", "nord", "one-dark", "gruvbox", "material". See Custom Styling for details.

dark_mode_default

string

"auto"

Initial color mode. "auto" follows system preference, "light" and "dark" force a mode.

wide_layout

string

"false"

Controls wide content layout (60rem instead of 48rem). "toggle" shows a button in the header that lets readers switch (visible on viewports ≥1280px, persisted in browser). "always" forces wide mode permanently with no toggle. See Wide Layout.

logo_only

string

"false"

When "true", hides the project name in the header and shows only the logo.

light_logo

string

""

Logo image for light mode (path relative to _static). Falls back to html_logo.

dark_logo

string

""

Logo image for dark mode (path relative to _static). When set alone, displays in both modes. Set both light_logo and dark_logo for automatic switching.

logo_icon

string

""

Use a Lucide icon as the site logo instead of an image. Pass the icon name (e.g. "hexagon"). Only used when no image logo is configured. When set, the browser favicon is automatically derived from the same icon and colored with accent_color, unless you also set Sphinx’s html_favicon, which takes precedence. See Icons.

logo_icon_size

string

"24"

Display size in pixels for logo_icon. Lucide icons are pixel-perfect at multiples of 24 (24, 48, 72, …); other sizes appear fuzzy because the 2-unit strokes can’t align to whole device pixels. Stick to 24 unless you deliberately want a larger logo.

Tip

Why 24 and not 28? Lucide icons are designed on a 24×24 grid with 2-unit-wide strokes. When a Lucide icon is rendered at a size that isn’t a clean multiple of 24, those strokes land on fractional device pixels and the browser anti-aliases them across two columns of pixels — the icon looks subtly fuzzy. Stick to 24, 48, or 72 for a crisp logo.

Announcement

Option

Type

Default

Description

announcement

string

""

HTML content for a dismissible banner above the header. Supports links and inline formatting. Users can dismiss it; the preference persists in localStorage and resets automatically when the content changes.

Doc Sections

Option

Type

Default

Description

doc_sections

list

[]

Define major documentation sections with icons and colors. Adds a dropdown at the top of the sidebar that lets readers switch between sections, each with its own navigation tree. See Navigation for setup.

Version Switcher

Option

Type

Default

Description

version_switcher_json

string

""

URL to a JSON file listing available documentation versions. Enables a version dropdown in the header.

version_switcher_match

string

""

The current version string to highlight in the dropdown. Should match a version field in the JSON.

HTTP API

These options control the interactive features on HTTP API endpoint pages. They require sphinxcontrib-openapi or sphinxcontrib-httpdomain. See OpenAPI for setup.

Option

Type

Default

Description

api_base_url

string

""

Default base URL for all HTTP API endpoints. Enables the “Copy as curl” button and “Try it out” panel. Individual blocks can override this with a data-api-base-url attribute on any ancestor element — see OpenAPI.

try_it_out

string

"true"

Set to "false" to hide the “Try it out” panel while keeping the “Copy as curl” button.

Accent Colors

The accent_color option controls links, active navigation items, buttons, and other interactive elements. It applies to both light and dark modes automatically.

Here are some well-tested color choices:

Color

Hex

Best for

Emerald

#10b981

Default. Clean and professional.

Blue

#3b82f6

Traditional documentation feel.

Violet

#8b5cf6

Creative and modern projects.

Rose

#f43f5e

Bold, attention-grabbing.

Amber

#f59e0b

Warm, energetic. Ensure contrast on light backgrounds.

Teal

#14b8a6

Calm, technical feel.

Warning

Choose a color with sufficient contrast against both light and dark backgrounds. Avoid very light colors (pastels) — they become unreadable on white backgrounds.

Full Configuration Example

Here’s a conf.py using every theme option:

conf.py — Complete theme configuration
html_theme = "lumina"
html_theme_options = {
    # Appearance
    "accent_color": "#10b981",
    "dark_mode_default": "auto",
    "logo_only": "false",
    "light_logo": "logo-light.svg",
    "dark_logo": "logo-dark.svg",

    # Announcement
    "announcement": 'New in v2.0 — <a href="/changelog">see what changed</a>!',

    # Navigation
    "nav_links": [
        {"title": "Guide", "url": "getting-started"},
        {
            "title": "Reference",
            "children": [
                {"title": "Typography", "url": "reference/typography"},
                {"title": "Code Blocks", "url": "reference/code-blocks"},
            ],
        },
        {"title": "GitHub", "url": "https://github.com/you/project", "external": True},
    ],
    "nav_depth": "4",
    "show_toc": "true",
    "show_breadcrumbs": "true",
    "show_prev_next": "true",
    "show_attribution": "true",
    "show_back_to_top": "true",

    # Doc sections
    "doc_sections": [
        {
            "name": "User Documentation",
            "description": "Installation, guides & reference",
            "icon": "book-open",
            "color": "#10b981",
            "default": True,
            "link": "getting-started/index",
        },
        {
            "path": "contributing",
            "name": "Developer Documentation",
            "description": "Architecture & development",
            "icon": "code",
            "color": "#8b5cf6",
        },
    ],

    # Version switcher
    "version_switcher_json": "https://example.com/versions.json",
    "version_switcher_match": "1.17",

    # Search
    "search_backend": "pagefind",

    # HTTP API interactive features
    "api_base_url": "https://api.example.com/v1",
    "try_it_out": "true",

    # Source links (enables "Edit on GitHub")
    "source_repository": "https://github.com/you/project",
    "source_branch": "main",
    "source_directory": "docs/",
    "edit_uri": "edit",

    # Footer & social
    "social_links": [
        {"icon": "github", "url": "https://github.com/you/project"},
    ],
    "footer_text": "Built with Sphinx and Lumina.",
}

Next Steps

Custom Styling

Go deeper with CSS custom properties, custom fonts, syntax highlighting themes, and template overrides.

Custom Styling